diff --git a/Sprites/NPCs/piratian.asm b/Sprites/NPCs/piratian.asm index 18cdcbe..8b42e9f 100644 --- a/Sprites/NPCs/piratian.asm +++ b/Sprites/NPCs/piratian.asm @@ -11,7 +11,7 @@ !DeathAnimation = 00 ; 00 = normal death, 01 = no death animation !ImperviousAll = 00 ; 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 +!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 = 00 ; 01 = your sprite continue to live offscreen @@ -29,23 +29,19 @@ !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_Piratian_Prep, Sprite_Piratian_Long); -; ========================================================= + +%Set_Sprite_Properties(Sprite_Piratian_Prep, Sprite_Piratian_Long) Sprite_Piratian_Long: { PHB : PHK : PLB - - JSR Sprite_Piratian_Draw ; Call the draw code - JSL Sprite_DrawShadow ; Draw the shadow - JSL Sprite_CheckActive ; Check if game is not paused - BCC .SpriteIsNotActive ; Skip Main code is sprite is innactive - - JSR Sprite_Piratian_Main ; Call the main sprite code - + JSR Sprite_Piratian_Draw + JSL Sprite_DrawShadow + JSL Sprite_CheckActive : BCC .SpriteIsNotActive + JSR Sprite_Piratian_Main .SpriteIsNotActive - PLB ; Get back the databank we stored previously - RTL ; Go back to original code + PLB + RTL } ; ========================================================= @@ -53,7 +49,6 @@ Sprite_Piratian_Long: Sprite_Piratian_Prep: { PHB : PHK : PLB - PLB RTL @@ -111,7 +106,7 @@ Sprite_Piratian_Move: { LDA.w SprTimerA, X : BNE + JSL Sprite_SelectNewDirection - TYA + TYA CMP.b #$03 : BCC ++ SEC : SBC.b #$03 ++ @@ -149,17 +144,16 @@ Sprite_Piratian_Draw: .nextTile PHX ; Save current Tile Index? - TXA : CLC : ADC $06 ; Add Animation Index Offset PHA ; Keep the value with animation index offset? - ASL A : TAX + ASL A : TAX REP #$20 LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y - AND.w #$0100 : STA $0E + AND.w #$0100 : STA $0E INY LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y CLC : ADC #$0010 : CMP.w #$0100 @@ -176,14 +170,10 @@ Sprite_Piratian_Draw: INY LDA .properties, X : STA ($90), Y - PHY - + PHY TYA : LSR #2 : TAY - LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer - PLY : INY - PLX : DEX : BPL .nextTile PLX @@ -251,4 +241,5 @@ Sprite_Piratian_Draw: db $02 db $02 db $02 -} \ No newline at end of file +} +