adjust kydreeok movement boundaries

This commit is contained in:
scawful
2024-06-07 17:24:57 -04:00
parent d1ba08edb5
commit 7c047621a0

View File

@@ -410,11 +410,10 @@ MoveBody:
StopIfOutOfBounds:
{
; Set A to 00 if outside of certain bounds
REP #$20
LDA SprCachedX : CMP.w #$0A22 : BCS .notOutOfBoundsLeft
LDA SprCachedX : CMP.w #$0118 : BCS .not_out_of_bounds_Left
SEP #$20
LDA.w SprXSpeed : CMP.b #$7F : BCC .notOutOfBoundsLeft
LDA.w SprXSpeed : CMP.b #$7F : BCC .not_out_of_bounds_Left
LDA.b #-10 : STA.w SprXSpeed : STA SprXRound
LDA $19EA : SEC : SBC #$04 : STA $19EA
LDA $19EC : SEC : SBC #$04 : STA $19EC
@@ -424,13 +423,13 @@ StopIfOutOfBounds:
LDA $19F2 : SEC : SBC #$04 : STA $19F2
LDA $19F4 : SEC : SBC #$04 : STA $19F4
.notOutOfBoundsLeft
.not_out_of_bounds_Left
SEP #$20
REP #$20
LDA SprCachedX : CMP.w #$1B00 : BCC .notOutOfBoundsRight
LDA SprCachedX : CMP.w #$01D8 : BCC .not_out_of_bounds_Right
SEP #$20
LDA.w SprXSpeed : CMP.b #$80 : BCS .notOutOfBoundsRight
LDA.w SprXSpeed : CMP.b #$80 : BCS .not_out_of_bounds_Right
LDA.b #$00 : STA.w SprXSpeed : STA SprXRound
LDA $19EA : CLC : ADC #$04 : STA $19EA
LDA $19EC : CLC : ADC #$04 : STA $19EC
@@ -440,26 +439,26 @@ StopIfOutOfBounds:
LDA $19F2 : CLC : ADC #$04 : STA $19F2
LDA $19F4 : CLC : ADC #$04 : STA $19F4
.notOutOfBoundsRight
.not_out_of_bounds_Right
SEP #$20
; Upper bound
REP #$20
LDA SprCachedY : CMP.w #$0150 : BCS .notOutOfBoundsUp
LDA SprCachedY : CMP.w #$0020 : BCS .not_out_of_bounds_Up
SEP #$20
LDA.w SprYSpeed : CMP.b #$7F : BCC .notOutOfBoundsUp
LDA.w SprYSpeed : CMP.b #$7F : BCC .not_out_of_bounds_Up
LDA.b #$00 : STA.w SprYSpeed : STA SprYRound
LDA $19EA : SEC : SBC #$04 : STA $19EA
LDA $19EC : SEC : SBC #$04 : STA $19EC
LDA $19EE : SEC : SBC #$04 : STA $19EE
.notOutOfBoundsUp
.not_out_of_bounds_Up
SEP #$20
REP #$20
LDA SprCachedY : CMP.w #$01A0 : BCC .notOutOfBoundsDown
LDA SprCachedY : CMP.w #$00D0 : BCC .not_out_of_bounds_Down
SEP #$20
LDA.w SprYSpeed : CMP.b #$80 : BCS .notOutOfBoundsDown
LDA.w SprYSpeed : CMP.b #$80 : BCS .not_out_of_bounds_Down
LDA.b #-10 : STA.w SprYSpeed : STA SprYRound ; Reverse the direction
; Modify the neck position
@@ -473,7 +472,7 @@ StopIfOutOfBounds:
LDA $19F4 : CLC : ADC #$04 : STA $19F4
.notOutOfBoundsDown
.not_out_of_bounds_Down
SEP #$20
RTS