include booki and thunder ghost in game

This commit is contained in:
scawful
2024-06-14 19:46:29 -04:00
parent 26f7b28ae3
commit 5115f1a01d
3 changed files with 72 additions and 19 deletions

View File

@@ -2,8 +2,8 @@
; Sprite Properties
; =========================================================
!SPRID = $00; The sprite ID you are overwriting (HEX)
!NbrTiles = 00 ; Number of tiles used in a frame
!SPRID = $CC ; The sprite ID you are overwriting (HEX)
!NbrTiles = 00 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
!Health = 00 ; Number of Health the sprite have
@@ -29,7 +29,9 @@
!ImperviousArrow = 00 ; 01 = Impervious to arrows
!ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_Booki_Prep, Sprite_Booki_Long);
%Set_Sprite_Properties(Sprite_Booki_Prep, Sprite_Booki_Long)
; =========================================================
Sprite_Booki_Long:
@@ -53,7 +55,7 @@ Sprite_Booki_Prep:
{
PHB : PHK : PLB
; Add more code here to initialize data
LDA.b #$80 : STA.w SprDefl, X
PLB
RTL
@@ -65,13 +67,53 @@ Sprite_Booki_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
dw Action00
dw StalkPlayer
dw HideFromPlayer
dw HiddenFromPlayer
dw ApproachPlayer
Action00:
StalkPlayer:
{
%PlayAnimation(0,1,16)
RTS
}
RTS
HideFromPlayer:
{
%PlayAnimation(0,5,16)
RTS
}
HiddenFromPlayer:
{
%PlayAnimation(5,5,16)
RTS
}
ApproachPlayer:
{
%PlayAnimation(6,10,16)
}
}
Sprite_Booki_Move:
{
JSL Sprite_Move
JSL Sprite_BounceFromTileCollision
JSL Sprite_PlayerCantPassThrough
LDA.w SprMiscB, X
JSL UseImplicitRegIndexedLocalJumpTable
dw SlowFloat
SlowFloat:
{
RTS
}
}

View File

@@ -2,8 +2,8 @@
; Sprite Properties
; =========================================================
!SPRID = $00; The sprite ID you are overwriting (HEX)
!NbrTiles = 00 ; Number of tiles used in a frame
!SPRID = $CD ; The sprite ID you are overwriting (HEX)
!NbrTiles = 02 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
!Health = 00 ; Number of Health the sprite have
@@ -34,6 +34,7 @@
; =========================================================
Sprite_ThunderGhost_Long:
{
PHB : PHK : PLB
JSR Sprite_ThunderGhost_Draw ; Call the draw code
@@ -45,35 +46,40 @@ Sprite_ThunderGhost_Long:
.SpriteIsNotActive
PLB ; Get back the databank we stored previously
RTL ; Go back to original code
}
Sprite_ThunderGhost_Prep:
Sprite_ThunderGhost_Prep:
{
PHB : PHK : PLB
; Add more code here to initialize data
PLB
RTL
}
; =========================================================
Sprite_ThunderGhost_Main:
LDA.w SprAction, X; Load the SprAction
JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in
dw Action00
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
dw ThunderGhostHandler
Action00:
ThunderGhostHandler:
{
%PlayAnimation(0, 7, 16)
RTS
RTS
}
}
; =========================================================
Sprite_ThunderGhost_Draw:
{
JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer
@@ -179,3 +185,4 @@ Sprite_ThunderGhost_Draw:
db $02, $00, $00
db $02, $00, $00
db $02, $00, $00
}

View File

@@ -100,6 +100,10 @@ print "End of sea_urchin.asm ", pc
incsrc "Sprites/Enemies/helmet_chuchu.asm"
print "End of helmet_chuchu.asm ", pc
incsrc "Sprites/Enemies/booki.asm"
incsrc "Sprites/Enemies/thunder_ghost.asm"
incsrc "Sprites/Objects/switch_track.asm"
print "End of switch_track.asm ", pc