mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 22:30:49 +00:00
ootw: c1: beast now properly climbs slope on rope screen
This commit is contained in:
parent
d7fbc51e19
commit
69cf4408c2
@ -16,6 +16,9 @@ setup_beast:
|
||||
lda #B_STANDING
|
||||
sta BEAST_STATE
|
||||
|
||||
lda #26
|
||||
sta BEAST_Y
|
||||
|
||||
lda BEAST_DIRECTION
|
||||
beq setup_beast_left
|
||||
|
||||
@ -71,6 +74,11 @@ check_beast_right:
|
||||
|
||||
check_beast_left:
|
||||
|
||||
; no attack if swinging
|
||||
lda PHYSICIST_STATE
|
||||
cmp #P_SWINGING
|
||||
beq stop_beast
|
||||
|
||||
; Pp^pp Bbbbbb
|
||||
; if B=p
|
||||
clc
|
||||
@ -86,8 +94,6 @@ stop_beast:
|
||||
sta BEAST_STATE
|
||||
rts
|
||||
|
||||
|
||||
|
||||
beast_no_stop:
|
||||
inc BEAST_GAIT ; cycle through animation
|
||||
|
||||
@ -193,7 +199,7 @@ finally_draw_beast:
|
||||
lda BEAST_X
|
||||
sta XPOS
|
||||
|
||||
lda #26
|
||||
lda BEAST_Y ; was 26
|
||||
sec
|
||||
sbc EARTH_OFFSET ; adjust for earthquakes
|
||||
sta YPOS
|
||||
|
@ -234,6 +234,9 @@ trigger_beast:
|
||||
lda #1
|
||||
sta BEAST_OUT
|
||||
|
||||
lda #26
|
||||
sta BEAST_Y
|
||||
|
||||
lda #0
|
||||
sta BEAST_DIRECTION
|
||||
sta BEAST_GAIT
|
||||
|
@ -61,8 +61,8 @@ load_swing_bg:
|
||||
;=================================
|
||||
; copy $c00 to both pages $400/$800
|
||||
|
||||
jsr gr_copy_to_current
|
||||
jsr page_flip
|
||||
; jsr gr_copy_to_current
|
||||
; jsr page_flip
|
||||
|
||||
;=================================
|
||||
; setup vars
|
||||
@ -157,6 +157,34 @@ beyond_quake:
|
||||
;================
|
||||
; draw beast
|
||||
|
||||
|
||||
; adjust y for slope
|
||||
|
||||
lda BEAST_X
|
||||
cmp #26
|
||||
bcs beast_no_adjust_y ; bge
|
||||
|
||||
cmp #17
|
||||
bcc beast_on_platform
|
||||
|
||||
sec
|
||||
sbc #3
|
||||
and #$fe ; our sprite code only draws even y
|
||||
|
||||
jmp beast_done_adjust_y
|
||||
; slope is 15 - 26 ( 28 - 36)
|
||||
; 26 -> 22
|
||||
|
||||
beast_on_platform:
|
||||
lda #14
|
||||
bne beast_done_adjust_y
|
||||
|
||||
beast_no_adjust_y:
|
||||
lda #22
|
||||
beast_done_adjust_y:
|
||||
sta BEAST_Y
|
||||
|
||||
|
||||
jsr draw_beast
|
||||
|
||||
rope_no_beast:
|
||||
@ -192,7 +220,6 @@ done_swing_check:
|
||||
cmp #17
|
||||
bcc phys_on_platform
|
||||
|
||||
; lda PHYSICIST_X
|
||||
sec
|
||||
sbc #3
|
||||
and #$fe ; our sprite code only draws even y
|
||||
|
21
ootw/zp.inc
21
ootw/zp.inc
@ -32,17 +32,18 @@ SEEDL = $4e
|
||||
SEEDH = $4f
|
||||
XMAX = $50
|
||||
|
||||
BEAST_X = $51
|
||||
BEAST_GAIT = $52
|
||||
BEAST_COUNT = $53
|
||||
BEAST_STATE = $54
|
||||
B_STANDING = $00
|
||||
B_RUNNING = $01
|
||||
B_FALLING = $02
|
||||
B_DEAD = $03
|
||||
BEAST_DIRECTION = $55
|
||||
BEAST_X = $51 ; L1
|
||||
BEAST_Y = $52 ; L1
|
||||
BEAST_GAIT = $53 ; L1
|
||||
BEAST_COUNT = $54 ; L1
|
||||
BEAST_STATE = $55
|
||||
B_STANDING = $00
|
||||
B_RUNNING = $01
|
||||
B_FALLING = $02
|
||||
B_DEAD = $03
|
||||
BEAST_DIRECTION = $56 ; L1
|
||||
|
||||
|
||||
;INVFLG = $32
|
||||
|
||||
FRAMEL = $60
|
||||
FRAMEH = $61
|
||||
|
Loading…
x
Reference in New Issue
Block a user