ootw: ending: optimize graphics
@ -179,34 +179,61 @@ wait_until_keypressed:
|
||||
; 128..254 wait TIME then overlay $C00 with next
|
||||
; note: pauses *before* flipping to new graphic
|
||||
|
||||
|
||||
; dragon moves its head a bit when we arrive
|
||||
; repeats twice pulling self
|
||||
; then again but slightly to right
|
||||
; two more times
|
||||
; friend pops up, pauses a while
|
||||
|
||||
pickup_sequence:
|
||||
.byte 255 ; load to bg
|
||||
.word sky_bg_lzsa ; this
|
||||
.byte 120 ; wait 1
|
||||
.word rooftop00_lzsa ; overlay this
|
||||
.byte 120 ; wait 1
|
||||
.word rooftop00_lzsa ; overlay this
|
||||
.byte 128+110 ; .word rootfop01_lzsa ; next
|
||||
.byte 128+110 ; .word rootfop02_lzsa ; next
|
||||
.byte 128+100 ; .word rootfop03_lzsa ; next
|
||||
.byte 128+100 ; .word onboard_lzsa ; next
|
||||
.word rooftop_bg_lzsa ; this
|
||||
.byte 128+110 ; .word rooftop01_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop02_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop03_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop04_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop05_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop06_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop07_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop08_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop09_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop10_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop11_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop12_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop13_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop14_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop15_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop16_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop17_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop18_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop19_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop20_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop21_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop22_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop23_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop24_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop25_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop26_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop27_lzsa ; next
|
||||
.byte 128+110 ; .word rooftop28_lzsa ; next
|
||||
.byte 128+100 ; .word rooftop29_lzsa ; next
|
||||
.byte 0 ; finish
|
||||
|
||||
wing_sequence:
|
||||
.byte 255 ; load to bg
|
||||
.word wing_bg_lzsa ; this
|
||||
.byte 60
|
||||
.word left_unfurl1_lzsa
|
||||
.byte 128+60 ; .word left_unfurl1_lzsa ; next
|
||||
.byte 128+40 ; .word left_unfurl2_lzsa ; next
|
||||
.byte 128+60 ; .word right_unfurl1_lzsa ; next
|
||||
.byte 128+40 ; .word right_unfurl2_lzsa ; next
|
||||
.byte 128+40 ; .word onboard_lzsa ; next
|
||||
.byte 0 ; finish
|
||||
|
||||
flying_sequence:
|
||||
.byte 255 ; load to bg
|
||||
.word sky_bg_lzsa ; this
|
||||
.byte 50
|
||||
.word flying01_lzsa
|
||||
.byte 128+50 ; .word flying01_lzsa ; next
|
||||
.byte 128+50 ; .word flying03_lzsa ; next
|
||||
.byte 128+50 ; .word flying05_lzsa ; next
|
||||
.byte 128+50 ; .word flying07_lzsa ; next
|
||||
@ -222,7 +249,6 @@ flying_sequence:
|
||||
.byte 128+120 ; .word the_end08_lzsa ; next
|
||||
.byte 128+50 ; .word the_end09_lzsa ; next
|
||||
.byte 128+50 ; .word the_end10_lzsa ; next
|
||||
.byte 128+50 ; .word blank_lzsa ; next
|
||||
.byte 0 ; finish
|
||||
|
||||
|
||||
@ -236,7 +262,7 @@ flying_sequence:
|
||||
.include "../gr_copy.s"
|
||||
.include "../gr_offsets.s"
|
||||
.include "../gr_overlay.s"
|
||||
.include "../gr_run_sequence.s"
|
||||
.include "../gr_run_sequence2.s"
|
||||
|
||||
.include "../pt3_player/pt3_lib_core.s"
|
||||
.include "../pt3_player/pt3_lib_init.s"
|
||||
|
@ -12,22 +12,57 @@ ootw_c16_end.inc: \
|
||||
left_unfurl1.lzsa left_unfurl2.lzsa \
|
||||
right_unfurl1.lzsa right_unfurl2.lzsa \
|
||||
sky_bg.lzsa \
|
||||
rooftop00.lzsa rooftop01.lzsa rooftop02.lzsa rooftop03.lzsa onboard.lzsa \
|
||||
rooftop_bg.lzsa \
|
||||
rooftop01.lzsa rooftop02.lzsa rooftop03.lzsa rooftop04.lzsa \
|
||||
rooftop05.lzsa rooftop06.lzsa rooftop07.lzsa rooftop08.lzsa \
|
||||
rooftop09.lzsa rooftop10.lzsa rooftop11.lzsa rooftop12.lzsa \
|
||||
rooftop13.lzsa rooftop14.lzsa rooftop15.lzsa rooftop16.lzsa \
|
||||
rooftop17.lzsa rooftop18.lzsa rooftop19.lzsa rooftop20.lzsa \
|
||||
rooftop21.lzsa rooftop22.lzsa rooftop23.lzsa rooftop24.lzsa \
|
||||
rooftop25.lzsa rooftop26.lzsa rooftop27.lzsa rooftop28.lzsa \
|
||||
rooftop29.lzsa \
|
||||
onboard.lzsa \
|
||||
flying01.lzsa flying03.lzsa flying05.lzsa flying07.lzsa flying09.lzsa \
|
||||
flying11.lzsa \
|
||||
the_end01.lzsa the_end02.lzsa the_end03.lzsa the_end04.lzsa the_end05.lzsa \
|
||||
the_end06.lzsa the_end07.lzsa the_end08.lzsa the_end09.lzsa the_end10.lzsa
|
||||
echo "wing_bg_lzsa: .incbin \"wing_bg.lzsa\"" > ootw_c16_end.inc
|
||||
echo "rooftop_bg_lzsa: .incbin \"rooftop_bg.lzsa\"" > ootw_c16_end.inc
|
||||
echo "rooftop01_lzsa: .incbin \"rooftop01.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop02_lzsa: .incbin \"rooftop02.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop03_lzsa: .incbin \"rooftop03.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop04_lzsa: .incbin \"rooftop04.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop05_lzsa: .incbin \"rooftop05.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop06_lzsa: .incbin \"rooftop06.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop07_lzsa: .incbin \"rooftop07.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop08_lzsa: .incbin \"rooftop08.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop09_lzsa: .incbin \"rooftop09.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop10_lzsa: .incbin \"rooftop10.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop11_lzsa: .incbin \"rooftop11.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop12_lzsa: .incbin \"rooftop12.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop13_lzsa: .incbin \"rooftop13.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop14_lzsa: .incbin \"rooftop14.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop15_lzsa: .incbin \"rooftop15.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop16_lzsa: .incbin \"rooftop16.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop17_lzsa: .incbin \"rooftop17.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop18_lzsa: .incbin \"rooftop18.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop19_lzsa: .incbin \"rooftop19.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop20_lzsa: .incbin \"rooftop20.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop21_lzsa: .incbin \"rooftop21.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop22_lzsa: .incbin \"rooftop22.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop23_lzsa: .incbin \"rooftop23.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop24_lzsa: .incbin \"rooftop24.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop25_lzsa: .incbin \"rooftop25.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop26_lzsa: .incbin \"rooftop26.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop27_lzsa: .incbin \"rooftop27.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop28_lzsa: .incbin \"rooftop28.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop29_lzsa: .incbin \"rooftop29.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "wing_bg_lzsa: .incbin \"wing_bg.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "left_unfurl1_lzsa: .incbin \"left_unfurl1.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "left_unfurl2_lzsa: .incbin \"left_unfurl2.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "right_unfurl1_lzsa: .incbin \"right_unfurl1.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "right_unfurl2_lzsa: .incbin \"right_unfurl2.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "sky_bg_lzsa: .incbin \"sky_bg.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop00_lzsa: .incbin \"rooftop00.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop01_lzsa: .incbin \"rooftop01.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop02_lzsa: .incbin \"rooftop02.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "rooftop03_lzsa: .incbin \"rooftop03.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "onboard_lzsa: .incbin \"onboard.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "sky_bg_lzsa: .incbin \"sky_bg.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "flying01_lzsa: .incbin \"flying01.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "flying03_lzsa: .incbin \"flying03.lzsa\"" >> ootw_c16_end.inc
|
||||
echo "flying05_lzsa: .incbin \"flying05.lzsa\"" >> ootw_c16_end.inc
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -36,10 +36,8 @@ reload_image:
|
||||
jmp seq_stuff
|
||||
|
||||
not_reload:
|
||||
; load delay
|
||||
tax ; if negative, no need to load pointer
|
||||
bmi no_set_image_ptr ;
|
||||
|
||||
tax ; load delay into X
|
||||
bmi no_set_image_ptr ; if negative, no need to load pointer
|
||||
|
||||
get_image_ptr:
|
||||
iny
|
||||
|
144
games/ootw/gr_run_sequence2.s
Normal file
@ -0,0 +1,144 @@
|
||||
;=================================
|
||||
; Display a sequence of images
|
||||
;=================================
|
||||
; quit if escape pressed?
|
||||
|
||||
; this version (as opposed to original) the time delay is
|
||||
; *after* showing the image
|
||||
|
||||
; pattern is TIME, PTR
|
||||
; if time==0, then done
|
||||
; if time==255, reload background $C00 with PTR, no delay
|
||||
; if time==0..127 overlay PTR over $C00, then wait TIME
|
||||
; if time==128..254, overlay current over $C00, then wait TIME-128
|
||||
; assumes LZSA pointer points to image
|
||||
; basically after decoding one, input points to next
|
||||
|
||||
|
||||
run_sequence:
|
||||
ldy #0
|
||||
|
||||
run_sequence_loop:
|
||||
lda (INTRO_LOOPL),Y ; get time
|
||||
beq run_sequence_done ; if zero, then done
|
||||
|
||||
cmp #$ff ; if $ff, then load image to $c00
|
||||
bne not_reload
|
||||
|
||||
; reload background
|
||||
reload_bg:
|
||||
iny
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+1 ; LZSA_SRC_LO
|
||||
iny
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+2 ; LZSA_SRC_HI
|
||||
iny
|
||||
sty INTRO_LOOPER ; save for later
|
||||
lda #$0c ; load to $c00
|
||||
jsr decompress_lzsa2_fast
|
||||
jmp seq_stuff
|
||||
|
||||
not_reload:
|
||||
tax ; load delay into X
|
||||
bmi no_set_image_ptr ; if negative, no need to load pointer
|
||||
|
||||
; need to get image pointer from data stream
|
||||
get_image_ptr:
|
||||
iny
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+1 ; LZSA_SRC_LO
|
||||
iny
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+2 ; LZSA_SRC_HI
|
||||
|
||||
no_set_image_ptr:
|
||||
|
||||
; decompress image
|
||||
|
||||
txa
|
||||
pha ; save X on stack
|
||||
|
||||
iny
|
||||
sty INTRO_LOOPER ; save for later
|
||||
lda #$10 ; load to $1000
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
; display image and page flip
|
||||
|
||||
jsr gr_overlay
|
||||
jsr page_flip
|
||||
|
||||
pla ; restore X from stack
|
||||
|
||||
and #$7f
|
||||
tax
|
||||
cpx #1
|
||||
beq seq_no_wait
|
||||
|
||||
jsr long_wait
|
||||
seq_no_wait:
|
||||
|
||||
seq_stuff:
|
||||
ldy INTRO_LOOPER
|
||||
|
||||
; exit early if escape pressed
|
||||
|
||||
lda KEYPRESS
|
||||
cmp #27+$80
|
||||
beq run_sequence_done
|
||||
bit KEYRESET
|
||||
|
||||
jmp run_sequence_loop
|
||||
run_sequence_done:
|
||||
rts
|
||||
|
||||
|
||||
;====================================
|
||||
; Display a sequence of images 40x40
|
||||
|
||||
run_sequence_40x40:
|
||||
ldy #0
|
||||
|
||||
run_sequence_40x40_loop:
|
||||
lda (INTRO_LOOPL),Y ; get time
|
||||
beq run_sequence_40x40_done
|
||||
tax
|
||||
|
||||
jsr long_wait
|
||||
|
||||
iny
|
||||
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+1 ; LZSA_SRC_LO
|
||||
|
||||
iny
|
||||
lda (INTRO_LOOPL),Y
|
||||
sta getsrc_smc+2 ; LZSA_SRC_HI
|
||||
|
||||
iny
|
||||
sty INTRO_LOOPER ; save for later
|
||||
lda #$10 ; load to $1000
|
||||
jsr decompress_lzsa2_fast
|
||||
|
||||
jsr gr_overlay_40x40
|
||||
jsr page_flip
|
||||
ldy INTRO_LOOPER
|
||||
|
||||
jmp run_sequence_40x40_loop
|
||||
run_sequence_40x40_done:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
;=====================
|
||||
; long(er) wait
|
||||
; waits approximately ?? ms
|
||||
|
||||
long_wait:
|
||||
lda #64
|
||||
jsr WAIT ; delay
|
||||
dex
|
||||
bne long_wait
|
||||
rts
|