boss housekeeping

This commit is contained in:
scawful
2025-01-19 13:27:38 -05:00
parent f8a264d1df
commit a9d42e398f
8 changed files with 27 additions and 125 deletions

View File

@@ -125,7 +125,7 @@ DarkLink_Palette:
Sprite_DarkLink_Main: Sprite_DarkLink_Main:
{ {
LDA.w SprAction, X : JSL UseImplicitRegIndexedLocalJumpTable LDA.w SprAction, X : JSL JumpTableLocal
dw Handler dw Handler
dw SwordSlash dw SwordSlash
@@ -1526,7 +1526,7 @@ GanonInit:
Sprite_Ganon_Main: Sprite_Ganon_Main:
{ {
LDA.w SprAction, X : JSL UseImplicitRegIndexedLocalJumpTable LDA.w SprAction, X : JSL JumpTableLocal
dw Wait dw Wait
dw ShowMessage dw ShowMessage

View File

@@ -64,7 +64,7 @@ SpeedTable:
Sprite_KydreeokHead_Main: Sprite_KydreeokHead_Main:
{ {
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw KydreeokHead_ForwardAnim ; 0x00 dw KydreeokHead_ForwardAnim ; 0x00
dw KydreeokHead_RightAnim ; 0x01 dw KydreeokHead_RightAnim ; 0x01
@@ -73,7 +73,6 @@ Sprite_KydreeokHead_Main:
dw KydreeokHead_FarLeft ; 0x04 dw KydreeokHead_FarLeft ; 0x04
dw KydreeokHead_SummonFire ; 0x05 dw KydreeokHead_SummonFire ; 0x05
; -------------------------------------------------------
; 0x00 ; 0x00
KydreeokHead_ForwardAnim: KydreeokHead_ForwardAnim:
{ {
@@ -105,7 +104,6 @@ Sprite_KydreeokHead_Main:
RTS RTS
} }
; -------------------------------------------------------
; 0x01 ; 0x01
KydreeokHead_RightAnim: KydreeokHead_RightAnim:
{ {
@@ -127,7 +125,6 @@ Sprite_KydreeokHead_Main:
RTS RTS
} }
; -------------------------------------------------------
; 0x02 ; 0x02
KydreeokHead_LeftAnim: KydreeokHead_LeftAnim:
{ {
@@ -148,7 +145,6 @@ Sprite_KydreeokHead_Main:
RTS RTS
} }
; -------------------------------------------------------
; 0x03 ; 0x03
KydreeokHead_FarRight: KydreeokHead_FarRight:
{ {
@@ -168,7 +164,6 @@ Sprite_KydreeokHead_Main:
RTS RTS
} }
; -------------------------------------------------------
; 0x04 ; 0x04
KydreeokHead_FarLeft: KydreeokHead_FarLeft:
{ {
@@ -292,8 +287,6 @@ RandomlyAttack:
RTS RTS
} }
; =========================================================
MoveWithBody: MoveWithBody:
{ {
LDA.w Kydreeok_Id : TAY LDA.w Kydreeok_Id : TAY
@@ -535,8 +528,6 @@ KydreeokHead_NeckControl:
RTS RTS
} }
; =========================================================
Sprite_KydreeokHead_DrawNeck: Sprite_KydreeokHead_DrawNeck:
{ {
LDA.w SprSubtype, X : CMP.b #$01 : BEQ .neck2 LDA.w SprSubtype, X : CMP.b #$01 : BEQ .neck2
@@ -609,8 +600,6 @@ DrawNeckPart:
RTS RTS
} }
; =========================================================
Sprite_KydreeokHead_Draw: Sprite_KydreeokHead_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord

View File

@@ -43,8 +43,6 @@ Sprite_Kydrog_Long:
RTL RTL
} }
; =========================================================
Sprite_Kydrog_Prep: Sprite_Kydrog_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -55,12 +53,10 @@ Sprite_Kydrog_Prep:
RTL RTL
} }
; =========================================================
Sprite_Kydrog_Main: Sprite_Kydrog_Main:
{ {
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw Kydrog_StartCutscene dw Kydrog_StartCutscene
dw Kydrog_AttractPlayer dw Kydrog_AttractPlayer
@@ -139,8 +135,6 @@ Sprite_Kydrog_Main:
} }
} }
; =========================================================
Sprite_Kydrog_Draw: Sprite_Kydrog_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord
@@ -189,8 +183,6 @@ Sprite_Kydrog_Draw:
RTS RTS
; =========================================================
.start_index .start_index
db $00 db $00
.nbr_of_tiles .nbr_of_tiles

View File

