diff --git a/ootw/Makefile b/ootw/Makefile index 7fee394d..729b3325 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -55,8 +55,7 @@ intro.o: intro.s \ gr_copy.s gr_fast_clear.s gr_pageflip.s gr_unrle.s gr_putsprite.s \ gr_overlay.s \ keyboard.s random16.s \ - intro_off_elevator.inc \ - intro_keypad.inc intro_scanner.inc intro_unzapped.inc \ + intro_scanner.inc intro_unzapped.inc \ intro_open_soda.inc intro_drinking.inc intro_collider_ui.inc \ intro_tunnel1.inc intro_tunnel2.inc intro_gone.inc \ intro_graphics/01_building/intro_car.inc \ @@ -64,7 +63,10 @@ intro.o: intro.s \ intro_graphics/01_building/intro_building.inc \ intro_graphics/02_outer_door/outer_door.inc \ intro_graphics/02_outer_door/feet.inc \ - intro_graphics/03_elevator/intro_elevator.inc + intro_graphics/03_elevator/intro_elevator.inc \ + intro_graphics/03_elevator/intro_off_elevator.inc \ + intro_graphics/04_keypad/intro_scanner_door.inc \ + intro_graphics/04_keypad/intro_keypad.inc ca65 -o intro.o intro.s -l intro.lst #### @@ -107,15 +109,6 @@ ootw_c2_cage.inc: $(PNG2RLE) ootw_c2_cage.png ##### -intro_elevator.inc: $(PNG2RLE) intro_elevator.png - $(PNG2RLE) asm intro_elevator.png elevator_rle > intro_elevator.inc - -intro_off_elevator.inc: $(PNG2RLE) intro_off_elevator.png - $(PNG2RLE) asm intro_off_elevator.png off_elevator_rle > intro_off_elevator.inc - -intro_keypad.inc: $(PNG2RLE) intro_keypad.png - $(PNG2RLE) asm intro_keypad.png keypad_rle > intro_keypad.inc - intro_scanner.inc: $(PNG2RLE) intro_scanner.png $(PNG2RLE) asm intro_scanner.png scanner_rle > intro_scanner.inc diff --git a/ootw/intro.s b/ootw/intro.s index 1b110d89..4b4e02e1 100644 --- a/ootw/intro.s +++ b/ootw/intro.s @@ -496,10 +496,70 @@ elevator_exit: jsr gr_copy_to_current + lda #$22 + sta COLOR + + lda #40 + sta V2 + ldx #2 + ldy #20 + jsr vlin ; X, V2 at Y + + + + lda #10 + sta ELEVATOR_COUNT + lda #$00 + sta COLOR + + jmp skip_first + +elevator_open_loop: + jsr gr_copy_to_current +skip_first: + + +; 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 + + + lda ELEVATOR_COUNT + sta ELEVATOR_CYCLE +elevator_inner_loop: + lda #9 + clc + adc ELEVATOR_CYCLE + tay + + lda #40 + sta V2 + ldx #0 + jsr vlin ; X, V2 at Y + + sec + lda #30 + sbc ELEVATOR_CYCLE + tay + + lda #40 + sta V2 + ldx #0 + jsr vlin ; X, V2 at Y + + dec ELEVATOR_CYCLE + bne elevator_inner_loop -; 13 14 15 16 17 18 19 20 21 22 23 24 25 26 jsr page_flip + ldx #30 + jsr long_wait + + dec ELEVATOR_COUNT + bne elevator_open_loop + + + + + off_elevator_loop: lda KEYPRESS @@ -821,9 +881,11 @@ gone_loop: .include "intro_graphics/02_outer_door/feet.inc" .include "intro_graphics/03_elevator/intro_elevator.inc" +.include "intro_graphics/03_elevator/intro_off_elevator.inc" + +.include "intro_graphics/04_keypad/intro_scanner_door.inc" +.include "intro_graphics/04_keypad/intro_keypad.inc" -.include "intro_off_elevator.inc" -.include "intro_keypad.inc" .include "intro_scanner.inc" .include "intro_open_soda.inc" .include "intro_drinking.inc" diff --git a/ootw/intro_graphics/03_elevator/Makefile b/ootw/intro_graphics/03_elevator/Makefile index 1f2270e5..bf00032b 100644 --- a/ootw/intro_graphics/03_elevator/Makefile +++ b/ootw/intro_graphics/03_elevator/Makefile @@ -3,13 +3,16 @@ include ../../../Makefile.inc PNG2RLE = ../../../gr-utils/png2rle -all: intro_elevator.inc +all: intro_elevator.inc intro_off_elevator.inc ##### intro_elevator.inc: $(PNG2RLE) intro_elevator.png $(PNG2RLE) asm intro_elevator.png elevator_rle > intro_elevator.inc +intro_off_elevator.inc: $(PNG2RLE) intro_off_elevator.png + $(PNG2RLE) asm intro_off_elevator.png elevator_rle > intro_off_elevator.inc + ##### clean: diff --git a/ootw/intro_off_elevator.inc b/ootw/intro_graphics/03_elevator/intro_off_elevator.inc similarity index 100% rename from ootw/intro_off_elevator.inc rename to ootw/intro_graphics/03_elevator/intro_off_elevator.inc diff --git a/ootw/intro_off_elevator.png b/ootw/intro_graphics/03_elevator/intro_off_elevator.png similarity index 100% rename from ootw/intro_off_elevator.png rename to ootw/intro_graphics/03_elevator/intro_off_elevator.png diff --git a/ootw/intro_graphics/04_keypad/Makefile b/ootw/intro_graphics/04_keypad/Makefile new file mode 100644 index 00000000..40150f57 --- /dev/null +++ b/ootw/intro_graphics/04_keypad/Makefile @@ -0,0 +1,19 @@ +include ../../../Makefile.inc + +PNG2RLE = ../../../gr-utils/png2rle + + +all: intro_scanner_door.inc intro_keypad.inc + +##### + +intro_scanner_door.inc: $(PNG2RLE) intro_scanner_door.png + $(PNG2RLE) asm intro_scanner_door.png scanner_door_rle > intro_scanner_door.inc + +intro_keypad.inc: $(PNG2RLE) intro_keypad.png + $(PNG2RLE) asm intro_keypad.png keypad_rle > intro_keypad.inc + +##### + +clean: + rm -f *~ *.inc diff --git a/ootw/intro_keypad.inc b/ootw/intro_graphics/04_keypad/intro_keypad.inc similarity index 100% rename from ootw/intro_keypad.inc rename to ootw/intro_graphics/04_keypad/intro_keypad.inc diff --git a/ootw/intro_keypad.png b/ootw/intro_graphics/04_keypad/intro_keypad.png similarity index 100% rename from ootw/intro_keypad.png rename to ootw/intro_graphics/04_keypad/intro_keypad.png diff --git a/ootw/intro_graphics/04_keypad/intro_scanner_door.inc b/ootw/intro_graphics/04_keypad/intro_scanner_door.inc new file mode 100644 index 00000000..ffa139e7 --- /dev/null +++ b/ootw/intro_graphics/04_keypad/intro_scanner_door.inc @@ -0,0 +1,22 @@ +scanner_door_rle: .byte $28 ; ysize=48 + .byte $AC,$00, $22, $66, $AD,$22, $00, $22, $A0,$17,$00 + .byte $22, $66, $AD,$22, $00, $22, $A0,$17,$00, $22 + .byte $66, $AD,$22, $00, $22, $A0,$17,$00, $22, $66 + .byte $AD,$22, $00, $22, $A0,$17,$00, $22, $66, $AD,$22 + .byte $00, $22, $A0,$17,$00, $22, $66, $AD,$22, $00 + .byte $22, $A0,$17,$00, $22, $66, $AD,$22, $00, $22 + .byte $00, $A3,$50, $A7,$00, $AB,$02, $00, $22, $66 + .byte $AD,$22, $00, $22, $00, $A3,$04, $A0,$13,$00, $22 + .byte $66, $AD,$22, $00, $22, $00, $66,$66, $A0,$14,$00 + .byte $22, $66, $AD,$22, $00, $22, $00, $66,$66 + .byte $A0,$14,$00, $22, $66, $AD,$22, $00, $22, $00 + .byte $06,$06, $A8,$00, $AB,$20, $00, $22, $66, $AD,$22 + .byte $00, $22, $00, $AA,$20, $AC,$00, $22, $66 + .byte $AD,$22, $00, $22, $A0,$17,$00, $22, $56, $AC,$52 + .byte $22, $00, $22, $A0,$17,$00, $A0,$11,$52, $A0,$17,$00, $22 + .byte $62, $AD,$22, $02, $22, $A0,$17,$00, $22, $66 + .byte $AD,$22, $00, $22, $A0,$17,$00, $22, $66, $AD,$22 + .byte $00, $22, $A0,$17,$00, $22, $66, $AD,$22, $00 + .byte $22, $A0,$17,$00, $22, $66, $AD,$22, $00, $22 + .byte $A0,$AB,$00 + .byte $A1 diff --git a/ootw/intro_graphics/04_keypad/intro_scanner_door.png b/ootw/intro_graphics/04_keypad/intro_scanner_door.png new file mode 100644 index 00000000..3264cd52 Binary files /dev/null and b/ootw/intro_graphics/04_keypad/intro_scanner_door.png differ