diff --git a/ootw/ootw_c4_city.s b/ootw/ootw_c4_city.s index 1d46f41a..de3d61f1 100644 --- a/ootw/ootw_c4_city.s +++ b/ootw/ootw_c4_city.s @@ -4,7 +4,6 @@ ; call once before entering city for first time ootw_city_init: lda #0 - sta PHYSICIST_STATE sta WHICH_ROOM sta BG_SCROLL sta DIRECTION ; left @@ -12,11 +11,17 @@ ootw_city_init: lda #1 sta HAVE_GUN - lda #28 + lda #19 sta PHYSICIST_X - lda #30 + lda #240 sta PHYSICIST_Y + lda #28 + sta fall_down_destination_smc+1 + + lda #P_FALLING_DOWN ; fall into level + sta PHYSICIST_STATE + lda #$2c sta falling_stop_smc @@ -32,9 +37,7 @@ ootw_city: ;============================== ; each room init -; lda #0 -; sta ON_ELEVATOR -; sta TELEPORTING + ;============================== ; setup per-room variables @@ -57,8 +60,13 @@ room0: lda #0 sta cel_smc+1 + lda PHYSICIST_STATE + cmp #P_FALLING_DOWN + beq room0_falling + lda #28 sta PHYSICIST_Y +room0_falling: ; load background lda #>(recharge_rle) diff --git a/ootw/ootw_c5_cave.s b/ootw/ootw_c5_cave.s index 72f40b6c..5e10a55a 100644 --- a/ootw/ootw_c5_cave.s +++ b/ootw/ootw_c5_cave.s @@ -4,7 +4,6 @@ ; call once before entering cave for first time ootw_cave_init: lda #0 - sta PHYSICIST_STATE sta WHICH_CAVE ; yes you fall in facing left for some reason sta DIRECTION ; left @@ -15,9 +14,15 @@ ootw_cave_init: lda #0 sta PHYSICIST_X - lda #20 + lda #240 sta PHYSICIST_Y + lda #P_FALLING_DOWN + sta PHYSICIST_STATE + + lda #14 + sta fall_down_destination_smc+1 + rts @@ -30,9 +35,6 @@ ootw_cave: ;============================== ; each room init -; lda #0 -; sta ON_ELEVATOR -; sta TELEPORTING ;============================== ; setup per-room variables @@ -55,8 +57,13 @@ cave0: lda #0 sta cel_smc+1 + lda PHYSICIST_STATE + cmp #P_FALLING_DOWN + beq falling_in +not_falling_in: lda #14 sta PHYSICIST_Y +falling_in: ; load background lda #>(entrance_rle) @@ -184,6 +191,10 @@ c5_no_bg_action: ;================= ; adjust floor + lda PHYSICIST_STATE + cmp #P_FALLING_DOWN + beq check_floor0_done + lda WHICH_CAVE cmp #0 bne check_floor1 @@ -205,7 +216,6 @@ c5_no_bg_action: lda #10 sta PHYSICIST_Y - check_floor0_done: check_floor1: