dos33fsprogs/ootw/physicist.s

78 lines
901 B
ArmAsm
Raw Normal View History

2019-01-17 21:58:19 +00:00
;======================================
; draw physicist
;======================================
draw_physicist:
; FIXME: what happens if crouch+kick
; or crouch+walk?
check_if_still_kicking:
lda KICKING
beq check_crouching
kicking:
lda #<kick1
sta INL
lda #>kick1
sta INH
dec KICKING
jmp finally_draw_him
check_crouching:
lda CROUCHING
beq walking
crouching:
; FIXME: we have an animation?
lda #<crouch2
sta INL
lda #>crouch2
sta INH
jmp finally_draw_him
walking:
2019-01-17 21:58:19 +00:00
lda GAIT
2019-03-10 06:21:35 +00:00
cmp #40
bcc gait_fine ; blt
lda #0
2019-01-17 21:58:19 +00:00
sta GAIT
2019-03-10 06:21:35 +00:00
gait_fine:
lsr
and #$fe
2019-01-17 21:58:19 +00:00
tax
lda phys_walk_progression,X
sta INL
lda phys_walk_progression+1,X
sta INH
finally_draw_him:
2019-01-17 21:58:19 +00:00
lda PHYSICIST_X
sta XPOS
2019-01-18 05:18:06 +00:00
2019-01-17 21:58:19 +00:00
lda PHYSICIST_Y
2019-01-18 05:18:06 +00:00
sec
sbc EARTH_OFFSET ; adjust for earthquakes
2019-01-17 21:58:19 +00:00
sta YPOS
lda DIRECTION
bne facing_right
facing_left:
jmp put_sprite
facing_right:
jmp put_sprite_flipped