ootw: intro: split off lightning

This commit is contained in:
Vince Weaver 2021-03-22 23:06:58 -04:00
parent 1c01a15b8a
commit 417ccc56ae
4 changed files with 53 additions and 194 deletions

View File

@ -29,6 +29,7 @@ intro.o: intro.s \
intro_05_scanner.s \
intro_06_console.s \
intro_07_soda.s \
intro_08_lightning.s \
graphics/01_building/intro_car.inc \
graphics/01_building/intro_building.inc \
graphics/01_building/intro_building_car.inc \

View File

@ -1,7 +1,5 @@
include ../../../../../Makefile.inc
#PNG2RLE = ../../../gr-utils/png2rle
#PNG2LZ4 = ../../../gr-utils/png2lz4
PNG2GR = ../../../../../utils/gr-utils/png2gr
LZSA = ~/research/lzsa/lzsa/lzsa
@ -77,134 +75,6 @@ lightning.inc: \
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
#nothing.inc: nothing.png $(PNG2RLE)
# $(PNG2RLE) asm nothing.png nothing_rle > nothing.inc
#####
#whiteblack.inc: white.png black.png $(PNG2RLE)
# $(PNG2RLE) asm white.png white_rle > whiteblack.inc
# $(PNG2RLE) asm black.png black_rle >> whiteblack.inc
#####
#lightning.inc: $(PNG2RLE) \
# bolt1.png bolt2.png bolt3.png bolt4.png bolt5.png bolt6.png bolt7.png \
# flash.png white.png black.png \
# storm01.png storm02.png storm03.png storm04.png storm05.png \
# storm06.png storm08.png storm09.png storm10.png storm11.png \
# storm12.png storm13.png storm14.png storm15.png storm16.png \
# storm29.png storm30.png storm31.png storm32.png storm33.png \
# storm34.png storm35.png storm36.png storm37.png storm38.png \
# storm40.png storm41.png storm42.png
# $(PNG2RLE) asm bolt1.png bolt1_rle > lightning.inc
# $(PNG2RLE) asm bolt2.png bolt2_rle >> lightning.inc
# $(PNG2RLE) asm bolt3.png bolt3_rle >> lightning.inc
# $(PNG2RLE) asm bolt4.png bolt4_rle >> lightning.inc
# $(PNG2RLE) asm bolt5.png bolt5_rle >> lightning.inc
# $(PNG2RLE) asm bolt6.png bolt6_rle >> lightning.inc
# $(PNG2RLE) asm bolt7.png bolt7_rle >> lightning.inc
# $(PNG2RLE) asm flash.png flash_rle >> lightning.inc
# $(PNG2RLE) asm white.png white_rle >> lightning.inc
# $(PNG2RLE) asm black.png black_rle >> lightning.inc
# $(PNG2RLE) asm nothing.png nothing_rle >> lightning.inc
# $(PNG2RLE) asm storm01.png storm01_rle >> lightning.inc
# $(PNG2RLE) asm storm02.png storm02_rle >> lightning.inc
# $(PNG2RLE) asm storm03.png storm03_rle >> lightning.inc
# $(PNG2RLE) asm storm04.png storm04_rle >> lightning.inc
# $(PNG2RLE) asm storm05.png storm05_rle >> lightning.inc
# $(PNG2RLE) asm storm06.png storm06_rle >> lightning.inc
# $(PNG2RLE) asm storm08.png storm08_rle >> lightning.inc
# $(PNG2RLE) asm storm09.png storm09_rle >> lightning.inc
# $(PNG2RLE) asm storm10.png storm10_rle >> lightning.inc
# $(PNG2RLE) asm storm11.png storm11_rle >> lightning.inc
# $(PNG2RLE) asm storm12.png storm12_rle >> lightning.inc
# $(PNG2RLE) asm storm13.png storm13_rle >> lightning.inc
# $(PNG2RLE) asm storm14.png storm14_rle >> lightning.inc
# $(PNG2RLE) asm storm15.png storm15_rle >> lightning.inc
# $(PNG2RLE) asm storm16.png storm16_rle >> lightning.inc
# $(PNG2RLE) asm storm29.png storm29_rle >> lightning.inc
# $(PNG2RLE) asm storm30.png storm30_rle >> lightning.inc
# $(PNG2RLE) asm storm31.png storm31_rle >> lightning.inc
# $(PNG2RLE) asm storm32.png storm32_rle >> lightning.inc
# $(PNG2RLE) asm storm33.png storm33_rle >> lightning.inc
# $(PNG2RLE) asm storm34.png storm34_rle >> lightning.inc
# $(PNG2RLE) asm storm35.png storm35_rle >> lightning.inc
# $(PNG2RLE) asm storm36.png storm36_rle >> lightning.inc
# $(PNG2RLE) asm storm37.png storm37_rle >> lightning.inc
# $(PNG2RLE) asm storm38.png storm38_rle >> lightning.inc
# $(PNG2RLE) asm storm40.png storm40_rle >> lightning.inc
# $(PNG2RLE) asm storm41.png storm41_rle >> lightning.inc
# $(PNG2RLE) asm storm42.png storm42_rle >> lightning.inc
#####
#####
#nothing_lz4.inc: $(PNG2LZ4)
# $(PNG2LZ4) asm nothing.png nothing_rle > nothing_lz4.inc
#####
#whiteblack_lz4.inc: white.png black.png $(PNG2L4)
# $(PNG2LZ4) asm white.png white_rle > whiteblack_lz4.inc
# $(PNG2LZ4) asm black.png black_rle >> whiteblack_lz4.inc
#lightning_lz4.inc: $(PNG2LZ4) \
# bolt1.png bolt2.png bolt3.png bolt4.png bolt5.png bolt6.png bolt7.png \
# flash.png white.png black.png \
# storm01.png storm02.png storm03.png storm04.png storm05.png \
# storm06.png storm08.png storm09.png storm10.png storm11.png \
# storm12.png storm13.png storm14.png storm15.png storm16.png \
# storm29.png storm30.png storm31.png storm32.png storm33.png \
# storm34.png storm35.png storm36.png storm37.png storm38.png \
# storm40.png storm41.png storm42.png
# $(PNG2LZ4) asm bolt1.png bolt1_rle > lightning_lz4.inc
# $(PNG2LZ4) asm bolt2.png bolt2_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm bolt3.png bolt3_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm bolt4.png bolt4_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm bolt5.png bolt5_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm bolt6.png bolt6_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm bolt7.png bolt7_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm flash.png flash_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm white.png white_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm black.png black_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm01.png storm01_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm02.png storm02_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm03.png storm03_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm04.png storm04_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm05.png storm05_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm06.png storm06_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm08.png storm08_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm09.png storm09_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm10.png storm10_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm11.png storm11_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm12.png storm12_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm13.png storm13_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm14.png storm14_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm15.png storm15_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm16.png storm16_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm29.png storm29_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm30.png storm30_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm31.png storm31_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm32.png storm32_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm33.png storm33_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm34.png storm34_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm35.png storm35_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm36.png storm36_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm37.png storm37_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm38.png storm38_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm40.png storm40_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm41.png storm41_rle >> lightning_lz4.inc
# $(PNG2LZ4) asm storm42.png storm42_rle >> lightning_lz4.inc
#####
clean:

