cleanup octoboss
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
; =========================================================
|
||||
; Octoboss by Zarby89
|
||||
|
||||
; Replaces Sprite 0x3C KidInKak
|
||||
org $06C04E
|
||||
JSL Sprite_Octoboss_Long
|
||||
; TODO: Find a sprite to inject this into
|
||||
; JSL Sprite_Octoboss_Long
|
||||
|
||||
BrotherSpr = $0EB0
|
||||
|
||||
Sprite_Octoboss_Long:
|
||||
{
|
||||
PHB : PHK : PLB
|
||||
|
||||
LDA.w SprMiscD, X : BNE + ; is the sprite already init
|
||||
@@ -75,10 +75,11 @@ JSR Sprite_Octoboss_Secondary ; Call the Secondary sprite code
|
||||
.SpriteIsNotActive
|
||||
PLB ; Get back the databank we stored previously
|
||||
RTL ; Go back to original code
|
||||
|
||||
}
|
||||
|
||||
|
||||
Sprite_Octoboss_Main:
|
||||
{
|
||||
LDA.w SprAction, X; Load the SprAction
|
||||
JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in
|
||||
dw WaitForPlayerToApproach ; 00
|
||||
@@ -149,7 +150,6 @@ INC.w SprAction, X
|
||||
RTS
|
||||
|
||||
WaitDialog:
|
||||
|
||||
RTS
|
||||
|
||||
|
||||
@@ -252,24 +252,11 @@ PLX
|
||||
LDA.b #$01
|
||||
STA.b $14
|
||||
;-------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+
|
||||
|
||||
|
||||
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IdlePhase:
|
||||
LDA.w SprTimerC, X : CMP.b #$08 : BNE +
|
||||
JSL Sprite_SpawnFireball
|
||||
@@ -363,12 +350,6 @@ LDA.b #$09 : STA.w SprAction, X ; go to wait message action
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Moving2:
|
||||
LDA.w SprTimerC, X : BNE +
|
||||
DEC.w SprAction, X
|
||||
@@ -419,9 +400,7 @@ JSL Sprite_CheckDamageFromPlayer
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
WaitMessageBeforeSurrender:
|
||||
|
||||
; display message 4A ; Wait! WAIT! please!
|
||||
LDY.w BrotherSpr, X
|
||||
LDA.b #$06 : STA.w SprAction, Y ; set brother to action 6
|
||||
@@ -566,13 +545,11 @@ STZ.w $0DD0, X
|
||||
.noframereset
|
||||
LDA.b #2 : STA.w SprTimerB, X
|
||||
+
|
||||
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
IdleWait:
|
||||
|
||||
RTS
|
||||
|
||||
|
||||
@@ -584,17 +561,17 @@ LDA.w SprHealth, Y : STA.b $00
|
||||
|
||||
LDA.w SprHealth, X : CLC : ADC.b $00
|
||||
RTS
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
; Sprite Draw code
|
||||
; --------------------------------------------------------------------------------------------------
|
||||
; Draw the tiles on screen with the data provided by the sprite maker editor
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
Sprite_Octoboss_Draw:
|
||||
{
|
||||
JSL Sprite_PrepOamCoord
|
||||
JSL Sprite_OAM_AllocateDeferToPlayer
|
||||
|
||||
@@ -650,11 +627,10 @@ PLX
|
||||
RTS
|
||||
|
||||
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
; Sprite Draw Generated Data
|
||||
; --------------------------------------------------------------------------------------------------
|
||||
; This is where the generated Data for the sprite go
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
.start_index
|
||||
db $00, $04, $0A, $10, $16, $1C, $20, $24, $28, $2C, $30, $34, $38, $3C, $40, $44
|
||||
.nbr_of_tiles
|
||||
@@ -745,16 +721,14 @@ db $02, $02, $02, $02
|
||||
db $02, $02, $02, $02
|
||||
db $02
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
; Sprite Draw code
|
||||
; --------------------------------------------------------------------------------------------------
|
||||
; Draw the tiles on screen with the data provided by the sprite maker editor
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
Sprite_Octoboss_Draw2:
|
||||
{
|
||||
JSL Sprite_PrepOamCoord
|
||||
JSL Sprite_OAM_AllocateDeferToPlayer
|
||||
|
||||
@@ -811,11 +785,11 @@ RTS
|
||||
|
||||
|
||||
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
; Sprite Draw Generated Data
|
||||
; --------------------------------------------------------------------------------------------------
|
||||
|
||||
; This is where the generated Data for the sprite go
|
||||
;==================================================================================================
|
||||
; =========================================================
|
||||
.start_index
|
||||
db $00, $04, $0A, $10, $16, $1C, $20, $24, $28, $2C, $30, $34, $38, $3C, $40, $44
|
||||
.nbr_of_tiles
|
||||
@@ -905,10 +879,9 @@ db $02, $02, $02, $02
|
||||
db $02, $02, $02, $02
|
||||
db $02, $02, $02, $02
|
||||
db $02
|
||||
|
||||
}
|
||||
|
||||
SpawnSplash:
|
||||
|
||||
LDA.b #$EC ; SPRITE EC
|
||||
JSL Sprite_SpawnDynamically
|
||||
BMI .exit
|
||||
@@ -1026,7 +999,7 @@ PLX
|
||||
|
||||
RTS
|
||||
|
||||
;---------------------------------------------------------------------------------------------------
|
||||
; ---------------------------------------------------------
|
||||
|
||||
.slot_occupied
|
||||
DEX
|
||||
@@ -1038,7 +1011,6 @@ PLX
|
||||
RTS
|
||||
|
||||
|
||||
|
||||
SpawnMedallion:
|
||||
LDA.b #$C0 ; SPRITE C0
|
||||
JSL Sprite_SpawnDynamically
|
||||
@@ -1086,7 +1058,6 @@ RTS
|
||||
|
||||
|
||||
SpawnMedallionAlt:
|
||||
|
||||
LDA.b #$C0 ; SPRITE C0
|
||||
JSL Sprite_SpawnDynamically
|
||||
BMI .exit
|
||||
|
||||
Reference in New Issue
Block a user