ootw: intro: split off keypad

This commit is contained in:
Vince Weaver 2021-03-22 22:39:48 -04:00
parent dc6a889398
commit e54ea9ba69
5 changed files with 199 additions and 333 deletions

View File

@ -31,6 +31,7 @@ intro.o: intro.s \
intro_01_building.s \
intro_02_outer_door.s \
intro_03_elevator.s \
intro_04_keypad.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
@ -88,155 +86,6 @@ intro_opening.inc: opening01.lzsa opening02.lzsa \
%.lzsa: %.gr
$(LZSA) -r -f2 $< $@
#####
#
#intro_scanner_door.inc: $(PNG2RLE) intro_scanner_door.png
# $(PNG2RLE) asm intro_scanner_door.png scanner_door_rle > intro_scanner_door.inc
#
#intro_keypad_bg.inc: $(PNG2RLE) intro_keypad_bg.png
# $(PNG2RLE) asm intro_keypad_bg.png keypad_rle > intro_keypad_bg.inc
#
#intro_approach.inc: $(PNG2RLE) approach01.png approach02.png \
# approach03.png approach04.png approach05.png approach06.png \
# approach07.png
# $(PNG2RLE) asm approach01.png approach01_rle > intro_approach.inc
# $(PNG2RLE) asm approach02.png approach02_rle >> intro_approach.inc
# $(PNG2RLE) asm approach03.png approach03_rle >> intro_approach.inc
# $(PNG2RLE) asm approach04.png approach04_rle >> intro_approach.inc
# $(PNG2RLE) asm approach05.png approach05_rle >> intro_approach.inc
# $(PNG2RLE) asm approach06.png approach06_rle >> intro_approach.inc
# $(PNG2RLE) asm approach07.png approach07_rle >> intro_approach.inc
#####
#intro_hands.inc: $(PNG2RLE) hand04_01.png hand04_02.png \
# hand04_03.png hand05_01.png hand05_02.png hand05_03.png \
# hand05_04.png hand01_01.png hand01_02.png hand01_03.png \
# hand09_01.png hand09_02.png hand09_03.png hand09_04.png \
# hand09_05.png hand03_01.png hand03_02.png hand03_03.png \
# hand03_04.png hand02_01.png hand02_02.png hand02_03.png \
# hand02_04.png hand02_05.png
# $(PNG2RLE) asm hand04_01.png hand04_01_rle > intro_hands.inc
# $(PNG2RLE) asm hand04_02.png hand04_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand04_03.png hand04_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand05_01.png hand05_01_rle >> intro_hands.inc
# $(PNG2RLE) asm hand05_02.png hand05_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand05_03.png hand05_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand05_04.png hand05_04_rle >> intro_hands.inc
# $(PNG2RLE) asm hand01_01.png hand01_01_rle >> intro_hands.inc
# $(PNG2RLE) asm hand01_02.png hand01_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand01_03.png hand01_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand09_01.png hand09_01_rle >> intro_hands.inc
# $(PNG2RLE) asm hand09_02.png hand09_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand09_03.png hand09_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand09_04.png hand09_04_rle >> intro_hands.inc
# $(PNG2RLE) asm hand09_05.png hand09_05_rle >> intro_hands.inc
# $(PNG2RLE) asm hand03_01.png hand03_01_rle >> intro_hands.inc
# $(PNG2RLE) asm hand03_02.png hand03_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand03_03.png hand03_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand03_04.png hand03_04_rle >> intro_hands.inc
# $(PNG2RLE) asm hand02_01.png hand02_01_rle >> intro_hands.inc
# $(PNG2RLE) asm hand02_02.png hand02_02_rle >> intro_hands.inc
# $(PNG2RLE) asm hand02_03.png hand02_03_rle >> intro_hands.inc
# $(PNG2RLE) asm hand02_04.png hand02_04_rle >> intro_hands.inc
# $(PNG2RLE) asm hand02_05.png hand02_05_rle >> intro_hands.inc
####
#intro_opening.inc: $(PNG2RLE) opening01.png opening02.png \
# opening03.png opening04.png opening05.png opening06.png \
# opening07.png opening08.png opening09.png opening10.png \
# opening11.png opening12.png
# $(PNG2RLE) asm opening01.png opening01_rle > intro_opening.inc
# $(PNG2RLE) asm opening02.png opening02_rle >> intro_opening.inc
# $(PNG2RLE) asm opening03.png opening03_rle >> intro_opening.inc
# $(PNG2RLE) asm opening04.png opening04_rle >> intro_opening.inc
# $(PNG2RLE) asm opening05.png opening05_rle >> intro_opening.inc
# $(PNG2RLE) asm opening06.png opening06_rle >> intro_opening.inc
# $(PNG2RLE) asm opening07.png opening07_rle >> intro_opening.inc
# $(PNG2RLE) asm opening08.png opening08_rle >> intro_opening.inc
# $(PNG2RLE) asm opening09.png opening09_rle >> intro_opening.inc
# $(PNG2RLE) asm opening10.png opening10_rle >> intro_opening.inc
# $(PNG2RLE) asm opening11.png opening11_rle >> intro_opening.inc
# $(PNG2RLE) asm opening12.png opening12_rle >> intro_opening.inc
#####
#####
#intro_scanner_door_lz4.inc: $(PNG2LZ4) intro_scanner_door.png
# $(PNG2LZ4) asm intro_scanner_door.png scanner_door_rle > intro_scanner_door_lz4.inc
#intro_keypad_bg_lz4.inc: $(PNG2LZ4) intro_keypad_bg.png
# $(PNG2LZ4) asm intro_keypad_bg.png keypad_rle > intro_keypad_bg_lz4.inc
#intro_approach_lz4.inc: $(PNG2LZ4) approach01.png approach02.png \
# approach03.png approach04.png approach05.png approach06.png \
# approach07.png
# $(PNG2LZ4) asm approach01.png approach01_rle > intro_approach_lz4.inc
# $(PNG2LZ4) asm approach02.png approach02_rle >> intro_approach_lz4.inc
# $(PNG2LZ4) asm approach03.png approach03_rle >> intro_approach_lz4.inc
# $(PNG2LZ4) asm approach04.png approach04_rle >> intro_approach_lz4.inc
# $(PNG2LZ4) asm approach05.png approach05_rle >> intro_approach_lz4.inc
# $(PNG2LZ4) asm approach06.png approach06_rle >> intro_approach_lz4.inc
# $(PNG2LZ4) asm approach07.png approach07_rle >> intro_approach_lz4.inc
#####
#intro_hands_lz4.inc: $(PNG2LZ4) hand04_01.png hand04_02.png \
# hand04_03.png hand05_01.png hand05_02.png hand05_03.png \
# hand05_04.png hand01_01.png hand01_02.png hand01_03.png \
# hand09_01.png hand09_02.png hand09_03.png hand09_04.png \
# hand09_05.png hand03_01.png hand03_02.png hand03_03.png \
# hand03_04.png hand02_01.png hand02_02.png hand02_03.png \
# hand02_04.png hand02_05.png
# $(PNG2LZ4) asm hand04_01.png hand04_01_rle > intro_hands_lz4.inc
# $(PNG2LZ4) asm hand04_02.png hand04_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand04_03.png hand04_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand05_01.png hand05_01_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand05_02.png hand05_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand05_03.png hand05_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand05_04.png hand05_04_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand01_01.png hand01_01_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand01_02.png hand01_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand01_03.png hand01_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand09_01.png hand09_01_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand09_02.png hand09_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand09_03.png hand09_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand09_04.png hand09_04_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand09_05.png hand09_05_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand03_01.png hand03_01_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand03_02.png hand03_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand03_03.png hand03_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand03_04.png hand03_04_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand02_01.png hand02_01_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand02_02.png hand02_02_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand02_03.png hand02_03_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand02_04.png hand02_04_rle >> intro_hands_lz4.inc
# $(PNG2LZ4) asm hand02_05.png hand02_05_rle >> intro_hands_lz4.inc
####
#intro_opening_lz4.inc: $(PNG2LZ4) opening01.png opening02.png \
# opening03.png opening04.png opening05.png opening06.png \
# opening07.png opening08.png opening09.png opening10.png \
# opening11.png opening12.png
# $(PNG2LZ4) asm opening01.png opening01_rle > intro_opening_lz4.inc
# $(PNG2LZ4) asm opening02.png opening02_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening03.png opening03_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening04.png opening04_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening05.png opening05_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening06.png opening06_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening07.png opening07_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening08.png opening08_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening09.png opening09_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening10.png opening10_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening11.png opening11_rle >> intro_opening_lz4.inc
# $(PNG2LZ4) asm opening12.png opening12_rle >> intro_opening_lz4.inc
#####

