Cleanup Kydrog NPC
This commit is contained in:
@@ -32,33 +32,25 @@
|
||||
|
||||
%Set_Sprite_Properties(Sprite_Kydrog_Prep, Sprite_Kydrog_Long)
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Kydrog_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
JSR Sprite_Kydrog_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_Kydrog_Main ; Call the main sprite code
|
||||
|
||||
JSR Sprite_Kydrog_Draw
|
||||
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
|
||||
JSR Sprite_Kydrog_Main
|
||||
.SpriteIsNotActive
|
||||
PLB ; Get back the databank we stored previously
|
||||
RTL ; Go back to original code
|
||||
PLB
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Kydrog_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
LDA.l $7EF300
|
||||
BEQ .PlayIntro
|
||||
LDA.l $7EF300 : BEQ .PlayIntro
|
||||
STZ.w $0DD0, X ; Kill the sprite
|
||||
.PlayIntro
|
||||
|
||||
PLB
|
||||
RTL
|
||||
}
|
||||
@@ -75,7 +67,6 @@ Sprite_Kydrog_Main:
|
||||
dw Kydrog_SpawnOffspring
|
||||
dw Kydrog_WarpPlayerAway
|
||||
|
||||
|
||||
Kydrog_StartCutscene:
|
||||
{
|
||||
LDA #$03 : STA $012C ; Play music
|
||||
@@ -158,18 +149,14 @@ Sprite_Kydrog_Draw:
|
||||
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
|
||||
LDA .start_index, Y : STA $06
|
||||
|
||||
|
||||
PHX
|
||||
LDX .nbr_of_tiles, Y ;amount of tiles -1
|
||||
LDY.b #$00
|
||||
.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
|
||||
|
||||
REP #$20
|
||||
@@ -193,13 +180,9 @@ Sprite_Kydrog_Draw:
|
||||
LDA .properties, X : STA ($90), Y
|
||||
|
||||
PHY
|
||||
|
||||
TYA : LSR #2 : TAY
|
||||
|
||||
LDA.b #$02 : ORA $0F : STA ($92), Y ; store size in oam buffer
|
||||
|
||||
PLY : INY
|
||||
|
||||
PLX : DEX : BPL .nextTile
|
||||
|
||||
PLX
|
||||
|
||||
Reference in New Issue
Block a user