ootw: c4: can finish level

This commit is contained in:
Vince Weaver 2019-08-09 15:00:34 -04:00
parent 3871e08d41
commit bf05fade0f
4 changed files with 41 additions and 10 deletions

View File

@ -29,6 +29,8 @@ handle_keypress:
beq no_keypress
cmp #P_FALLING_SIDEWAYS
beq no_keypress
cmp #P_FALLING_DOWN
beq no_keypress
cmp #P_IMPALED
beq no_keypress

View File

@ -38,13 +38,17 @@ c4_check_done:
cmp #$ff
beq quit_level
; only exit if done level
; FIXME: or quit pressed?
lda WHICH_JAIL
cmp #11
;====================
; go to next level
l4_defeated:
lda WHICH_ROOM
cmp #5
bne c4_new_room
lda #5
sta WHICH_LOAD
rts
;===========================
; quit_level

View File

@ -13,12 +13,15 @@ ootw_city_init:
lda #19
sta PHYSICIST_X
lda #240
lda #230 ; start offscreen
sta PHYSICIST_Y
lda #28
sta fall_down_destination_smc+1
lda #28
sta fall_sideways_destination_smc+1
lda #P_FALLING_DOWN ; fall into level
sta PHYSICIST_STATE
@ -136,10 +139,13 @@ room3:
cmp #3
bne room4
; set falling floor
; set falling floors
lda #48
sta fall_down_destination_smc+1
lda #48
sta fall_sideways_destination_smc+1
lda #(-4+128)
sta LEFT_LIMIT
lda #(39+128)
@ -191,7 +197,7 @@ room4:
lda #9
sta cer_smc+1
lda #20
lda #8
sta PHYSICIST_Y
; load background
@ -420,7 +426,7 @@ c4_no_bg_action:
lda PHYSICIST_Y
cmp #18
bne regular_room
bne regular_room ; blt
lda PHYSICIST_X
cmp #8
@ -520,6 +526,25 @@ c4_move_fg_objects:
inc FRAMEH
city_frame_no_oflo:
;=========================
; exit hack
;=========================
lda WHICH_ROOM
cmp #4
bne regular_exit_check
lda PHYSICIST_X
cmp #35
bcc regular_exit_check ; blt
lda #5
sta WHICH_ROOM
rts
regular_exit_check:
;==========================
; check if done this level
;==========================

View File

@ -14,7 +14,7 @@ ootw_cave_init:
lda #0
sta PHYSICIST_X
lda #240
lda #230
sta PHYSICIST_Y
lda #P_FALLING_DOWN