View File

@ -43,73 +43,11 @@ repeat_intro:
jsr intro_03_elevator
;===============================
;===============================
; Keycode
;===============================
;===============================
;===============================
; Keypad
keypad:
jsr intro_04_keypad
;=============================
; Load background to $c00
lda #<(intro_scanner_door_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_scanner_door_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
lda #<approach_sequence
sta INTRO_LOOPL
lda #>approach_sequence
sta INTRO_LOOPH
jsr run_sequence
;=============================
; Load background to $c00
lda #<(intro_keypad_bg_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_keypad_bg_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
;==================================
; draw keypad sequence
lda #<keypad_sequence
sta INTRO_LOOPL
lda #>keypad_sequence
sta INTRO_LOOPH
jsr run_sequence
;==================================
; doop opening sequence
lda #<(intro_scanner_door_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_scanner_door_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
lda #<opening_sequence
sta INTRO_LOOPL
lda #>opening_sequence
sta INTRO_LOOPH
jsr run_sequence
;===============================
@ -1497,3 +1435,4 @@ intro9_data_lzsa:
.include "intro_01_building.s"
.include "intro_02_outer_door.s"
.include "intro_03_elevator.s"
.include "intro_04_keypad.s"

View File

@ -0,0 +1,194 @@
;==========================
; OOTW -- Intro -- Keypad
;==========================
intro_04_keypad:
;===============================
;===============================
; Keycode
;===============================
;===============================
keypad:
;=============================
; Load background to $c00
lda #<(intro_scanner_door_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_scanner_door_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
lda #<approach_sequence
sta INTRO_LOOPL
lda #>approach_sequence
sta INTRO_LOOPH
jsr run_sequence
;=============================
; Load background to $c00
lda #<(intro_keypad_bg_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_keypad_bg_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
;==================================
; draw keypad sequence
lda #<keypad_sequence
sta INTRO_LOOPL
lda #>keypad_sequence
sta INTRO_LOOPH
jsr run_sequence
;==================================
; door opening sequence
lda #<(intro_scanner_door_lzsa)
sta getsrc_smc+1 ; LZSA_SRC_LO
lda #>(intro_scanner_door_lzsa)
sta getsrc_smc+2 ; LZSA_SRC_HI
lda #$c ; load to off-screen $c00
jsr decompress_lzsa2_fast
lda #<opening_sequence
sta INTRO_LOOPL
lda #>opening_sequence
sta INTRO_LOOPH
jmp run_sequence ; exite for us
;=================================
;=================================
; Intro Segment 04 Data (Keypad)
;=================================
;=================================
.include "graphics/04_keypad/intro_scanner_door.inc"
.include "graphics/04_keypad/intro_approach.inc"
.include "graphics/04_keypad/intro_keypad_bg.inc"
.include "graphics/04_keypad/intro_hands.inc"
.include "graphics/04_keypad/intro_opening.inc"
; Approaching keypad sequence
approach_sequence:
.byte 20
.word approach01_lzsa
.byte 128+20 ; .word approach02_lzsa
.byte 128+20 ; .word approach03_lzsa
.byte 128+20 ; .word approach04_lzsa
.byte 128+20 ; .word approach05_lzsa
.byte 128+20 ; .word approach06_lzsa
.byte 128+20 ; .word approach07_lzsa
.byte 80
.word approach07_lzsa
.byte 0
; Using keypad sequence
keypad_sequence:
.byte 9
.word hand04_01_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand04_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand05_01_lzsa
.byte 9
.word hand05_02_lzsa
.byte 9
.word hand05_03_lzsa
.byte 9
.word hand05_04_lzsa
.byte 9
.word hand01_01_lzsa
.byte 9
.word hand01_02_lzsa
.byte 9
.word hand01_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand01_02_lzsa
.byte 9
.word hand01_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand09_01_lzsa
.byte 9
.word hand09_02_lzsa
.byte 9
.word hand09_03_lzsa
.byte 9
.word hand09_04_lzsa
.byte 9
.word hand09_05_lzsa
.byte 9
.word hand03_01_lzsa
.byte 9
.word hand03_02_lzsa
.byte 9
.word hand03_03_lzsa
.byte 9
.word hand03_04_lzsa
.byte 9
.word hand02_01_lzsa
.byte 9
.word hand02_02_lzsa
.byte 9
.word hand02_03_lzsa
.byte 9
.word hand02_04_lzsa
.byte 9
.word hand02_05_lzsa
.byte 12
.word hand02_05_lzsa
.byte 0
; Door opening sequence
opening_sequence:
.byte 15
.word opening01_lzsa
.byte 128+15 ; .word opening02_lzsa
.byte 128+15 ; .word opening03_lzsa
.byte 128+15 ; .word opening04_lzsa
.byte 128+15 ; .word opening05_lzsa
.byte 128+15 ; .word opening06_lzsa
.byte 128+15 ; .word opening07_lzsa
.byte 128+15 ; .word opening08_lzsa
.byte 128+15 ; .word opening09_lzsa
.byte 128+15 ; .word opening10_lzsa
.byte 128+15 ; .word opening11_lzsa
.byte 128+15 ; .word opening12_lzsa
.byte 15
.word nothing_lzsa
.byte 100
.word nothing_lzsa
.byte 0

