Sprite housekeeping

This commit is contained in:
scawful
2024-10-04 09:12:17 -04:00
parent e22303cb74
commit 1d0f140ced
3 changed files with 24 additions and 36 deletions

View File

@@ -56,12 +56,10 @@ Sprite_EonScrub_Long:
Sprite_EonScrub_Prep: Sprite_EonScrub_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.w SprSubtype, X : CMP #$01 : BNE .normal_scrub LDA.w SprSubtype, X : CMP #$01 : BNE .normal_scrub
LDA.b #$06 : STA.w SprAction, X ; Pea Shot State LDA.b #$06 : STA.w SprAction, X ; Pea Shot State
LDA.b #$20 : STA.b SprPrize, X LDA.b #$20 : STA.b SprPrize, X
.normal_scrub .normal_scrub
PLB PLB
RTL RTL
} }

View File

@@ -37,7 +37,6 @@
Sprite_Goriya_Long: Sprite_Goriya_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
LDA.w SprSubtype, X : BEQ + LDA.w SprSubtype, X : BEQ +
JSR Sprite_Boomerang_Draw JSR Sprite_Boomerang_Draw
JMP ++ JMP ++
@@ -45,14 +44,11 @@ Sprite_Goriya_Long:
JSR Sprite_Goriya_Draw JSR Sprite_Goriya_Draw
JSL Sprite_DrawShadow JSL Sprite_DrawShadow
++ ++
JSL Sprite_CheckActive ; Check if game is not paused JSL Sprite_CheckActive : BCC .SpriteIsNotActive
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
JSR Sprite_Goriya_Main ; Call the main sprite code JSR Sprite_Goriya_Main ; Call the main sprite code
.SpriteIsNotActive .SpriteIsNotActive
PLB ; Get back the databank we stored previously PLB
RTL ; Go back to original code RTL
} }
; ========================================================= ; =========================================================
@@ -329,7 +325,6 @@ Sprite_Goriya_Draw:
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
PLX PLX
@@ -398,7 +393,6 @@ Sprite_Boomerang_Draw:
.nextTile .nextTile
PHX ; Save current Tile Index? PHX ; Save current Tile Index?
TXA : CLC : ADC $06 ; Add Animation Index Offset TXA : CLC : ADC $06 ; Add Animation Index Offset
PHA ; Keep the value with animation index offset? PHA ; Keep the value with animation index offset?
@@ -426,13 +420,9 @@ Sprite_Boomerang_Draw:
LDA .properties, X : ORA $08 : STA ($90), Y LDA .properties, X : ORA $08 : STA ($90), Y
PHY PHY
TYA : LSR #2 : TAY TYA : LSR #2 : TAY
LDA #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer LDA #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY PLY : INY
PLX : DEX : BPL .nextTile PLX : DEX : BPL .nextTile
PLX PLX
@@ -455,3 +445,4 @@ Sprite_Boomerang_Draw:
db $E2 db $E2
db $62 db $62
} }

View File

@@ -45,7 +45,6 @@ Sprite_Poltergeist_Long:
.onscreen .onscreen
JSL Sprite_CheckActive ; Check if game is not paused JSL Sprite_CheckActive ; Check if game is not paused
BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive
JSR Sprite_Poltergeist_Main ; Call the main sprite code JSR Sprite_Poltergeist_Main ; Call the main sprite code