Sprite housekeeping

This commit is contained in:
scawful
2025-01-18 10:59:45 -05:00
parent a6eac7dc4f
commit 90225c3b4a
6 changed files with 529 additions and 614 deletions

View File

@@ -48,8 +48,6 @@ Sprite_Kydreeok_Long:
RTL
}
; =========================================================
Sprite_Kydreeok_Prep:
{
PHB : PHK : PLB
@@ -121,8 +119,6 @@ MaybeRespawnHead:
RTS
}
; =========================================================
Sprite_Kydreeok_Main:
{
%SpriteJumpTable(Kydreeok_Start,

View File

@@ -29,7 +29,7 @@
!ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_BusinessScrub_Prep, Sprite_BusinessScrub_Long);
%Set_Sprite_Properties(Sprite_BusinessScrub_Prep, Sprite_BusinessScrub_Long)
Sprite_BusinessScrub_Long:
{
@@ -60,7 +60,7 @@ Sprite_BusinessScrub_Prep:
{
PHB : PHK : PLB
LDA.w SprSubtype, X : CMP.b #$01 : BEQ .pea_shot
CMP.b #$02 : BEQ .cutscene_scrub
CMP.b #$02 : BEQ .cutscene_scrub
JMP +
.pea_shot
LDA.b #$06 : STA.w SprAction, X ; Pea Shot State

File diff suppressed because it is too large Load Diff

View File

@@ -43,13 +43,7 @@ RanchGirl_TeachSong:
.not_started
.running_dialog
.has_song
LDA.b $1A
LSR A
LSR A
LSR A
LSR A
AND.b #$01
STA.w $0DC0,X
LDA.b $1A : LSR #4 : AND.b #$01 : STA.w $0DC0,X
RTL
}

View File

@@ -34,7 +34,6 @@
Sprite_Vasu_Long:
{
PHB : PHK : PLB
LDA.w SprSubtype, X : BNE +
JSR Sprite_Vasu_Draw
JMP ++
@@ -43,7 +42,7 @@ Sprite_Vasu_Long:
++
JSL Sprite_DrawShadow
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
JSR Sprite_Vasu_Main
JSR Sprite_Vasu_Main
.SpriteIsNotActive
PLB
RTL

View File

@@ -35,13 +35,13 @@ Sprite_IceBlock_Long:
PHB : PHK : PLB
LDA.w SprMiscC, X : BEQ .not_being_pushed
STZ.w SprMiscC, X
STZ.b $5E ; Clear Links speed
STZ.b LinkSpeedTbl
STZ.b $48 ; Clear push actions bitfield
.not_being_pushed
LDA.w SprTimerA, X : BEQ .retain_momentum
LDA.b #$01 : STA.w SprMiscC, X
LDA.b #$84 : STA.b $48 ; Set statue and push block actions
LDA.b #$04 : STA.b $5E ; Slipping into pit speed
LDA.b #$04 : STA.b LinkSpeedTbl ; Slipping into pit speed
.retain_momentum
JSR Sprite_IceBlock_Draw
@@ -60,7 +60,6 @@ Sprite_IceBlock_Prep:
LDA.w SprY, X : STA.w SprMiscE, X
LDA.w SprXH, X : STA.w SprMiscF, X
LDA.w SprYH, X : STA.w SprMiscG, X
STZ.w SprDefl, X
PLB
RTL
@@ -110,6 +109,7 @@ Sprite_IceBlock_Main:
LDA.b $26 : STA.w SprMiscA, X
JSR ApplyPush
.push_cached
LDA.b #$07 : STA.w SprTimerA, X
STZ.b $5E
JSL Sprite_RepelDash
@@ -227,71 +227,36 @@ Statue_BlockSprites:
LDY.b #$0F
.next
LDA.w $0E20,Y
CMP.b #$1C ; SPRITE 1C
BEQ .skip
; SPRITE 1C
LDA.w $0E20, Y : CMP.b #$1C : BEQ .skip
CPY.w $0FA0 : BEQ .skip
TYA : EOR.b $1A : AND.b #$01 : BNE .skip
LDA.w SprState,Y : CMP.b #$09 : BCC .skip
CPY.w $0FA0
BEQ .skip
TYA
EOR.b $1A
AND.b #$01
BNE .skip
LDA.w SprState,Y
CMP.b #$09
BCC .skip
LDA.w SprX,Y
STA.b $04
LDA.w SprXH,Y
STA.b $05
LDA.w SprY,Y
STA.b $06
LDA.w SprYH,Y
STA.b $07
LDA.w SprX, Y : STA.b $04
LDA.w SprXH, Y : STA.b $05
LDA.w SprY, Y : STA.b $06
LDA.w SprYH, Y : STA.b $07
REP #$20
LDA.w SprCachedX
SEC
SBC.b $04
CLC
ADC.w #$000C
LDA.w SprCachedX : SEC : SBC.b $04 : CLC : ADC.w #$000C
CMP.w #$0018 : BCS .skip
CMP.w #$0018
BCS .skip
LDA.w SprCachedY
SEC
SBC.b $06
CLC
ADC.w #$000C
CMP.w #$0024
BCS .skip
LDA.w SprCachedY : SEC : SBC.b $06 : CLC : ADC.w #$000C
CMP.w #$0024 : BCS .skip
SEP #$20
LDA.b #$04
STA.w $0EA0,Y
LDA.b #$04 : STA.w $0EA0, Y
PHY
LDA.b #$20
JSL Sprite_CheckSlopedTileCollision ; JSR Sprite_ProjectSpeedTowardsLocation
PLY
LDA.b $00
STA.w SprYRecoil,Y
LDA.b $01
STA.w SprXRecoil,Y
LDA.b $00 : STA.w SprYRecoil, Y
LDA.b $01 : STA.w SprXRecoil, Y
.skip
SEP #$20