View File

@ -1,120 +1,3 @@
;=================================
;=================================
; Intro Segment 04 Data (Keypad)
;=================================
;=================================
.include "graphics/04_keypad/intro_scanner_door.inc"
.include "graphics/04_keypad/intro_approach.inc"
.include "graphics/04_keypad/intro_keypad_bg.inc"
.include "graphics/04_keypad/intro_hands.inc"
.include "graphics/04_keypad/intro_opening.inc"
;.include "graphics/08_lightning/nothing.inc"
; Approaching keypad sequence
approach_sequence:
.byte 20
.word approach01_lzsa
.byte 128+20 ; .word approach02_lzsa
.byte 128+20 ; .word approach03_lzsa
.byte 128+20 ; .word approach04_lzsa
.byte 128+20 ; .word approach05_lzsa
.byte 128+20 ; .word approach06_lzsa
.byte 128+20 ; .word approach07_lzsa
.byte 80
.word approach07_lzsa
.byte 0
; Using keypad sequence
keypad_sequence:
.byte 9
.word hand04_01_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand04_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand05_01_lzsa
.byte 9
.word hand05_02_lzsa
.byte 9
.word hand05_03_lzsa
.byte 9
.word hand05_04_lzsa
.byte 9
.word hand01_01_lzsa
.byte 9
.word hand01_02_lzsa
.byte 9
.word hand01_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand01_02_lzsa
.byte 9
.word hand01_03_lzsa
.byte 9
.word hand04_02_lzsa
.byte 9
.word hand09_01_lzsa
.byte 9
.word hand09_02_lzsa
.byte 9
.word hand09_03_lzsa
.byte 9
.word hand09_04_lzsa
.byte 9
.word hand09_05_lzsa
.byte 9
.word hand03_01_lzsa
.byte 9
.word hand03_02_lzsa
.byte 9
.word hand03_03_lzsa
.byte 9
.word hand03_04_lzsa
.byte 9
.word hand02_01_lzsa
.byte 9
.word hand02_02_lzsa
.byte 9
.word hand02_03_lzsa
.byte 9
.word hand02_04_lzsa
.byte 9
.word hand02_05_lzsa
.byte 12
.word hand02_05_lzsa
.byte 0
; Door opening sequence
opening_sequence:
.byte 15
.word opening01_lzsa
.byte 128+15 ; .word opening02_lzsa
.byte 128+15 ; .word opening03_lzsa
.byte 128+15 ; .word opening04_lzsa
.byte 128+15 ; .word opening05_lzsa
.byte 128+15 ; .word opening06_lzsa
.byte 128+15 ; .word opening07_lzsa
.byte 128+15 ; .word opening08_lzsa
.byte 128+15 ; .word opening09_lzsa
.byte 128+15 ; .word opening10_lzsa
.byte 128+15 ; .word opening11_lzsa
.byte 128+15 ; .word opening12_lzsa
.byte 15
.word nothing_lzsa
.byte 100
.word nothing_lzsa
.byte 0
;=================================
;=================================