Enemy housekeeping
This commit is contained in:
@@ -43,8 +43,6 @@ Sprite_AntiKirby_Long:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_AntiKirby_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
%Set_Sprite_Properties(Sprite_Booki_Prep, Sprite_Booki_Long)
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Booki_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -46,8 +44,6 @@ Sprite_Booki_Long:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Booki_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -61,8 +57,6 @@ Sprite_Booki_Prep:
|
||||
db $04, $08, $10, $18
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Booki_Main:
|
||||
{
|
||||
LDA.w SprAction, X
|
||||
@@ -76,16 +70,13 @@ Sprite_Booki_Main:
|
||||
StalkPlayer:
|
||||
{
|
||||
%PlayAnimation(0,1,16)
|
||||
|
||||
JSR Sprite_Booki_Move
|
||||
|
||||
RTS
|
||||
}
|
||||
|
||||
HideFromPlayer:
|
||||
{
|
||||
%PlayAnimation(0,4,16)
|
||||
|
||||
LDA.w SprTimerA, X : BNE +
|
||||
INC.w SprAction, X
|
||||
+
|
||||
@@ -95,9 +86,7 @@ Sprite_Booki_Main:
|
||||
HiddenFromPlayer:
|
||||
{
|
||||
%PlayAnimation(4,4,16)
|
||||
|
||||
JSR Sprite_Booki_Move
|
||||
|
||||
JSL GetRandomInt : AND.b #$03 : BEQ +
|
||||
INC.w SprAction, X
|
||||
+
|
||||
@@ -107,9 +96,7 @@ Sprite_Booki_Main:
|
||||
ApproachPlayer:
|
||||
{
|
||||
%PlayAnimation(5,9,16)
|
||||
|
||||
JSR Sprite_Booki_Move
|
||||
|
||||
RTS
|
||||
}
|
||||
}
|
||||
@@ -198,9 +185,7 @@ Sprite_Booki_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
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
%Set_Sprite_Properties(Sprite_Goriya_Prep, Sprite_Goriya_Long)
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Goriya_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -51,8 +49,6 @@ Sprite_Goriya_Long:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Goriya_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -61,8 +57,6 @@ Sprite_Goriya_Prep:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Goriya_Main:
|
||||
{
|
||||
LDA.w SprAction, X
|
||||
@@ -309,9 +303,6 @@ Sprite_Goriya_Draw:
|
||||
|
||||
RTS
|
||||
|
||||
|
||||
; =========================================================
|
||||
|
||||
.start_index
|
||||
db $00, $02, $04, $06, $08, $0A, $0C, $0E
|
||||
.nbr_of_tiles
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
%Set_Sprite_Properties(Sprite_Octorok_Prep, Sprite_Octorok_Long)
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Octorok_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -52,8 +50,6 @@ Sprite_Octorok_Long:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Octorok_Prep:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
@@ -62,8 +58,6 @@ Sprite_Octorok_Prep:
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
Sprite_Octorok_Main:
|
||||
{
|
||||
JSR Sprite_Octorok_Move
|
||||
@@ -148,9 +142,8 @@ Sprite_Octorok_Move:
|
||||
.wait
|
||||
LDY.w SprMiscC, X
|
||||
|
||||
LDA.w .speed_x, Y : STA.w SprXSpeed,X
|
||||
|
||||
LDA.w .speed_y, Y : STA.w SprYSpeed,X
|
||||
LDA.w .speed_x, Y : STA.w SprXSpeed, X
|
||||
LDA.w .speed_y, Y : STA.w SprYSpeed, X
|
||||
|
||||
JSL Sprite_CheckTileCollision
|
||||
LDA.w $0E70, X : BEQ .no_collision
|
||||
@@ -159,26 +152,18 @@ Sprite_Octorok_Move:
|
||||
.no_collision
|
||||
RTS
|
||||
|
||||
; ---------------------------------------------------------
|
||||
|
||||
.octorok_used_barrage
|
||||
STZ.w SprXSpeed, X : STZ.w SprYSpeed,X
|
||||
|
||||
LDA.w SprTimerA, X : BNE Octorock_ShootEmUp
|
||||
INC.w SprMiscF, X
|
||||
|
||||
LDA.w SprMiscC, X
|
||||
PHA
|
||||
|
||||
JSL GetRandomInt : AND.b #$3F : ADC.b #$30 : STA.w SprTimerA, X
|
||||
AND.b #$03 : STA.w SprMiscC, X
|
||||
|
||||
PLA
|
||||
CMP.w SprMiscC, X : BEQ .exit
|
||||
EOR.w SprMiscC, X : BNE .exit
|
||||
|
||||
LDA.b #$08 : STA.w SprTimerB,X
|
||||
|
||||
EOR.w SprMiscC, X : BNE .exit
|
||||
LDA.b #$08 : STA.w SprTimerB,X
|
||||
.exit
|
||||
RTS
|
||||
|
||||
@@ -284,8 +269,7 @@ Sprite_WaterOctorok_Attack:
|
||||
+
|
||||
|
||||
JSL GetDistance8bit_Long
|
||||
CMP.b #$40
|
||||
BCC .not_close_enough ; LD < 64
|
||||
CMP.b #$40 : BCC .not_close_enough ; LD < 64
|
||||
INC.w SprMiscG, X
|
||||
%SetTimerA($10)
|
||||
.not_close_enough
|
||||
@@ -332,19 +316,14 @@ Sprite_WaterOctorok_Attack:
|
||||
|
||||
Octorok_ShootSingle:
|
||||
{
|
||||
LDA.w SprTimerA,X : CMP.b #$1C : BNE .bide_time
|
||||
LDA.w SprTimerA, X : CMP.b #$1C : BNE .bide_time
|
||||
PHA
|
||||
JSR Octorok_SpawnRock
|
||||
PLA
|
||||
.bide_time
|
||||
LSR A
|
||||
LSR A
|
||||
LSR A
|
||||
LSR #3
|
||||
TAY
|
||||
|
||||
LDA.w .mouth_anim_step,Y
|
||||
STA.w SprMiscB,X
|
||||
|
||||
LDA.w .mouth_anim_step, Y : STA.w SprMiscB, X
|
||||
RTS
|
||||
|
||||
.mouth_anim_step
|
||||
@@ -355,33 +334,24 @@ Octorok_ShootSingle:
|
||||
db $02, $01, $01, $00
|
||||
}
|
||||
|
||||
; ---------------------------------------------------------
|
||||
|
||||
Octorok_Shoot4Ways:
|
||||
{
|
||||
LDA.w SprTimerA,X
|
||||
LDA.w SprTimerA, X
|
||||
PHA
|
||||
CMP.b #$80 : BCS .animate
|
||||
AND.b #$0F : BNE .delay_turn
|
||||
PHA
|
||||
|
||||
LDY.w SprMiscC,X
|
||||
LDA.w .next_direction,Y : STA.w SprMiscC,X
|
||||
|
||||
LDY.w SprMiscC, X
|
||||
LDA.w .next_direction, Y : STA.w SprMiscC, X
|
||||
PLA
|
||||
.delay_turn
|
||||
CMP.b #$08 : BNE .animate
|
||||
JSR Octorok_SpawnRock
|
||||
.animate
|
||||
PLA
|
||||
LSR A
|
||||
LSR A
|
||||
LSR A
|
||||
LSR A
|
||||
LSR #4
|
||||
TAY
|
||||
|
||||
LDA.w .mouth_anim_step,Y : STA.w SprMiscB,X
|
||||
|
||||
LDA.w .mouth_anim_step, Y : STA.w SprMiscB, X
|
||||
RTS
|
||||
|
||||
.next_direction
|
||||
|
||||
Reference in New Issue
Block a user