diff --git a/ootw/TODO b/ootw/TODO index 5c531d39..922a15fd 100644 --- a/ootw/TODO +++ b/ootw/TODO @@ -55,6 +55,7 @@ cage room: + Ability to pick up gun, with all that entails + Animation of friend? + animated miners in background ++ 1-bit audio recording of friend talking Jail: + Foreground animations @@ -62,5 +63,4 @@ Jail: Elevator: + Elevator ride, view of city? -+ 1-bit audio recording of friend talking + music play when viewing city diff --git a/ootw/ootw_c2.s b/ootw/ootw_c2.s index b085fdaa..70710a4b 100644 --- a/ootw/ootw_c2.s +++ b/ootw/ootw_c2.s @@ -36,7 +36,7 @@ ootw_c2: jsr ootw_cage ;======================= - ; Start Levels + ; Start Level After Cage ;======================= lda #1 @@ -55,6 +55,8 @@ ootw_c2: ; enter new room on level2 c2_new_room: + lda #0 + sta GAME_OVER lda WHICH_JAIL cmp #4 @@ -75,6 +77,10 @@ multilevel_room: c2_check_done: + lda GAME_OVER + cmp #$ff + beq quit_level + ; only exit if done level ; FIXME: or quit pressed? diff --git a/ootw/ootw_c2_elevator.s b/ootw/ootw_c2_elevator.s index 97ac6c34..45d3e4f4 100644 --- a/ootw/ootw_c2_elevator.s +++ b/ootw/ootw_c2_elevator.s @@ -19,7 +19,7 @@ ootw_elevator: ;============================= ; load background image - jsr jail_load_background + jsr elevator_load_background ;============================== @@ -171,24 +171,30 @@ done_elevator: elevator_load_background: - lda WHICH_JAIL - bne elevator_bg1 +; Line 0 + lda #$88 + ldx #0 +line0_left_loop: + sta $c00,X + inx + cpx #16 + bne line0_left_loop + + lda #$00 +line0_center_loop: + sta $c00,X + inx + cpx #25 + bne line0_center_loop + + lda #$88 +line0_right_loop: + sta $c00,X + inx + cpx #39 + bne line0_right_loop + + -elevator_bg0: - ; load background - lda #>(cage_fell_rle) - sta GBASH - lda #<(cage_fell_rle) - sta GBASL - jmp elevator_bg_done -elevator_bg1: - ; load background - lda #>(jail2_rle) - sta GBASH - lda #<(jail2_rle) - sta GBASL -elevator_bg_done: - lda #$c ; load to page $c00 - jmp load_rle_gr ; tail call diff --git a/ootw/ootw_c2_jail.s b/ootw/ootw_c2_jail.s index 3fd3bf26..c4f4ea32 100644 --- a/ootw/ootw_c2_jail.s +++ b/ootw/ootw_c2_jail.s @@ -1,6 +1,127 @@ ; Ootw Checkpoint2 -- Running around the Jail ootw_jail: + + ;============================== + ; setup per-room variables + + lda WHICH_JAIL + bne jail1 + +jail0: + lda #(18+128) + sta LEFT_LIMIT + lda #(39+128) + sta RIGHT_LIMIT + + ; set right exit + lda #1 + sta jer_smc+1 + + ; set left exit + lda #0 + sta jel_smc+1 + + lda #22 + sta PHYSICIST_Y + + ; load background + lda #>(cage_fell_rle) + sta GBASH + lda #<(cage_fell_rle) + sta GBASL + lda #$c ; load to page $c00 + jsr load_rle_gr ; tail call + + + jmp jail_setup_done + +jail1: + lda WHICH_JAIL + cmp #1 + bne jail2 + + lda #(-4+128) + sta LEFT_LIMIT + lda #(39+128) + sta RIGHT_LIMIT + + ; set right exit + lda #2 + sta jer_smc+1 + + ; set left exit + lda #0 + sta jel_smc+1 + + lda #30 + sta PHYSICIST_Y + + ; load background + lda #>(jail2_rle) + sta GBASH + lda #<(jail2_rle) + sta GBASL + lda #$c ; load to page $c00 + jsr load_rle_gr ; tail call + + jmp jail_setup_done + +jail2: + lda WHICH_JAIL + cmp #2 + bne jail3 + + lda #(-4+128) + sta LEFT_LIMIT + lda #(39+128) + sta RIGHT_LIMIT + + ; set right exit + lda #3 + sta jer_smc+1 + + ; set left exit + lda #1 + sta jel_smc+1 + + ; load background + lda #>(jail3_rle) + sta GBASH + lda #<(jail3_rle) + sta GBASL + lda #$c ; load to page $c00 + jsr load_rle_gr ; tail call + + jmp jail_setup_done + +jail3: + + lda #(-4+128) + sta LEFT_LIMIT + lda #(39+128) + sta RIGHT_LIMIT + + ; set right exit + lda #4 + sta jer_smc+1 + + ; set left exit + lda #2 + sta jel_smc+1 + + ; load background + lda #>(jail4_rle) + sta GBASH + lda #<(jail4_rle) + sta GBASL + lda #$c ; load to page $c00 + jsr load_rle_gr ; tail call + + +jail_setup_done: + +ootw_jail_already_set: ;=========================== ; Enable graphics @@ -16,52 +137,6 @@ ootw_jail: lda #1 sta DISP_PAGE - ;============================= - ; load background image - - jsr jail_load_background - - - ;============================== - ; setup per-room variables - - lda WHICH_JAIL - bne jail1 - -jail0: - lda #(20+128) - sta LEFT_LIMIT - lda #(39+128) - sta RIGHT_LIMIT - - ; set right exit - lda #1 - sta jer_smc+1 - lda #ootw_jail - sta jer_smc+6 - - ; set left exit - lda #0 - sta jel_smc+1 - lda #ootw_jail - sta jel_smc+6 - - - jmp jail_setup_done - -jail1: - lda #(-4+128) - sta LEFT_LIMIT - lda #(39+128) - sta RIGHT_LIMIT - -jail_setup_done: - - ;================================= ; copy to screen @@ -85,8 +160,9 @@ jail_loop: jsr gr_copy_to_current - ;======================= - ; draw miners mining + ;================================== + ; draw background action + ; FIXME ;=============================== ; check keyboard @@ -110,8 +186,9 @@ jail_loop: jsr draw_physicist - ;================ - ; draw foreground + ;======================== + ; draw foreground action + ; FIXME ;=============== ; page flip @@ -124,9 +201,9 @@ jail_loop: inc FRAMEL bne jail_frame_no_oflo inc FRAMEH - jail_frame_no_oflo: + ;========================== ; check if done this level lda GAME_OVER @@ -140,26 +217,56 @@ jail_frame_no_oflo: cmp #1 beq jail_exit_left + ;================= ; exit to right jail_exit_right: + lda PHYSICIST_X + cmp #35 + bcs jail_right_yes_exit ; bge + +jail_right_stop_not_exit: + lda #0 + sta PHYSICIST_STATE + jmp still_in_jail + +jail_right_yes_exit: + lda #0 sta PHYSICIST_X jer_smc: - lda #$0 + lda #$0 ; smc+1 = exit location sta WHICH_CAVE - jmp ootw_jail + jmp done_jail + + ;===================== + ; exit to left jail_exit_left: + lda PHYSICIST_X + bmi jail_left_yes_exit ; off screen so negative + +jail_left_stop_not_exit: + lda #0 + sta PHYSICIST_STATE + lda LEFT_LIMIT + sec + sbc #$7f + sta PHYSICIST_X + jmp still_in_jail + +jail_left_yes_exit: lda #37 sta PHYSICIST_X jel_smc: - lda #0 + lda #0 ; smc+1 sta WHICH_CAVE - jmp ootw_jail - + jmp done_jail ; loop forever still_in_jail: + lda #0 + sta GAME_OVER + jmp jail_loop done_jail: @@ -168,30 +275,4 @@ done_jail: - ;=============================== - ; load proper background to $c00 - ;=============================== - -jail_load_background: - - lda WHICH_JAIL - bne jail_bg1 - -jail_bg0: - ; load background - lda #>(cage_fell_rle) - sta GBASH - lda #<(cage_fell_rle) - sta GBASL - jmp jail_bg_done - -jail_bg1: - ; load background - lda #>(jail2_rle) - sta GBASH - lda #<(jail2_rle) - sta GBASL -jail_bg_done: - lda #$c ; load to page $c00 - jmp load_rle_gr ; tail call diff --git a/ootw/ootw_graphics/l2jail/Makefile b/ootw/ootw_graphics/l2jail/Makefile index efeeb63c..47e70a13 100644 --- a/ootw/ootw_graphics/l2jail/Makefile +++ b/ootw/ootw_graphics/l2jail/Makefile @@ -11,6 +11,8 @@ ootw_c2_jail.inc: $(PNG2RLE) \ ootw_c2_cage_fell.png jail2_bg.png $(PNG2RLE) asm ootw_c2_cage_fell.png cage_fell_rle > ootw_c2_jail.inc $(PNG2RLE) asm jail2_bg.png jail2_rle >> ootw_c2_jail.inc + $(PNG2RLE) asm jail3_bg.png jail3_rle >> ootw_c2_jail.inc + $(PNG2RLE) asm jail4_bg.png jail4_rle >> ootw_c2_jail.inc ##### diff --git a/ootw/ootw_graphics/l2jail/jail3_bg.png b/ootw/ootw_graphics/l2jail/jail3_bg.png index de13ed8b..9ce54716 100644 Binary files a/ootw/ootw_graphics/l2jail/jail3_bg.png and b/ootw/ootw_graphics/l2jail/jail3_bg.png differ diff --git a/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc b/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc index e98ea4a2..fd9c077b 100644 --- a/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc +++ b/ootw/ootw_graphics/l2jail/ootw_c2_jail.inc @@ -128,3 +128,118 @@ jail2_rle: .byte $28 ; ysize=50 .byte $22,$22, $00, $77, $88, $A7,$55, $56,$56, $55,$55 .byte $A8,$56, $A4,$55, $A3,$56, $AE,$55, $A0,$28,$00 .byte $A1 +jail3_rle: .byte $28 ; ysize=48 + .byte $A0,$1A,$25, $66, $55, $AC,$00, $A0,$1A,$22, $66, $55 + .byte $AC,$00, $A0,$1A,$02, $66, $55, $AC,$00, $A5,$22, $00 + .byte $A3,$22, $55, $A5,$22, $00, $A3,$22, $55, $00 + .byte $A5,$22, $66, $55, $AC,$00, $A5,$22, $00, $A3,$22 + .byte $55, $A5,$22, $00, $A3,$22, $55, $00, $A5,$22 + .byte $66, $55, $AC,$00, $A5,$22, $00, $A3,$22, $55 + .byte $A5,$22, $00, $A3,$22, $55, $00, $A5,$22, $66 + .byte $55, $AC,$00, $A5,$22, $00, $A3,$22, $55, $A5,$22 + .byte $00, $A3,$22, $55, $00, $A5,$22, $66, $55 + .byte $AC,$00, $A5,$22, $00, $A3,$22, $55, $A5,$22, $00 + .byte $A3,$22, $55, $00, $A5,$22, $66, $55, $AC,$00 + .byte $A5,$22, $00, $A3,$22, $55, $22,$22, $02, $20 + .byte $22, $00, $A3,$22, $55, $00, $A4,$22, $62 + .byte $66, $55, $AC,$00, $A5,$22, $00, $A3,$22, $55 + .byte $A3,$22, $52, $25, $00, $A3,$22, $55, $00 + .byte $A4,$22, $66, $55,$55, $AC,$00, $A5,$22, $00, $A3,$22 + .byte $55, $A5,$22, $00, $A3,$22, $55, $00, $A4,$22 + .byte $66, $55,$55, $AC,$00, $A0,$17,$27, $67, $55, $66 + .byte $55,$55, $AC,$20, $A0,$17,$22, $66, $55, $25,$25, $02 + .byte $AC,$00, $A0,$17,$20, $26, $22, $AF,$20, $22, $A5,$52 + .byte $22, $A5,$52, $22,$22, $A5,$52, $22, $A5,$52, $22 + .byte $A5,$52, $22, $A5,$52, $A4,$22, $00, $77, $00 + .byte $77, $00, $22, $00, $77, $00, $77 + .byte $00, $22,$22, $00, $77, $00, $77, $00 + .byte $22, $00, $77, $00, $77, $00, $22 + .byte $00, $77, $00, $77, $00, $22, $00 + .byte $77, $00, $77, $00, $A4,$22, $00, $77 + .byte $00, $77, $00, $22, $00, $77, $00 + .byte $77, $00, $22,$22, $00, $77, $00, $77 + .byte $00, $22, $00, $77, $00, $77, $00 + .byte $22, $00, $77, $00, $77, $00, $22 + .byte $00, $77, $00, $77, $00, $A4,$22, $00 + .byte $77, $00, $77, $00, $22, $00, $77 + .byte $00, $77, $00, $22,$22, $00, $77, $00 + .byte $77, $00, $22, $00, $77, $00, $77 + .byte $00, $22, $00, $77, $00, $77, $00 + .byte $22, $00, $77, $00, $77, $00, $A4,$22 + .byte $00, $77, $50, $77, $88, $22, $00 + .byte $77, $00, $77, $88, $22,$22, $00, $77 + .byte $00, $77, $66, $22, $00, $77, $60 + .byte $77, $88, $22, $66, $77, $00, $77 + .byte $88, $22, $00, $77, $60, $77, $88 + .byte $A4,$22, $00, $77, $66, $77, $88, $22 + .byte $00, $77, $00, $77, $88, $22,$22, $00 + .byte $77, $00, $77, $66, $22, $00, $77 + .byte $66, $77, $88, $22, $06, $77, $00 + .byte $77, $88, $22, $00, $77, $66, $77 + .byte $88, $A4,$22, $50, $77, $00, $77, $55 + .byte $22, $00, $77, $88, $77, $88, $22,$22 + .byte $50, $77, $88, $77, $50, $22, $55 + .byte $77, $00, $77, $55, $22, $50, $77 + .byte $88, $77, $88, $22, $55, $77, $00 + .byte $77, $58, $A4,$22, $06, $77, $60, $77 + .byte $05, $22, $00, $77, $88, $77, $88 + .byte $22,$22, $00, $77, $65, $77, $05, $22 + .byte $06, $77, $65, $77, $06, $22, $00 + .byte $77, $50, $77, $58, $22, $55, $77 + .byte $60, $77, $05, $A3,$22, $52, $50, $57 + .byte $50, $57, $50, $52, $50, $E7, $E8 + .byte $E7, $58, $52,$52, $50, $57, $50, $57 + .byte $58, $52, $50, $57, $55, $57, $50 + .byte $52, $50, $57, $50, $57, $50, $52 + .byte $55, $57, $56, $57, $50, $A3,$52, $A7,$05 + .byte $A5,$0E, $A0,$1C,$05 + .byte $A1 +jail4_rle: .byte $28 ; ysize=48 + .byte $A0,$FF,$88, $A0,$FF,$88, $AA,$88, $A0,$1C,$20, $E0, $F0, $E0 + .byte $20, $50, $20,$20, $00, $20, $00, $20 + .byte $00, $22, $0A, $7A, $0A, $7A, $0A + .byte $22, $0A, $7A, $0A, $7A, $0A, $22 + .byte $0A, $7A, $0A, $7A, $0A, $22,$22, $0A + .byte $7A, $0A, $7A, $0A, $22, $0A, $7A + .byte $0A, $7A, $0A, $22, $55, $22,$22, $00 + .byte $22, $00, $22, $00, $22, $00, $77 + .byte $00, $77, $00, $22, $00, $77, $00 + .byte $77, $00, $22, $00, $77, $00, $77 + .byte $00, $22,$22, $00, $77, $00, $77, $00 + .byte $22, $00, $77, $00, $77, $00, $22 + .byte $55, $22,$22, $00, $22, $00, $22, $00 + .byte $22, $00, $77, $00, $77, $00, $22 + .byte $00, $77, $00, $77, $00, $22, $00 + .byte $77, $00, $77, $00, $22,$22, $00, $77 + .byte $00, $77, $00, $22, $00, $77, $00 + .byte $77, $00, $22, $55, $72,$72, $00, $22 + .byte $00, $22, $00, $66, $00, $77, $00 + .byte $77, $80, $22, $00, $77, $00, $77 + .byte $80, $22, $00, $77, $00, $77, $80 + .byte $22,$22, $00, $77, $00, $77, $80, $22 + .byte $00, $77, $00, $77, $80, $22, $25 + .byte $77,$77, $00, $22, $00, $22, $00, $22 + .byte $00, $77, $00, $77, $88, $22, $00 + .byte $77, $00, $77, $88, $22, $00, $77 + .byte $00, $77, $88, $22,$22, $00, $77, $00 + .byte $77, $88, $22, $00, $77, $00, $77 + .byte $88, $22,$22, $27,$27, $00, $22, $00, $22 + .byte $00, $22, $00, $77, $80, $77, $88 + .byte $22, $00, $77, $80, $77, $88, $22 + .byte $00, $77, $80, $77, $88, $22,$22, $00 + .byte $77, $80, $77, $88, $22, $00, $77 + .byte $80, $77, $88, $A4,$22, $00, $22, $00 + .byte $22, $00, $22, $00, $77, $88, $77 + .byte $88, $22, $00, $77, $88, $77, $88 + .byte $22, $00, $77, $88, $77, $88, $22,$22 + .byte $00, $77, $88, $77, $88, $22, $00 + .byte $77, $88, $77, $88, $A4,$22, $00, $22 + .byte $00, $22, $00, $22, $00, $77, $88 + .byte $77, $88, $22, $00, $77, $88, $77 + .byte $88, $22, $00, $77, $88, $77, $88 + .byte $22,$22, $00, $77, $88, $77, $88, $22 + .byte $00, $77, $88, $77, $88, $A4,$22, $00 + .byte $22, $00, $22, $00, $A0,$1A,$55, $E5, $A5,$EE + .byte $E5, $55,$55, $50, $55, $50, $55, $50 + .byte $A0,$28,$00 + .byte $A1 diff --git a/ootw/ootw_rope.s b/ootw/ootw_rope.s index 8c88191b..4f862447 100644 --- a/ootw/ootw_rope.s +++ b/ootw/ootw_rope.s @@ -185,7 +185,7 @@ done_swing_check: lda PHYSICIST_X cmp #26 - bcs phys_no_adjust_y ; blt + bcs phys_no_adjust_y ; bge cmp #17 bcc phys_on_platform