@@ -49,8 +49,6 @@ Sprite_KydrogBoss_Long:
RTL RTL
} }
; =========================================================
Sprite_KydrogBoss_CheckIfDead: Sprite_KydrogBoss_CheckIfDead:
{ {
LDA.w SprAction, X : CMP.b #$09 : BEQ .not_dead LDA.w SprAction, X : CMP.b #$09 : BEQ .not_dead
@@ -71,8 +69,6 @@ Sprite_KydrogBoss_CheckIfDead:
RTS RTS
} }
; =========================================================
Sprite_KydrogBoss_Prep: Sprite_KydrogBoss_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -95,7 +91,6 @@ Sprite_KydrogBoss_Prep:
PLB PLB
RTL RTL
} }
; =========================================================
pushpc pushpc
org $1ECD97 org $1ECD97
@@ -153,8 +148,8 @@ KydrogBoss_DoMovement:
Sprite_KydrogBoss_Main: Sprite_KydrogBoss_Main:
{ {
LDA.w SprAction, X; Load the SprAction LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable; Goto the SprAction we are currently in JSL JumpTableLocal
dw KydrogBoss_Init ; 00 dw KydrogBoss_Init ; 00
dw KydrogBoss_WalkState ; 01 dw KydrogBoss_WalkState ; 01
@@ -171,8 +166,6 @@ Sprite_KydrogBoss_Main:
dw KydrogBoss_Descend ; 0B dw KydrogBoss_Descend ; 0B
dw KydrogBoss_Abscond ; 0C dw KydrogBoss_Abscond ; 0C
; -------------------------------------------------------
KydrogBoss_Init: KydrogBoss_Init:
{ {
%StartOnFrame(15) %StartOnFrame(15)
@@ -186,8 +179,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_WalkState: KydrogBoss_WalkState:
{ {
JSR CheckForNextPhase JSR CheckForNextPhase
@@ -231,8 +222,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_WalkForward: KydrogBoss_WalkForward:
{ {
%PlayAnimation(0, 2, 8) %PlayAnimation(0, 2, 8)
@@ -261,8 +250,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_TakeDamage: ;0x06 KydrogBoss_TakeDamage: ;0x06
{ {
%StartOnFrame(12) %StartOnFrame(12)
@@ -298,8 +285,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_TauntPlayer: ;0x07 KydrogBoss_TauntPlayer: ;0x07
{ {
%StartOnFrame(15) %StartOnFrame(15)
@@ -317,8 +302,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_SummonStalfos: ;0x08 KydrogBoss_SummonStalfos: ;0x08
{ {
%StartOnFrame(17) %StartOnFrame(17)
@@ -339,8 +322,6 @@ Sprite_KydrogBoss_Main:
RTS RTS
} }
; -------------------------------------------------------
KydrogBoss_Death: ;0x09 KydrogBoss_Death: ;0x09
{ {
%StartOnFrame(0) %StartOnFrame(0)
@@ -421,8 +402,6 @@ Sprite_KydrogBoss_Main:
} }
} }
; =========================================================
CheckForNextPhase: CheckForNextPhase:
{ {
LDA !KydrogPhase : CMP.b #$00 : BEQ .phase_one LDA !KydrogPhase : CMP.b #$00 : BEQ .phase_one
@@ -461,8 +440,6 @@ CheckForNextPhase:
RTS RTS
} }
; =========================================================
; TODO: Use a timer to unfreeze the sprite ; TODO: Use a timer to unfreeze the sprite
Sprite_CheckIfFrozen: Sprite_CheckIfFrozen:
{ {
@@ -508,8 +485,6 @@ KydrogBoss_Set_Damage:
;BA D1 D2 D3 D4 D5 AR HS BM SA PD FR IR BB ET QU ;BA D1 D2 D3 D4 D5 AR HS BM SA PD FR IR BB ET QU
} }
; =========================================================
Sprite_Offspring_SpawnHead: Sprite_Offspring_SpawnHead:
{ {
JSL GetRandomInt : AND.b #$3F : BNE .normal_head JSL GetRandomInt : AND.b #$3F : BNE .normal_head
@@ -610,8 +585,6 @@ GetNumberSpawnStalfos:
db $7C, $02, $A7, $85 db $7C, $02, $A7, $85
} }
; =========================================================
Sprite_KydrogBoss_Draw: Sprite_KydrogBoss_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord

View File

@@ -1,4 +1,3 @@
; ==============================================================================\
; RAM used ; RAM used
;$35-$37 as some temp draw ram ;$35-$37 as some temp draw ram
@@ -6,42 +5,22 @@
;$7EEA00-$7EEAB8 draw table storage ;$7EEA00-$7EEAB8 draw table storage
;$7EEAB8-$7EEAC9 room cleared flags ;$7EEAB8-$7EEAC9 room cleared flags
; ==============================================================================
; Hooks ; Hooks
Sprite2_CheckDamage = $05AB93
org $05AB93 Sprite2_CheckIfActivePermissive = $05F955
Sprite2_CheckDamage: Sprite2_MoveAltitude = $05FA2E
Sprite2_Move = $05F9ED
org $05F955
Sprite2_CheckIfActivePermissive:
org $05FA2E
Sprite2_MoveAltitude:
org $05F9ED
Sprite2_Move:
org $068F95 ; skip SpritePrep_Bosses org $068F95 ; skip SpritePrep_Bosses
NOP : NOP : NOP NOP #3
;JSR $8F1C ; original JSR JSL Lanmola_FinishInitialization ;JSR $8F1C ; original JSR
JSL Lanmola_FinishInitialization
org $05B60E org $05B60E : dw Sprite_Lanmola
dw Sprite_Lanmola org $1AF9D6 : JSL SetShrapnelTimer
org $1AF981 : Lanmola_SpawnShrapnel:
org $1AF9D6 org $1DF614 : Sprite_ConvertVelocityToAngle:
JSL SetShrapnelTimer
org $1AF981
Lanmola_SpawnShrapnel:
org $1DF614
Sprite_ConvertVelocityToAngle:
org $05A377 ;replace vanilla sprite_lanmola.asm
; ==============================================================================
org $05A377 ; replace vanilla sprite_lanmola.asm
Lanmola_FinishInitialization: Lanmola_FinishInitialization:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -79,15 +58,13 @@ Lanmola_FinishInitialization:
db $80, $CF, $FF, $60 db $80, $CF, $FF, $60
} }
; ==============================================================================
Sprite_Lanmola: Sprite_Lanmola:
{ {
;JSR Sprite2_CheckIfActivePermissive ;JSR Sprite2_CheckIfActivePermissive
LDA $0D80, X LDA $0D80, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw Lanmola_Wait ;0x00 dw Lanmola_Wait ;0x00
dw Lanmola_Mound ;0x01 dw Lanmola_Mound ;0x01
@@ -97,7 +74,7 @@ Sprite_Lanmola:
dw Lanmola_Death ;0x05 dw Lanmola_Death ;0x05
} }
; ==============================================================================
Lanmola_Wait: ;0x00 Lanmola_Wait: ;0x00
{ {
@@ -116,7 +93,7 @@ Lanmola_Wait: ;0x00
RTS RTS
} }
; ==============================================================================
Lanmola_Mound: ;0x01 Lanmola_Mound: ;0x01
{ {
@@ -160,7 +137,7 @@ Lanmola_Mound: ;0x01
RTS RTS
} }
; ==============================================================================
Lanmola_Fly: ;0x02 Lanmola_Fly: ;0x02
{ {
@@ -229,8 +206,6 @@ Lanmola_Fly: ;0x02
RTS RTS
} }
; ==============================================================================
Lanmola_Dive: ;0x03 Lanmola_Dive: ;0x03
{ {
JSR Lanmola_Draw JSR Lanmola_Draw
@@ -259,8 +234,6 @@ Lanmola_Dive: ;0x03
RTS RTS
} }
; ==============================================================================
Lanmola_Reset: ;0x04 Lanmola_Reset: ;0x04
{ {
JSR Lanmola_Draw JSR Lanmola_Draw
@@ -283,8 +256,6 @@ Lanmola_Reset: ;0x04
RTS RTS
} }
; ==============================================================================
Lanmola_Death: ;0x05 Lanmola_Death: ;0x05
{ {
JSR Lanmola_Draw JSR Lanmola_Draw
@@ -369,8 +340,6 @@ Lanmola_Death: ;0x05
RTS RTS
} }
; ==============================================================================
Lanmola_Draw: Lanmola_Draw:
{ {
JSL Lanmola_MoveSegment JSL Lanmola_MoveSegment
@@ -520,8 +489,6 @@ Lanmola_Draw:
RTS RTS
} }
; ==============================================================================
Lanmola_DrawMound: Lanmola_DrawMound:
{ {
LDA.b #$04 : JSL OAM_AllocateFromRegionB LDA.b #$04 : JSL OAM_AllocateFromRegionB
@@ -570,13 +537,9 @@ Lanmola_DrawMound:
RTS RTS
} }
; ==============================================================================
assert pc() <= $05A880 assert pc() <= $05A880
; ==============================================================================
org $1DCFCB org $1DCFCB
Sprite_Shrapnel: Sprite_Shrapnel:
{ {
; This sprite manifests as a boulder outdoors, and as shrapnel indoors. ; This sprite manifests as a boulder outdoors, and as shrapnel indoors.
@@ -630,6 +593,4 @@ Sprite_Shrapnel:
RTS RTS
} }
; ==============================================================================
assert pc() <= $1DD02A assert pc() <= $1DD02A

View File

@@ -1,6 +1,5 @@
; ========================================================= ; =========================================================
; Sprite Properties ; Manhandla / Big ChuChu Sprite
; =========================================================
!SPRID = Sprite_Manhandla !SPRID = Sprite_Manhandla
!NbrTiles = 03 ; Number of tiles used in a frame !NbrTiles = 03 ; Number of tiles used in a frame
@@ -32,8 +31,6 @@
%Set_Sprite_Properties(Sprite_Manhandla_Prep, Sprite_Manhandla_Long) %Set_Sprite_Properties(Sprite_Manhandla_Prep, Sprite_Manhandla_Long)
; =========================================================
Sprite_Manhandla_Long: Sprite_Manhandla_Long:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -57,8 +54,6 @@ org $06FA25
LDA.w $0E20, X : CMP.b #$88 LDA.w $0E20, X : CMP.b #$88
pullpc pullpc
; =========================================================
Sprite_Manhandla_Prep: Sprite_Manhandla_Prep:
{ {
PHB : PHK : PLB PHB : PHK : PLB
@@ -117,8 +112,6 @@ Sprite_Manhandla_CheckForNextPhaseOrDeath:
RTS RTS
} }
; =========================================================
SetLeftHeadPos: SetLeftHeadPos:
REP #$20 REP #$20
LDA.w SprCachedX : SEC : SBC.w #$0016 LDA.w SprCachedX : SEC : SBC.w #$0016
@@ -158,7 +151,7 @@ SetCenterHeadPos:
Sprite_Manhandla_Main: Sprite_Manhandla_Main:
{ {
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw Manhandla_Intro dw Manhandla_Intro
dw Manhandla_FrontHead ; 0x01 dw Manhandla_FrontHead ; 0x01
@@ -383,7 +376,7 @@ Sprite_Manhandla_Main:
Sprite_Manhandla_Move: Sprite_Manhandla_Move:
{ {
LDA.w SprMiscC, X LDA.w SprMiscC, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw StageControl dw StageControl
dw MoveXandY dw MoveXandY
@@ -407,7 +400,6 @@ Sprite_Manhandla_Move:
JSL Sprite_ApplySpeedTowardsPlayer JSL Sprite_ApplySpeedTowardsPlayer
JSR Manhandla_StopIfOutOfBounds JSR Manhandla_StopIfOutOfBounds
JSL MoveBody JSL MoveBody
INC.w SprMiscC, X INC.w SprMiscC, X
RTS RTS
} }
@@ -418,7 +410,6 @@ Sprite_Manhandla_Move:
JSL Sprite_ApplySpeedTowardsPlayerXOrY JSL Sprite_ApplySpeedTowardsPlayerXOrY
JSR Manhandla_StopIfOutOfBounds JSR Manhandla_StopIfOutOfBounds
JSL MoveBody JSL MoveBody
INC.w SprMiscC, X INC.w SprMiscC, X
RTS RTS
} }
@@ -501,8 +492,6 @@ Manhandla_StopIfOutOfBounds:
RTS RTS
} }
; =========================================================
Sprite_Manhandla_Draw: Sprite_Manhandla_Draw:
{ {
JSL Sprite_PrepOamCoord JSL Sprite_PrepOamCoord

View File

@@ -2,12 +2,10 @@
; Octoboss by Zarby89 ; Octoboss by Zarby89
pushpc pushpc
; Sprite_A2_Kholdstare ; Sprite_A2_Kholdstare
org $1E9518 org $1E9518
JSL Sprite_Octoboss_Long JSL Sprite_Octoboss_Long
RTS RTS
pullpc pullpc
BrotherSpr = $0EB0 BrotherSpr = $0EB0
@@ -74,7 +72,7 @@ Sprite_Octoboss_Long:
Sprite_Octoboss_Main: Sprite_Octoboss_Main:
{ {
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw WaitForPlayerToApproach ; 00 dw WaitForPlayerToApproach ; 00
dw Emerge ; 01 dw Emerge ; 01
@@ -97,7 +95,7 @@ Sprite_Octoboss_Main:
Sprite_Octoboss_Secondary: Sprite_Octoboss_Secondary:
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw WaitForPlayerToApproach ; 00 dw WaitForPlayerToApproach ; 00
dw Emerge ; 01 dw Emerge ; 01

View File

@@ -9,7 +9,7 @@ Sprite_VampireBat_Main:
JSL Sprite_BounceFromTileCollision JSL Sprite_BounceFromTileCollision
LDA.w SprAction, X LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable JSL JumpTableLocal
dw VampireBat_Idle dw VampireBat_Idle
dw VampireBat_Ascend dw VampireBat_Ascend