Enemy housekeeping

This commit is contained in:
scawful
2025-01-10 20:42:42 -05:00
parent 59a063e5f4
commit 80fd69d8bb
4 changed files with 13 additions and 69 deletions

View File

@@ -43,8 +43,6 @@ Sprite_AntiKirby_Long:
RTL
}
; =========================================================
Sprite_AntiKirby_Prep:
{
PHB : PHK : PLB

View File

@@ -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

View File

@@ -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

View File

@@ -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
@@ -149,7 +143,6 @@ Sprite_Octorok_Move:
LDY.w SprMiscC, X
LDA.w .speed_x, Y : STA.w SprXSpeed, X
LDA.w .speed_y, Y : STA.w SprYSpeed, X
JSL Sprite_CheckTileCollision
@@ -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
.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
@@ -337,14 +321,9 @@ Octorok_ShootSingle:
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,8 +334,6 @@ Octorok_ShootSingle:
db $02, $01, $01, $00
}
; ---------------------------------------------------------
Octorok_Shoot4Ways:
{
LDA.w SprTimerA, X
@@ -364,24 +341,17 @@ Octorok_Shoot4Ways:
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
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
RTS
.next_direction