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