From 9eb715e85b0211cf3c769fcb41d094d2631d52f5 Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 25 Jan 2024 19:24:20 -0500 Subject: [PATCH] Add korok sprite template --- Sprites/korok.asm | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Sprites/korok.asm diff --git a/Sprites/korok.asm b/Sprites/korok.asm new file mode 100644 index 0000000..7a9a82e --- /dev/null +++ b/Sprites/korok.asm @@ -0,0 +1,72 @@ +; Korok Sprite + +!SPRID = $00 ; The sprite ID you are overwriting (HEX) +!NbrTiles = 08 ; Number of tiles used in a frame +!Harmless = 01 ; 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 +!Damage = 00 ; (08 is a whole heart), 04 is half heart +!DeathAnimation = 00 ; 00 = normal death, 01 = no death animation +!ImperviousAll = 01 ; 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 +!Palette = 00 ; Unused in this template (can be 0 to 7) +!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool +!Persist = 01 ; 01 = your sprite continue to live offscreen +!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room) +!CollisionLayer = 00 ; 01 = will check both layer for collision +!CanFall = 00 ; 01 sprite can fall in hole, 01 = can't fall +!DeflectArrow = 00 ; 01 = deflect arrows +!WaterSprite = 00 ; 01 = can only walk shallow water +!Blockable = 00 ; 01 = can be blocked by link's shield? +!Prize = 00 ; 00-15 = the prize pack the sprite will drop from +!Sound = 00 ; 01 = Play different sound when taking damage +!Interaction = 00 ; ?? No documentation +!Statue = 00 ; 01 = Sprite is statue +!DeflectProjectiles = 00 ; 01 = Sprite will deflect ALL projectiles +!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_Korok_Prep, Sprite_Korok_Long) + +Sprite_Korok_Long: +{ + PHB : PHK : PLB + + JSR Sprite_Korok_Draw ; Call the draw code + JSL Sprite_CheckActive ; Check if game is not paused + BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive + + JSR Sprite_Korok_Main ; Call the main sprite code + + .SpriteIsNotActive + PLB ; Get back the databank we stored previously + RTL ; Go back to original code +} + +Sprite_Korok_Prep: +{ + PHB : PHK : PLB + + LDA SprSubtype,X : STA SprAction,X + + PLB + RTL +} + + +Sprite_Korok_Main: +{ + LDA.w SprAction, X + JSL UseImplicitRegIndexedLocalJumpTable + + dw Sprite_Korok_Idle + + Sprite_Korok_Idle: + { + + RTS + } + +}