mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
ootw: more work on beast behavior
This commit is contained in:
parent
e27fdac9a4
commit
9264a085a7
34
ootw/beast.s
34
ootw/beast.s
@ -44,6 +44,40 @@ move_beast:
|
||||
;======================
|
||||
; running
|
||||
move_beast_running:
|
||||
|
||||
;=======================
|
||||
; stop at edge or at physicist
|
||||
|
||||
lda BEAST_DIRECTION
|
||||
beq check_beast_left
|
||||
|
||||
check_beast_right:
|
||||
|
||||
clc
|
||||
lda BEAST_X
|
||||
adc #$80
|
||||
|
||||
cmp RIGHT_LIMIT
|
||||
bcc beast_no_stop ; (blt==bcc)
|
||||
bcs stop_beast
|
||||
|
||||
check_beast_left:
|
||||
|
||||
clc
|
||||
lda BEAST_X
|
||||
adc #$80
|
||||
|
||||
cmp LEFT_LIMIT
|
||||
bcs beast_no_stop ; (bge==bcs)
|
||||
|
||||
stop_beast:
|
||||
lda #B_STANDING
|
||||
sta BEAST_STATE
|
||||
rts
|
||||
|
||||
|
||||
|
||||
beast_no_stop:
|
||||
inc BEAST_GAIT ; cycle through animation
|
||||
|
||||
lda BEAST_GAIT
|
||||
|
@ -80,6 +80,8 @@ left_going_left:
|
||||
beq walk_left
|
||||
cmp #P_WALKING
|
||||
beq run_left
|
||||
cmp #P_CROUCHING
|
||||
beq stand_left
|
||||
|
||||
;=============================
|
||||
; already running, do nothing?
|
||||
@ -93,6 +95,8 @@ left_going_right:
|
||||
beq stand_right
|
||||
cmp #P_STANDING
|
||||
beq stand_left
|
||||
cmp #P_CROUCHING
|
||||
beq stand_left
|
||||
|
||||
;===========================
|
||||
; otherwise?
|
||||
@ -124,6 +128,8 @@ right_going_right:
|
||||
beq walk_right
|
||||
cmp #P_WALKING
|
||||
beq run_right
|
||||
cmp #P_CROUCHING
|
||||
beq stand_right
|
||||
|
||||
;=============================
|
||||
; already running, do nothing?
|
||||
@ -137,6 +143,8 @@ right_going_left:
|
||||
beq stand_left
|
||||
cmp #P_STANDING
|
||||
beq stand_right
|
||||
cmp #P_CROUCHING
|
||||
beq stand_left
|
||||
|
||||
;===========================
|
||||
; otherwise?
|
||||
|
@ -60,6 +60,8 @@ mesa_left:
|
||||
sta GAME_OVER
|
||||
sta LEVELEND_PROGRESS
|
||||
|
||||
jsr setup_beast
|
||||
|
||||
;============================
|
||||
;============================
|
||||
;============================
|
||||
|
@ -306,10 +306,15 @@ check_swung_off:
|
||||
cmp #$5
|
||||
bne not_done_rope
|
||||
|
||||
|
||||
;==========================
|
||||
; swung off screen to right
|
||||
|
||||
lda #1
|
||||
sta PHYSICIST_X
|
||||
sta EARTH_OFFSET
|
||||
sta DIRECTION ; face right
|
||||
sta BEAST_DIRECTION
|
||||
lda #10
|
||||
sta PHYSICIST_Y
|
||||
lda #P_FALLING
|
||||
|
Loading…
Reference in New Issue
Block a user