setup korok subsprites makar, hollo, rown
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
; =========================================================
|
; =========================================================
|
||||||
; Korok Sprite
|
; Korok Sprite
|
||||||
|
|
||||||
!SPRID = $B1 ; The sprite ID you are overwriting (HEX)
|
!SPRID = $F1 ; The sprite ID you are overwriting (HEX)
|
||||||
!NbrTiles = 08 ; Number of tiles used in a frame
|
!NbrTiles = 08 ; Number of tiles used in a frame
|
||||||
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
|
!Harmless = 01 ; 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
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation
|
||||||
!ImperviousAll = 01 ; 00 = Can be attack, 01 = attack will clink on it
|
!ImperviousAll = 01 ; 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
|
||||||
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
|
!Shadow = 01 ; 00 = don't draw shadow, 01 = draw a shadow
|
||||||
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
!Palette = 00 ; Unused in this template (can be 0 to 7)
|
||||||
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
|
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
|
||||||
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
!Persist = 01 ; 01 = your sprite continue to live offscreen
|
||||||
@@ -39,16 +39,17 @@ Sprite_Korok_Long:
|
|||||||
CMP.b #$01 : BEQ .draw_hollo
|
CMP.b #$01 : BEQ .draw_hollo
|
||||||
CMP.b #$02 : BEQ .draw_rown
|
CMP.b #$02 : BEQ .draw_rown
|
||||||
.draw_makar
|
.draw_makar
|
||||||
JSL Sprite_Korok_DrawMakar
|
JSR Sprite_Korok_DrawMakar
|
||||||
BRA .done
|
BRA .done
|
||||||
.draw_hollo
|
.draw_hollo
|
||||||
JSL Sprite_Korok_DrawHollo
|
JSR Sprite_Korok_DrawHollo
|
||||||
BRA .done
|
BRA .done
|
||||||
.draw_rown
|
.draw_rown
|
||||||
JSL Sprite_Korok_DrawRown
|
JSR Sprite_Korok_DrawRown
|
||||||
BRA .done
|
BRA .done
|
||||||
.done
|
.done
|
||||||
|
|
||||||
|
JSL Sprite_DrawShadow
|
||||||
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
|
||||||
|
|
||||||
@@ -63,8 +64,8 @@ Sprite_Korok_Prep:
|
|||||||
{
|
{
|
||||||
PHB : PHK : PLB
|
PHB : PHK : PLB
|
||||||
|
|
||||||
LDA SprSubtype, X : STA.w SprAction,X
|
JSL GetRandomInt : AND.b #$02 : STA.w SprSubtype, X
|
||||||
|
STZ.w SprMiscE, X
|
||||||
PLB
|
PLB
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
@@ -72,6 +73,8 @@ Sprite_Korok_Prep:
|
|||||||
|
|
||||||
Sprite_Korok_Main:
|
Sprite_Korok_Main:
|
||||||
{
|
{
|
||||||
|
JSL Sprite_PlayerCantPassThrough
|
||||||
|
|
||||||
LDA.w SprAction, X
|
LDA.w SprAction, X
|
||||||
JSL UseImplicitRegIndexedLocalJumpTable
|
JSL UseImplicitRegIndexedLocalJumpTable
|
||||||
|
|
||||||
@@ -79,15 +82,54 @@ Sprite_Korok_Main:
|
|||||||
|
|
||||||
Sprite_Korok_Idle:
|
Sprite_Korok_Idle:
|
||||||
{
|
{
|
||||||
|
LDA.w SprMiscE, X : BNE +
|
||||||
|
PHX
|
||||||
|
JSL ApplyKorokSpriteSheets
|
||||||
|
PLX
|
||||||
|
LDA.b #$01 : STA.w SprMiscE, X
|
||||||
|
+
|
||||||
%PlayAnimation(0, 0, 10)
|
%PlayAnimation(0, 0, 10)
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Sprite_Korok_WalkingDown:
|
||||||
|
{
|
||||||
|
|
||||||
|
%PlayAnimation(0, 2, 10)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
Sprite_Korok_WalkingUp:
|
||||||
|
{
|
||||||
|
|
||||||
|
%PlayAnimation(3, 5, 10)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
Sprite_Korok_WalkingLeft:
|
||||||
|
{
|
||||||
|
|
||||||
|
%PlayAnimation(6, 8, 10)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
|
Sprite_Korok_WalkingRight:
|
||||||
|
{
|
||||||
|
|
||||||
|
%PlayAnimation(9, 11, 10)
|
||||||
|
RTS
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
; =========================================================
|
; =========================================================
|
||||||
; Korok Draw Codes
|
; Korok Draw Codes
|
||||||
|
|
||||||
|
; 0-2 : Walking Down
|
||||||
|
; 3-5 : Walking Up
|
||||||
|
; 6-8 : Walking Left
|
||||||
|
; 9-11 : Walking Right
|
||||||
|
|
||||||
Sprite_Korok_DrawMakar:
|
Sprite_Korok_DrawMakar:
|
||||||
{
|
{
|
||||||
JSL Sprite_PrepOamCoord
|
JSL Sprite_PrepOamCoord
|
||||||
|
|||||||
Reference in New Issue
Block a user