bulk replace SprX/SprY labels to all sprites, .w qualifiers on STAs

This commit is contained in:
scawful
2024-06-30 12:34:42 -04:00
parent 7c4e1841ec
commit 61dffd7017
26 changed files with 348 additions and 362 deletions

View File

@@ -62,7 +62,7 @@ Sprite_AntiKirby_Prep:
LDY $0FFF
LDA .bump_damage, Y : STA.w SprBump, X
LDA .health, Y : STA.w SprHealth, X
LDA .prize_pack, Y : STA SprPrize, X
LDA .prize_pack, Y : STA.w SprPrize, X
PLB
RTL
@@ -115,7 +115,7 @@ Sprite_AntiKirby_Main:
; Randomly Suck
JSL GetRandomInt : AND #$3F : BNE .not_done
LDA #$04 : STA SprTimerA, X
LDA #$04 : STA.w SprTimerA, X
%GotoAction(2)
RTS
.not_done
@@ -123,7 +123,7 @@ Sprite_AntiKirby_Main:
%PlayAnimation(0, 2, 10) ; Start
JSL Sprite_CheckDamageFromPlayerLong : BCC .NoDamage
LDA #!RecoilTime : STA SprTimerA, X
LDA #!RecoilTime : STA.w SprTimerA, X
%GotoAction(1) ; Hurt
RTS
.NoDamage
@@ -153,7 +153,7 @@ Sprite_AntiKirby_Main:
%PlayAnimation(4, 5, 10) ; Suck
JSL Sprite_CheckDamageFromPlayerLong : BCC .NoDamage
LDA #!RecoilTime : STA SprTimerA, X
LDA #!RecoilTime : STA.w SprTimerA, X
%GotoAction(1) ; Hurt
RTS
.NoDamage
@@ -235,7 +235,7 @@ Sprite_AntiKirby_Main:
JSL Sprite_PlayerCantPassThrough
JSL Sprite_CheckDamageFromPlayerLong : BCC .NoDamage
LDA #!RecoilTime : STA SprTimerA, X
LDA #!RecoilTime : STA.w SprTimerA, X
%GotoAction(6) ; Hurt
.NoDamage

View File

@@ -53,7 +53,7 @@ Sprite_DekuScrubEnemy_Prep:
PHB : PHK : PLB
LDA SprSubtype, X : CMP #$01 : BNE .normal_scrub
LDA.b #$06 : STA SprAction, X ; Pea Shot State
LDA.b #$06 : STA.w SprAction, X ; Pea Shot State
LDA.b #$20 : STA.b SprPrize, X
.normal_scrub
@@ -102,7 +102,7 @@ Sprite_DekuScrubEnemy_Main:
LDA SprY, X : STA $05
JSL GetDistance8bit_Long : CMP.b #$24 : BCC .too_close
; The player is below the scrub, so it should pop up
LDA #$20 : STA SprTimerA, X
LDA #$20 : STA.w SprTimerA, X
%GotoAction(1)
.too_close
.is_below_player
@@ -120,7 +120,7 @@ Sprite_DekuScrubEnemy_Main:
LDA SprTimerA, X : BNE .not_done
JSR SpawnPeaShot
LDA #$50 : STA SprTimerA, X
LDA #$50 : STA.w SprTimerA, X
INC.w SprAction, X
.not_done
@@ -166,7 +166,7 @@ Sprite_DekuScrubEnemy_Main:
; Play the spinning animation for a bit before proceeding
LDA SprTimerA, X : BNE .not_done
LDA #$40 : STA SprTimerA, X
LDA #$40 : STA.w SprTimerA, X
INC.w SprAction, X
.not_done
@@ -222,7 +222,7 @@ Sprite_DekuScrubEnemy_Main:
JSL Sprite_CheckDamageFromPlayerLong : BCC .no_damage
; Apply force in the opposite direction
LDA #-16 : STA SprYSpeed, X
LDA #-16 : STA.w SprYSpeed, X
.no_damage
RTS
}
@@ -258,14 +258,14 @@ DekuScrub_GiveRandomPrize:
CheckForPeaShotRedirect:
{
LDA.w $0D10, X : STA.b $00
LDA.w $0D30, X : STA.b $08
LDA.w SprX, X : STA.b $00
LDA.w SprXH, X : STA.b $08
LDA.b #$04 : STA.b $02
STZ $03
LDA.w $0D00, X : STA.b $01
LDA.w $0D20, X : STA.b $09
LDA.w SprY, X : STA.b $01
LDA.w SprYH, X : STA.b $09
PHX
LDA.w Offspring1_Id : TAX
@@ -305,19 +305,19 @@ SpawnPeaShot:
REP #$20
LDA $0FD8
SEP #$20
STA $0D10, Y : XBA : STA $0D30, Y
STA.w SprX, Y : XBA : STA.w SprXH, Y
REP #$20
LDA $0FDA : CLC : ADC.w #$000C
SEP #$20
STA $0D00, Y : XBA : STA $0D20, Y
STA.w SprY, Y : XBA : STA.w SprYH, Y
TYX
STZ $0D70, X
LDA #$10 : STA SprYSpeed, X
STA SprYRound, X
LDA #$10 : STA.w SprYSpeed, X
STA.w SprYRound, X
STX.w Offspring1_Id

View File

@@ -60,7 +60,7 @@ Sprite_HelmetChuchu_Prep:
PHB : PHK : PLB
LDA.b #$0C : STA.w SprHealth, X
JSL GetRandomInt : AND.b #$02 : STA SprAction, X
JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X
STZ.w SprMiscB, X
LDA.w SprAction, X : BNE +

View File

@@ -84,7 +84,7 @@ Sprite_PolsVoice_Main:
%DoDamageToPlayerSameLayerOnContact()
JSL GetRandomInt : AND #$3F : BNE .not_done
LDA #$04 : STA SprTimerA, X
LDA #$04 : STA.w SprTimerA, X
%GotoAction(1)
.not_done
@@ -102,9 +102,9 @@ Sprite_PolsVoice_Main:
LDA #$20 : STA.w SprXSpeed, X
BRA .not_left
.not_right
LDA #$E0 : STA SprXSpeed, X
LDA #$E0 : STA.w SprXSpeed, X
.not_left
LDA #$04 : STA SprTimerA, X
LDA #$04 : STA.w SprTimerA, X
%GotoAction(1)
.no_damage
RTS