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:
{
LDA.w SprAction, X : JSL UseImplicitRegIndexedLocalJumpTable
LDA.w SprAction, X : JSL JumpTableLocal
dw Handler
dw SwordSlash
@@ -1526,7 +1526,7 @@ GanonInit:
Sprite_Ganon_Main:
{
LDA.w SprAction, X : JSL UseImplicitRegIndexedLocalJumpTable
LDA.w SprAction, X : JSL JumpTableLocal
dw Wait
dw ShowMessage

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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