diff --git a/games/keen/mars.s b/games/keen/mars.s index 6ccb1727..9bb982af 100644 --- a/games/keen/mars.s +++ b/games/keen/mars.s @@ -201,7 +201,11 @@ done_with_keen: jsr fade_out - lda #LOAD_KEEN1 + ; set up proper level to load + + clc + lda CURRENT_LEVEL + adc #2 ; skip title and mars sta WHICH_LOAD rts ; exit back @@ -509,12 +513,28 @@ check_location_match: - - - + ;===================================== + ;===================================== + ; placeholder until action imlpemented + ;===================================== + ;===================================== dummy_action: rts + ;===================================== + ;===================================== + ; enter level + ;===================================== + ;===================================== + ; level number is in X +enter_level: + + stx CURRENT_LEVEL + + inc LEVEL_OVER + + rts + location_x: .byte 19,22, 9,22,13,16,25,38 @@ -532,7 +552,7 @@ location_size: .byte 1,1,1,1 location_actions_low: - .byte <(dummy_action-1),<(dummy_action-1) + .byte <(enter_level-1),<(dummy_action-1) ; level1, level2 .byte <(dummy_action-1),<(dummy_action-1) .byte <(dummy_action-1),<(dummy_action-1) .byte <(dummy_action-1),<(dummy_action-1) @@ -544,7 +564,7 @@ location_actions_low: .byte <(dummy_action-1),<(dummy_action-1) ; r trans, secret location_actions_high: - .byte >(dummy_action-1),>(dummy_action-1) + .byte >(enter_level-1),>(dummy_action-1) ; level1, level2 .byte >(dummy_action-1),>(dummy_action-1) .byte >(dummy_action-1),>(dummy_action-1) .byte >(dummy_action-1),>(dummy_action-1) diff --git a/games/keen/zp.inc b/games/keen/zp.inc index ec7f1c90..67a46168 100644 --- a/games/keen/zp.inc +++ b/games/keen/zp.inc @@ -143,6 +143,7 @@ MARS_TILEY = $A3 INITIAL_SOUND = $A4 PLAY_END_SOUND = $A5 APPLEII_MODEL = $A6 +CURRENT_LEVEL = $A7 WHICH_SLOT = $DA JS_BUTTON_STATE = $DB