climb: can now fall from upper levels

This commit is contained in:
Vince Weaver
2024-09-14 12:35:16 -04:00
parent 2f8e6163f8
commit e4ae83c773
2 changed files with 31 additions and 6 deletions

View File

@@ -407,7 +407,7 @@ flame_good:
jsr check_keyboard jsr check_keyboard
lda LEVEL_OVER lda LEVEL_OVER
bne top_cliff bne cliff_reload_bg
; delay ; delay
@@ -416,9 +416,7 @@ flame_good:
jmp game_loop jmp game_loop
cliff_reload_bg:
top_cliff:
inc MAP_LOCATION
jsr load_graphics jsr load_graphics
lda #0 lda #0

View File

@@ -1,5 +1,6 @@
; Move that Peasant! ; Move that Peasant!
; climbing edition
; note: left/right across screen is roughly 24 keypresses ; note: left/right across screen is roughly 24 keypresses
; width on Apple II roughly 30 across ; width on Apple II roughly 30 across
@@ -27,8 +28,29 @@ peasant_falling:
jsr erase_peasant jsr erase_peasant
; FIXME: if not on screen0 ; falling, see if hit bottom
;
lda MAP_LOCATION
beq check_falling_hit_ground
; otherwise see if hit bottom of screen
lda PEASANT_Y
cmp #180
bcc move_falling_peasant
; new screen
dec MAP_LOCATION
lda #12 ; move back to top of screen
sta PEASANT_Y
lda #$FF
sta LEVEL_OVER
jmp done_falling_peasant
check_falling_hit_ground:
lda PEASANT_Y lda PEASANT_Y
cmp #115 cmp #115
@@ -202,13 +224,18 @@ peasant_y_toobig:
;============================ ;============================
; move up over top of screen
peasant_y_negative: peasant_y_negative:
; jsr move_map_north
lda #$FF lda #$FF
sta LEVEL_OVER sta LEVEL_OVER
inc MAP_LOCATION
; FIXME: if high enough, we won
; in the coach Z version, increase score
lda #158 ; new Y location lda #158 ; new Y location
jmp done_movey jmp done_movey