More Sprite action formatting
This commit is contained in:
@@ -86,102 +86,98 @@ Sprite_Kydreeok_Main:
|
|||||||
; 0x00
|
; 0x00
|
||||||
Kydreeok_Start:
|
Kydreeok_Start:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0, 2, 10)
|
%PlayAnimation(0, 2, 10)
|
||||||
|
|
||||||
JSR ApplyPalette
|
JSR ApplyPalette
|
||||||
JSL Sprite_PlayerCantPassThrough
|
JSL Sprite_PlayerCantPassThrough
|
||||||
|
|
||||||
LDA SprTimerA, X : BNE .continue
|
LDA SprTimerA, X : BNE .continue
|
||||||
TXA : STA Kydreeok_Id
|
TXA : STA Kydreeok_Id
|
||||||
LDA #$40 : STA SprTimerA, X
|
LDA #$40 : STA SprTimerA, X
|
||||||
%GotoAction(1)
|
%GotoAction(1)
|
||||||
.continue
|
.continue
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------------------------------
|
; -------------------------------------------------------
|
||||||
; 0x01
|
; 0x01
|
||||||
Kydreeok_StageControl:
|
Kydreeok_StageControl:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0, 2, 10)
|
%PlayAnimation(0, 2, 10)
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
|
|
||||||
STZ $0D40 : STZ $0D50 ;set velocitys to 0
|
STZ $0D40 : STZ $0D50 ;set velocitys to 0
|
||||||
JSR MoveBody
|
JSR MoveBody
|
||||||
|
|
||||||
JSL Sprite_BounceFromTileCollision ;
|
JSL Sprite_BounceFromTileCollision ;
|
||||||
JSR StopIfOutOfBounds
|
JSR StopIfOutOfBounds
|
||||||
|
|
||||||
LDA SprTimerA, X : BNE .continue
|
LDA SprTimerA, X : BNE .continue
|
||||||
%GotoAction(2)
|
%GotoAction(2)
|
||||||
.continue
|
.continue
|
||||||
|
|
||||||
PLX
|
PLX
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------------------------------
|
; -------------------------------------------------------
|
||||||
; 0x02
|
; 0x02
|
||||||
Kydreeok_MoveXandY:
|
Kydreeok_MoveXandY:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0, 2, 10)
|
%PlayAnimation(0, 2, 10)
|
||||||
|
|
||||||
PHX ;saves X so we can use it later
|
PHX ;saves X so we can use it later
|
||||||
|
|
||||||
LDA $36
|
LDA $36
|
||||||
JSL Sprite_ApplySpeedTowardsPlayer
|
JSL Sprite_ApplySpeedTowardsPlayer
|
||||||
JSL Sprite_BounceFromTileCollision ; JSR StopIfOutOfBounds
|
JSL Sprite_BounceFromTileCollision ; JSR StopIfOutOfBounds
|
||||||
JSR StopIfOutOfBounds
|
JSR StopIfOutOfBounds
|
||||||
JSR MoveBody
|
JSR MoveBody
|
||||||
|
|
||||||
JSL Sprite_CheckDamageFromPlayerLong
|
JSL Sprite_CheckDamageFromPlayerLong
|
||||||
%DoDamageToPlayerSameLayerOnContact()
|
%DoDamageToPlayerSameLayerOnContact()
|
||||||
|
|
||||||
PLX ;restores X
|
PLX ;restores X
|
||||||
|
|
||||||
%GotoAction(4)
|
%GotoAction(4)
|
||||||
|
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------------------------------
|
; -------------------------------------------------------
|
||||||
; 0x03
|
; 0x03
|
||||||
Kydreeok_MoveXorY:
|
Kydreeok_MoveXorY:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0, 2, 10)
|
%PlayAnimation(0, 2, 10)
|
||||||
|
|
||||||
PHX ;saves X so we can use it later
|
PHX
|
||||||
|
LDA $36 : STA $00
|
||||||
|
JSR Sprite_ApplySpeedTowardsPlayerXOrY
|
||||||
|
JSL Sprite_BounceFromTileCollision ; JSR StopIfOutOfBounds
|
||||||
|
JSR StopIfOutOfBounds
|
||||||
|
JSR MoveBody
|
||||||
|
|
||||||
LDA $36
|
JSL Sprite_CheckDamageFromPlayerLong
|
||||||
STA $00
|
%DoDamageToPlayerSameLayerOnContact()
|
||||||
JSR Sprite_ApplySpeedTowardsPlayerXOrY
|
PLX
|
||||||
JSL Sprite_BounceFromTileCollision ; JSR StopIfOutOfBounds
|
|
||||||
JSR StopIfOutOfBounds
|
|
||||||
JSR MoveBody
|
|
||||||
|
|
||||||
JSL Sprite_CheckDamageFromPlayerLong
|
%GotoAction(4)
|
||||||
%DoDamageToPlayerSameLayerOnContact()
|
RTS
|
||||||
|
|
||||||
PLX ;restores X
|
|
||||||
|
|
||||||
%GotoAction(4)
|
|
||||||
|
|
||||||
RTS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; -------------------------------------------------------
|
; -------------------------------------------------------
|
||||||
; 0x04
|
; 0x04
|
||||||
Kydreeok_KeepWalking:
|
Kydreeok_KeepWalking:
|
||||||
{
|
{
|
||||||
%StartOnFrame(0)
|
%StartOnFrame(0)
|
||||||
%PlayAnimation(0, 2, 10)
|
%PlayAnimation(0, 2, 10)
|
||||||
|
|
||||||
PHX
|
PHX
|
||||||
REP #$20
|
REP #$20
|
||||||
|
|||||||
Reference in New Issue
Block a user