mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-14 13:33:48 +00:00
duke: avoid being able to double-jump
This commit is contained in:
parent
7c75cbb973
commit
67b78c5e1f
@ -8,11 +8,11 @@ move_duke:
|
|||||||
|
|
||||||
jsr duke_get_feet_location ; get location of feet
|
jsr duke_get_feet_location ; get location of feet
|
||||||
|
|
||||||
jsr check_falling
|
jsr check_falling ; check for/handle falling
|
||||||
|
|
||||||
jsr duke_collide
|
jsr duke_collide ; check for right/left collision
|
||||||
|
|
||||||
jsr handle_jumping
|
jsr handle_jumping ; handle jumping
|
||||||
|
|
||||||
lda DUKE_WALKING
|
lda DUKE_WALKING
|
||||||
beq done_move_duke
|
beq done_move_duke
|
||||||
@ -150,6 +150,10 @@ handle_jumping:
|
|||||||
dec DUKE_Y
|
dec DUKE_Y
|
||||||
dec DUKE_Y
|
dec DUKE_Y
|
||||||
dec DUKE_JUMPING
|
dec DUKE_JUMPING
|
||||||
|
bne done_handle_jumping
|
||||||
|
lda #1 ; avoid gap before falling triggered
|
||||||
|
sta DUKE_FALLING
|
||||||
|
|
||||||
|
|
||||||
done_handle_jumping:
|
done_handle_jumping:
|
||||||
rts
|
rts
|
||||||
@ -247,6 +251,9 @@ check_falling:
|
|||||||
;=======================
|
;=======================
|
||||||
; falling
|
; falling
|
||||||
|
|
||||||
|
lda #1
|
||||||
|
sta DUKE_FALLING
|
||||||
|
|
||||||
; scroll but only if Y>=18
|
; scroll but only if Y>=18
|
||||||
|
|
||||||
lda DUKE_Y
|
lda DUKE_Y
|
||||||
@ -266,6 +273,10 @@ scroll_fall:
|
|||||||
|
|
||||||
feet_on_ground:
|
feet_on_ground:
|
||||||
|
|
||||||
|
; clear falling
|
||||||
|
lda #0
|
||||||
|
sta DUKE_FALLING
|
||||||
|
|
||||||
; check to see if Y still hi, if so scroll back down
|
; check to see if Y still hi, if so scroll back down
|
||||||
|
|
||||||
lda DUKE_Y
|
lda DUKE_Y
|
||||||
|
@ -41,6 +41,7 @@ duke_start:
|
|||||||
sta SCORE1
|
sta SCORE1
|
||||||
sta SCORE2
|
sta SCORE2
|
||||||
sta INVENTORY
|
sta INVENTORY
|
||||||
|
sta DUKE_FALLING
|
||||||
|
|
||||||
lda #$10
|
lda #$10
|
||||||
sta SCORE0
|
sta SCORE0
|
||||||
|
@ -192,6 +192,9 @@ space_pressed:
|
|||||||
lda DUKE_JUMPING
|
lda DUKE_JUMPING
|
||||||
bne done_keypress ; don't jump if already jumping
|
bne done_keypress ; don't jump if already jumping
|
||||||
|
|
||||||
|
lda DUKE_FALLING
|
||||||
|
bne done_keypress ; don't jump if falling
|
||||||
|
|
||||||
lda #7
|
lda #7
|
||||||
sta DUKE_JUMPING
|
sta DUKE_JUMPING
|
||||||
|
|
||||||
|
@ -107,6 +107,8 @@ SCORE1 = $92
|
|||||||
SCORE2 = $93
|
SCORE2 = $93
|
||||||
UPDATE_STATUS = $94
|
UPDATE_STATUS = $94
|
||||||
|
|
||||||
|
DUKE_FALLING = $95
|
||||||
|
|
||||||
; done game puzzle state
|
; done game puzzle state
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user