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