View File

@ -68,47 +68,10 @@ repeat_intro:
jsr intro_06_console_part2
;===============================
; Lightning outside
;===============================
;===============================
; Thunderstorm Outside
;===============================
;===============================
thunderstorm:
lda #<(intro_building_car_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_building_car_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
jsr gr_copy_to_current
jsr page_flip
bit FULLGR
lda #<lightning_sequence
sta INTRO_LOOPL
lda #>lightning_sequence
sta INTRO_LOOPH
jsr run_sequence
lda #<bolt_sequence
sta INTRO_LOOPL
lda #>bolt_sequence
sta INTRO_LOOPH
jsr run_sequence
;outside_loop:
; lda KEYPRESS
; bpl outside_loop
; bit KEYRESET
jsr intro_08_lightning
;===============================
@ -286,31 +249,7 @@ done_intro:
.include "gr_run_sequence.s"
DATA_LOCATION = $9000
; intro8
.if 0
bolt_sequence = (DATA_LOCATION+$1484)
lightning_sequence = (DATA_LOCATION+$13D2)
building_car_lzsa = (DATA_LOCATION+$1259)
.endif
intro8_data_lzsa:
; .incbin "intro_data_08.lzsa"
.include "intro_data_08.s"
; intro9, intro10
.if 0
gone_sequence = (DATA_LOCATION+$2C66)
gone_lzsa = (DATA_LOCATION+$2039)
zappo_sequence = (DATA_LOCATION+$2C1B)
blue_zappo_lzsa = (DATA_LOCATION+$1737)
tunnel2_sequence = (DATA_LOCATION+$1718)
tunnel2_lzsa = (DATA_LOCATION+$0B0F)
tunnel1_sequence = (DATA_LOCATION+$16F2)
tunnel1_lzsa = (DATA_LOCATION+$0000)
.endif
intro9_data_lzsa:
; .incbin "intro_data_09.lzsa"
.include "intro_data_09.s"
@ -326,3 +265,4 @@ intro9_data_lzsa:
.include "intro_05_scanner.s"
.include "intro_06_console.s"
.include "intro_07_soda.s"
.include "intro_08_lightning.s"

View File

@ -1,3 +1,50 @@
;===============================
;===============================
; Thunderstorm Outside
;===============================
;===============================
; thunderbolt and lightning
; very vey frightning
intro_08_lightning:
thunderstorm:
lda #<(intro_building_car_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_building_car_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
jsr gr_copy_to_current
jsr page_flip
bit FULLGR
lda #<lightning_sequence
sta INTRO_LOOPL
lda #>lightning_sequence
sta INTRO_LOOPH
jsr run_sequence
lda #<bolt_sequence
sta INTRO_LOOPL
lda #>bolt_sequence
sta INTRO_LOOPH
jsr run_sequence
;outside_loop:
; lda KEYPRESS
; bpl outside_loop
; bit KEYRESET
rts
;=================================
;=================================
; Intro Segment 08 Data (Lightning)
@ -226,3 +273,4 @@ bolt_sequence: