cleanup deku scrub enemy sprite
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
!NbrTiles = 03 ; Number of tiles used in a frame
|
!NbrTiles = 03 ; Number of tiles used in a frame
|
||||||
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
||||||
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
|
||||||
!Health = 00 ; Number of Health the sprite have
|
!Health = 08 ; Number of Health the sprite have
|
||||||
!Damage = 00 ; (08 is a whole heart), 04 is half heart
|
!Damage = 04 ; (08 is a whole heart), 04 is half heart
|
||||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||||
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
!ImperviousAll = 00 ; 00 = Can be attack, 01 = attack will clink on it
|
||||||
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
|
||||||
@@ -77,6 +77,7 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
|
|
||||||
dw DekuScrubEnemy_PeaShot
|
dw DekuScrubEnemy_PeaShot
|
||||||
|
|
||||||
|
; 0x00
|
||||||
DekuScrubEnemy_Hiding:
|
DekuScrubEnemy_Hiding:
|
||||||
{
|
{
|
||||||
%StartOnFrame(13)
|
%StartOnFrame(13)
|
||||||
@@ -98,6 +99,7 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x01
|
||||||
DekuScrubEnemy_Attack:
|
DekuScrubEnemy_Attack:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
@@ -114,36 +116,25 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
LDA SprX, X : STA $04
|
LDA SprX, X : STA $04
|
||||||
LDA SprY, X : STA $05
|
LDA SprY, X : STA $05
|
||||||
JSR GetDistance8bit : CMP #$18 : BCS .not_too_close
|
JSR GetDistance8bit : CMP #$18 : BCS .not_too_close
|
||||||
|
|
||||||
|
|
||||||
%GotoAction(0)
|
%GotoAction(0)
|
||||||
.not_too_close
|
.not_too_close
|
||||||
|
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x02
|
||||||
DekuScrubEnemy_PostAttack:
|
DekuScrubEnemy_PostAttack:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0,0,4)
|
%PlayAnimation(0,0,4)
|
||||||
|
|
||||||
#_05BE49: LDA.w $0D10,X
|
LDA.w $0D10,X : STA.b $00
|
||||||
#_05BE4F: STA.b $00
|
LDA.w $0D30,X : STA.b $08
|
||||||
|
|
||||||
#_05BE51: LDA.w $0D30,X
|
LDA.b #$04 : STA.b $02
|
||||||
#_05BE56: STA.b $08
|
STZ $03
|
||||||
|
|
||||||
#_05BE58: LDA.b #$04
|
|
||||||
#_05BE5A: STA.b $02
|
|
||||||
#_05BE5C: STZ $03
|
|
||||||
|
|
||||||
#_05BE5E: LDA.w $0D00,X
|
|
||||||
#_05BE64: STA.b $01
|
|
||||||
|
|
||||||
#_05BE66: LDA.w $0D20,X
|
|
||||||
#_05BE6B: STA.b $09
|
|
||||||
|
|
||||||
|
LDA.w $0D00,X : STA.b $01
|
||||||
|
LDA.w $0D20,X : STA.b $09
|
||||||
|
|
||||||
LDA Offspring1_Id : TAY
|
LDA Offspring1_Id : TAY
|
||||||
JSR Sprite_SetupHitBox
|
JSR Sprite_SetupHitBox
|
||||||
@@ -157,15 +148,14 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
; If the pea shot and deku scrub hitboxes intersect
|
; If the pea shot and deku scrub hitboxes intersect
|
||||||
; We will go to recoil
|
; We will go to recoil
|
||||||
|
|
||||||
|
|
||||||
; However, he may also dodge it and try to attack
|
; However, he may also dodge it and try to attack
|
||||||
; So if he gets too close, we go back to hiding
|
; So if he gets too close, we go back to hiding
|
||||||
%GotoAction(0)
|
%GotoAction(0)
|
||||||
|
|
||||||
.not_done
|
.not_done
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x03
|
||||||
DekuScrubEnemy_Recoil:
|
DekuScrubEnemy_Recoil:
|
||||||
{
|
{
|
||||||
%StartOnFrame(3)
|
%StartOnFrame(3)
|
||||||
@@ -180,6 +170,7 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x04
|
||||||
DekuScrubEnemy_Dazed:
|
DekuScrubEnemy_Dazed:
|
||||||
{
|
{
|
||||||
%StartOnFrame(8)
|
%StartOnFrame(8)
|
||||||
@@ -192,16 +183,17 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x05
|
||||||
DekuScrubEnemy_Subdued:
|
DekuScrubEnemy_Subdued:
|
||||||
{
|
{
|
||||||
%StartOnFrame(7)
|
%StartOnFrame(7)
|
||||||
%PlayAnimation(7,7,1)
|
%PlayAnimation(7,7,1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; 0x06
|
||||||
DekuScrubEnemy_PeaShot:
|
DekuScrubEnemy_PeaShot:
|
||||||
{
|
{
|
||||||
%StartOnFrame(10)
|
%StartOnFrame(10)
|
||||||
@@ -211,18 +203,12 @@ Sprite_DekuScrubEnemy_Main:
|
|||||||
|
|
||||||
JSL Sprite_MoveVert
|
JSL Sprite_MoveVert
|
||||||
|
|
||||||
|
JSL Sprite_CheckDamageFromPlayerLong : BCC .no_damage
|
||||||
|
|
||||||
JSL Sprite_CheckDamageFromPlayerLong
|
|
||||||
BCC .no_damage
|
|
||||||
; Apply force in the opposite direction
|
; Apply force in the opposite direction
|
||||||
LDA #-16 : STA SprYSpeed, X
|
LDA #-16 : STA SprYSpeed, X
|
||||||
|
|
||||||
.no_damage
|
.no_damage
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SpawnPeaShot:
|
SpawnPeaShot:
|
||||||
@@ -257,7 +243,6 @@ SpawnPeaShot:
|
|||||||
|
|
||||||
PLX
|
PLX
|
||||||
|
|
||||||
|
|
||||||
.return
|
.return
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user