Sprites housekeeping
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
||||
!Hitbox = $0D ; 00 to 31, can be viewed in sprite draw tool
|
||||
!Persist = 00 ; 01 = your sprite continue to live offscreen
|
||||
@@ -76,7 +76,6 @@ Sprite_DekuLeaf_Main:
|
||||
JSL UseImplicitRegIndexedLocalJumpTable
|
||||
|
||||
dw WaitForPlayer
|
||||
|
||||
dw Whirlpool_Main
|
||||
|
||||
WaitForPlayer:
|
||||
@@ -92,7 +91,6 @@ Sprite_DekuLeaf_Main:
|
||||
RTS
|
||||
}
|
||||
|
||||
|
||||
Whirlpool_Main:
|
||||
{
|
||||
%PlayAnimation(0, 2, 10)
|
||||
@@ -100,9 +98,9 @@ Sprite_DekuLeaf_Main:
|
||||
|
||||
LDA $0AAB : BEQ .not_on
|
||||
|
||||
STZ $55 ; Reset cape flag
|
||||
STZ $0AAB ; Reset underwater flag
|
||||
STZ $0351 ; Reset ripple flag
|
||||
STZ $55 ; Reset cape flag
|
||||
STZ $0AAB ; Reset underwater flag
|
||||
STZ $0351 ; Reset ripple flag
|
||||
STZ $037B ; Reset invincibility flag
|
||||
STZ $02B2
|
||||
|
||||
@@ -151,7 +149,6 @@ Sprite_DekuLeaf_Main:
|
||||
.exit
|
||||
RTS
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
@@ -173,17 +170,17 @@ Sprite_DekuLeaf_Draw:
|
||||
.nextTile
|
||||
|
||||
PHX ; Save current Tile Index?
|
||||
|
||||
|
||||
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
||||
|
||||
PHA ; Keep the value with animation index offset?
|
||||
|
||||
ASL A : TAX
|
||||
ASL A : TAX
|
||||
|
||||
REP #$20
|
||||
|
||||
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
|
||||
AND.w #$0100 : STA $0E
|
||||
AND.w #$0100 : STA $0E
|
||||
INY
|
||||
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
|
||||
CLC : ADC #$0010 : CMP.w #$0100
|
||||
@@ -200,14 +197,14 @@ Sprite_DekuLeaf_Draw:
|
||||
INY
|
||||
LDA .properties, X : STA ($90), Y
|
||||
|
||||
PHY
|
||||
|
||||
PHY
|
||||
|
||||
TYA : LSR #2 : TAY
|
||||
|
||||
|
||||
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||
|
||||
|
||||
PLY : INY
|
||||
|
||||
|
||||
PLX : DEX : BPL .nextTile
|
||||
|
||||
PLX
|
||||
@@ -246,17 +243,17 @@ Sprite_Whirlpool_Draw:
|
||||
.nextTile
|
||||
|
||||
PHX ; Save current Tile Index?
|
||||
|
||||
|
||||
TXA : CLC : ADC $06 ; Add Animation Index Offset
|
||||
|
||||
PHA ; Keep the value with animation index offset?
|
||||
|
||||
ASL A : TAX
|
||||
ASL A : TAX
|
||||
|
||||
REP #$20
|
||||
|
||||
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
|
||||
AND.w #$0100 : STA $0E
|
||||
AND.w #$0100 : STA $0E
|
||||
INY
|
||||
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
|
||||
CLC : ADC #$0010 : CMP.w #$0100
|
||||
@@ -273,14 +270,14 @@ Sprite_Whirlpool_Draw:
|
||||
INY
|
||||
LDA .properties, X : STA ($90), Y
|
||||
|
||||
PHY
|
||||
|
||||
PHY
|
||||
|
||||
TYA : LSR #2 : TAY
|
||||
|
||||
|
||||
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||
|
||||
|
||||
PLY : INY
|
||||
|
||||
|
||||
PLX : DEX : BPL .nextTile
|
||||
|
||||
PLX
|
||||
@@ -309,4 +306,4 @@ Sprite_Whirlpool_Draw:
|
||||
db $29, $29, $29, $29
|
||||
db $69, $69, $69, $69
|
||||
db $A9, $A9, $A9, $A9
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user