Merge branch 'master' into NewMinecart

This commit is contained in:
Jared_Brian_
2025-02-11 18:37:42 -07:00
98 changed files with 4641 additions and 3961 deletions

View File

@@ -1,7 +1,7 @@
; =========================================================
; Dark Link Boss
!SPRID = $C1 ; The sprite ID you are overwriting (HEX)
!SPRID = $C1
!NbrTiles = 4 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -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

@@ -48,8 +48,6 @@ Sprite_Kydreeok_Long:
RTL
}
; =========================================================
Sprite_Kydreeok_Prep:
{
PHB : PHK : PLB
@@ -121,8 +119,6 @@ MaybeRespawnHead:
RTS
}
; =========================================================
Sprite_Kydreeok_Main:
{
%SpriteJumpTable(Kydreeok_Start,

View File

@@ -47,8 +47,6 @@ Sprite_KydreeokHead_Long:
RTL
}
; =========================================================
Sprite_KydreeokHead_Prep:
{
PHB : PHK : PLB
@@ -59,8 +57,6 @@ Sprite_KydreeokHead_Prep:
RTL
}
; =========================================================
SpeedTable:
db $00, $02, $04, $06, $07, $01, $06, $03
db 0, -2, -4, -6, -7, -1, -6, -3
@@ -68,7 +64,7 @@ SpeedTable:
Sprite_KydreeokHead_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw KydreeokHead_ForwardAnim ; 0x00
dw KydreeokHead_RightAnim ; 0x01
@@ -77,7 +73,6 @@ Sprite_KydreeokHead_Main:
dw KydreeokHead_FarLeft ; 0x04
dw KydreeokHead_SummonFire ; 0x05
; -------------------------------------------------------
; 0x00
KydreeokHead_ForwardAnim:
{
@@ -109,7 +104,6 @@ Sprite_KydreeokHead_Main:
RTS
}
; -------------------------------------------------------
; 0x01
KydreeokHead_RightAnim:
{
@@ -131,7 +125,6 @@ Sprite_KydreeokHead_Main:
RTS
}
; -------------------------------------------------------
; 0x02
KydreeokHead_LeftAnim:
{
@@ -152,7 +145,6 @@ Sprite_KydreeokHead_Main:
RTS
}
; -------------------------------------------------------
; 0x03
KydreeokHead_FarRight:
{
@@ -172,7 +164,6 @@ Sprite_KydreeokHead_Main:
RTS
}
; -------------------------------------------------------
; 0x04
KydreeokHead_FarLeft:
{
@@ -219,8 +210,6 @@ KydreeokHead_RotationMove:
RTS
}
; =========================================================
CoordinateBasedRotation:
{
LDA.w Neck_Index : TAY
@@ -238,20 +227,18 @@ CoordinateBasedRotation:
LDA #0 : STA.w Neck_Index
.not_full
RTS
; Table for X coordinates (based on a radius of 8)
X_Coords:
db 8, 11, 8, 3, -4, -9, -12, -9
db -4, 3, 8, 11, 8, 3, -4, -9
; Table for Y coordinates (based on a radius of 8)
Y_Coords:
db 0, -3, -8, -11, -15, -15, -11, -8
db -3, 0, 3, 8, 11, 15, 15, 11
}
; Table for X coordinates (based on a radius of 8)
X_Coords:
db 8, 11, 8, 3, -4, -9, -12, -9
db -4, 3, 8, 11, 8, 3, -4, -9
; Table for Y coordinates (based on a radius of 8)
Y_Coords:
db 0, -3, -8, -11, -15, -15, -11, -8
db -3, 0, 3, 8, 11, 15, 15, 11
; =========================================================
RotateHeadUsingSpeedValues:
{
LDY.w Neck_Index
@@ -284,8 +271,6 @@ RotateHeadUsingSpeedValues:
db -12, -9, -6, -3
}
; =========================================================
RandomlyAttack:
{
JSL Sprite_DamageFlash_Long
@@ -302,8 +287,6 @@ RandomlyAttack:
RTS
}
; =========================================================
MoveWithBody:
{
LDA.w Kydreeok_Id : TAY
@@ -545,8 +528,6 @@ KydreeokHead_NeckControl:
RTS
}
; =========================================================
Sprite_KydreeokHead_DrawNeck:
{
LDA.w SprSubtype, X : CMP.b #$01 : BEQ .neck2
@@ -619,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 $05A377 ;replace vanilla sprite_lanmola.asm
; ==============================================================================
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
@@ -52,15 +49,11 @@ Sprite_Manhandla_Long:
}
pushpc
; Sprite_DoTheDeath#PrepareEnemyDrop.post_death_stuff
org $06FA25
LDA.w $0E20, X : CMP.b #$88
pullpc
; =========================================================
Sprite_Manhandla_Prep:
{
PHB : PHK : PLB
@@ -119,9 +112,7 @@ Sprite_Manhandla_CheckForNextPhaseOrDeath:
RTS
}
; =========================================================
macro SetLeftHeadPos()
SetLeftHeadPos:
REP #$20
LDA.w SprCachedX : SEC : SBC.w #$0016
SEP #$20
@@ -131,9 +122,9 @@ macro SetLeftHeadPos()
LDA.w SprCachedY : SEC : SBC.w #$000F
SEP #$20
STA.w SprY, Y : XBA : STA.w SprYH, Y
endmacro
RTS
macro SetRightHeadPos()
SetRightHeadPos:
REP #$20
LDA.w SprCachedX : CLC : ADC.w #$0016
SEP #$20
@@ -143,9 +134,9 @@ macro SetRightHeadPos()
LDA.w SprCachedY : SEC : SBC.w #$000F
SEP #$20
STA.w SprY, Y : XBA : STA.w SprYH, Y
endmacro
RTS
macro SetCenterHeadPos()
SetCenterHeadPos:
REP #$20
LDA.w SprCachedX
SEP #$20
@@ -155,12 +146,12 @@ macro SetCenterHeadPos()
LDA.w SprCachedY
SEP #$20
STA.w SprY, Y : XBA : STA.w SprYH, Y
endmacro
RTS
Sprite_Manhandla_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Manhandla_Intro
dw Manhandla_FrontHead ; 0x01
@@ -257,7 +248,7 @@ Sprite_Manhandla_Main:
LDY.w Offspring3_Id
LDA.w SprType, Y : CMP.b #$88 : BNE .not_head3
LDA.w SprState, Y : BEQ .offspring3_dead
%SetCenterHeadPos()
JSR SetCenterHeadPos
.offspring3_dead
.not_head3
@@ -267,16 +258,16 @@ Sprite_Manhandla_Main:
Flower_Flicker:
{
%PlayAnimation(11, 12, 10)
LDA $1C : ORA.b #$01 : STA $1C ;turn on BG2 (Body)
LDA $1C : ORA.b #$01 : STA $1C ; turn on BG2 (Body)
; Flicker the body every other frame using the timer
LDA.w SprTimerA, X : AND.b #$01 : BEQ .flicker
LDA $1C : AND.b #$FE : STA $1C ;turn off BG2 (Body)
LDA $1C : AND.b #$FE : STA $1C ; turn off BG2 (Body)
.flicker
LDA.w SprTimerA, X : BNE .continue
STZ.w $0422
STZ.w $0424
LDA $1C : AND.b #$FE : STA $1C ;turn off BG2 (Body)
LDA $1C : AND.b #$FE : STA $1C ; turn off BG2 (Body)
%GotoAction($04)
LDA.b #$10 : STA.w SprTimerC, X
@@ -285,27 +276,19 @@ Sprite_Manhandla_Main:
LDA #$88
JSL Sprite_SpawnDynamically : BMI .return
TYA : STA.w Offspring3_Id
PHX
%SetCenterHeadPos()
JSR SetCenterHeadPos
LDA.b #$08 : STA.w SprSubtype, Y
STA.w SprAction, Y
LDA.b #$20 : STA.w SprHealth, Y
LDA.b #$07 : STA.w SprNbrOAM, Y
LDA.w SprY, Y : CLC : ADC.b #$20 : STA.w SprY, Y
LDA.b #$10 : STA.w SprTimerC, Y
TYX
STZ.w SprYRound, X
STZ.w SprXRound, X
PLX
.return
.continue
RTS
}
@@ -328,54 +311,47 @@ Sprite_Manhandla_Main:
LDY.w Offspring1_Id
LDA.w SprType, Y : CMP.b #$88 : BNE .not_head
LDA.w SprState, Y : BEQ .offspring1_dead
%SetLeftHeadPos()
.offspring1_dead
LDA.w SprState, Y : BEQ .offspring1_dead
JSR SetLeftHeadPos
.offspring1_dead
.not_head
LDY.w Offspring2_Id
LDA.w SprType, Y : CMP.b #$88 : BNE .not_head2
LDA.w SprState, Y : BEQ .offspring2_dead
%SetRightHeadPos()
.offspring2_dead
LDA.w SprState, Y : BEQ .offspring2_dead
JSR SetRightHeadPos
.offspring2_dead
.not_head2
LDY.w Offspring3_Id
LDA.w SprType, Y : CMP.b #$88 : BNE .not_head3
LDA.w SprState, Y : BEQ .offspring3_dead
%SetCenterHeadPos()
LDA.w SprState, Y : BEQ .offspring3_dead
JSR SetCenterHeadPos
.offspring3_dead
.not_head3
PLX
RTS
}
BigChuchu_Emerge:
{
%PlayAnimation(9, 12, 10)
JSL Sprite_DamageFlash_Long
LDA.w SprTimerA, X : BNE +
LDA.b #$02 : STA.w SprMiscD, X ; Set phase flag
LDA.b #$20 : STA.w SprTimerA, X
%GotoAction($05)
+
RTS
}
BigChuchu_Flower:
{
%PlayAnimation(12, 12, 1)
JSL Sprite_DamageFlash_Long
LDA.w SprTimerC, X : BEQ +
LDA.w SprY, X : DEC : STA.w SprY, X
+
RTS
}
@@ -391,11 +367,8 @@ Sprite_Manhandla_Main:
ChuchuBlast:
{
%PlayAnimation(3, 4, 4)
JSL Sprite_Move
%DoDamageToPlayerSameLayerOnContact()
RTS
}
}
@@ -403,7 +376,7 @@ Sprite_Manhandla_Main:
Sprite_Manhandla_Move:
{
LDA.w SprMiscC, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw StageControl
dw MoveXandY
@@ -427,7 +400,6 @@ Sprite_Manhandla_Move:
JSL Sprite_ApplySpeedTowardsPlayer
JSR Manhandla_StopIfOutOfBounds
JSL MoveBody
INC.w SprMiscC, X
RTS
}
@@ -438,7 +410,6 @@ Sprite_Manhandla_Move:
JSL Sprite_ApplySpeedTowardsPlayerXOrY
JSR Manhandla_StopIfOutOfBounds
JSL MoveBody
INC.w SprMiscC, X
RTS
}
@@ -521,8 +492,6 @@ Manhandla_StopIfOutOfBounds:
RTS
}
; =========================================================
Sprite_Manhandla_Draw:
{
JSL Sprite_PrepOamCoord
@@ -579,9 +548,6 @@ Sprite_Manhandla_Draw:
RTS
; =========================================================
.start_index
db $00, $02, $04, $08, $0C, $10, $14, $17, $1A, $1D, $23, $29, $33
.nbr_of_tiles
@@ -719,7 +685,6 @@ Sprite_BigChuchu_Draw:
RTS
; =======================================================
.start_index
db $00, $09, $12, $1B, $1C
.nbr_of_tiles
@@ -761,12 +726,8 @@ Chuchu_SpawnBlast:
PHX
LDA.b #$88
JSL Sprite_SpawnDynamically : BMI .return
LDA.b #$0A : STA.w SprSubtype, Y
STA.w SprAction, Y
LDA.b #$0A : STA.w SprSubtype, Y : STA.w SprAction, Y
JSL GetRandomInt : AND.b #$01 : TAX
LDA.w .speed_and_offset_x, X : STA.w SprXSpeed, Y
LDA.w SprX, Y : CLC : ADC.w .speed_and_offset_x, X : STA.w SprX, Y
STA.w SprXRound, Y
@@ -779,12 +740,10 @@ Chuchu_SpawnBlast:
LDA.b #$10 : STA.w SprTimerB, Y
LDA.b #$00 : STA.w SprNbrOAM, Y
LDA.b #$03 : STA.w SprHitbox, Y
.return
PLX
RTS
.speed_and_offset_x
db -16, 16
@@ -797,43 +756,27 @@ Mothula_SpawnBeams:
LDA.b #$36 ; SFX3.36
JSL $0DBB8A ; SpriteSFX_QueueSFX3WithPan
LDA.b #$02
STA.w $0FB5
LDA.b #$02 : STA.w $0FB5
.next_spawn
LDA.b #$89 ; SPRITE 89
JSL Sprite_SpawnDynamically
BMI .no_space
JSL Sprite_SpawnDynamically : BMI .no_space
JSL Sprite_SetSpawnedCoordinates
LDA.b $02 : SEC : SBC.b $04
CLC : ADC.b #$03 : STA.w SprY,Y
LDA.b #$10 : STA.w SprTimerA,Y : STA.w SprBulletproof,Y
JSL Sprite_SetSpawnedCoordinates
LDA.b $02 : SEC : SBC.b $04
CLC : ADC.b #$03 : STA.w SprY,Y
LDA.b #$10 : STA.w SprTimerA,Y : STA.w SprBulletproof,Y
PHX
LDX.w $0FB5
LDA.b $00 : CLC : ADC.w .speed_and_offset_x,X
STA.w SprX,Y
LDA.w .speed_and_offset_x,X : STA.w SprXSpeed,Y
LDA.w .speed_y,X
STA.w SprYSpeed,Y
LDA.b #$00
STA.w SprHeight,Y
PLX
PHX
LDX.w $0FB5
LDA.b $00 : CLC : ADC.w .speed_and_offset_x,X : STA.w SprX,Y
LDA.w .speed_and_offset_x,X : STA.w SprXSpeed,Y
LDA.w .speed_y,X : STA.w SprYSpeed,Y
LDA.b #$00 : STA.w SprHeight,Y
PLX
.no_space
DEC.w $0FB5
BPL .next_spawn
RTS
.speed_and_offset_x
db -20, 0, 20
@@ -845,23 +788,19 @@ Mothula_SpawnBeams:
SpawnLeftManhandlaHead:
{
LDA #$88
JSL Sprite_SpawnDynamically : BMI .return
TYA : STA.w Offspring1_Id
JSL Sprite_SpawnDynamically : BMI .return
TYA : STA.w Offspring1_Id
PHX
%SetLeftHeadPos()
; store the sub-type
JSR SetLeftHeadPos
LDA.b #$03 : STA.w SprSubtype, Y
STA.w SprAction, Y
LDA.b #$14 : STA.w SprHealth, Y
LDA.b #$90 : STA.w SprTileDie, Y
LDA.w SprGfxProps : ORA.b #$80 : STA.w SprGfxProps, Y
TYX
STZ.w SprYRound, X
STZ.w SprXRound, X
PLX
.return
RTS
}
@@ -871,17 +810,14 @@ SpawnRightManhandlaHead:
LDA #$88
JSL Sprite_SpawnDynamically : BMI .return
TYA : STA.w Offspring2_Id
PHX
%SetRightHeadPos()
JSR SetRightHeadPos
LDA.b #$02
STA.w SprSubtype, Y
LDA.b #$14 : STA.w SprHealth, Y
LDA.b #$90 : STA.w SprTileDie, Y
LDA.w SprGfxProps : AND.b #$80 : STA.w SprGfxProps, Y
TYX
STZ.w SprYRound, X
STZ.w SprXRound, X
PLX
@@ -894,18 +830,14 @@ SpawnCenterMandhandlaHead:
LDA #$88
JSL Sprite_SpawnDynamically : BMI .return
TYA : STA.w Offspring3_Id
PHX
%SetCenterHeadPos()
JSR SetCenterHeadPos
LDA.b #$01
STA.w SprSubtype, Y
LDA.b #$14 : STA.w SprHealth, Y
LDA.b #$90 : STA.w SprTileDie, Y
LDA.w SprGfxProps : AND.b #$80 : STA.w SprGfxProps, Y
TYX
STZ.w SprYRound, X
STZ.w SprXRound, X
PLX
@@ -915,45 +847,40 @@ SpawnCenterMandhandlaHead:
ApplyManhandlaPalette:
{
REP #$20 ;Set A in 16bit mode
;note, this uses adresses like 7EC300 and not 7EC500 because the game
;will fade the colors into 7EC500 based on the colors found in 7EC300
LDA #$7FFF : STA $7EC5E2 ;BG2
LDA #$08D9 : STA $7EC5E4
LDA #$1E07 : STA $7EC5E6
LDA #$4ACA : STA $7EC5E8
LDA #$14A5 : STA $7EC5EA
LDA #$133F : STA $7EC5EC
LDA #$19DF : STA $7EC5EE
INC $15
SEP #$20 ;Set A in 8bit mode
RTS
REP #$20 ;Set A in 16bit mode
; note, this uses adresses like 7EC300 and not 7EC500 because the game
; will fade the colors into 7EC500 based on the colors found in 7EC300
LDA #$7FFF : STA $7EC5E2 ;BG2
LDA #$08D9 : STA $7EC5E4
LDA #$1E07 : STA $7EC5E6
LDA #$4ACA : STA $7EC5E8
LDA #$14A5 : STA $7EC5EA
LDA #$133F : STA $7EC5EC
LDA #$19DF : STA $7EC5EE
INC $15
SEP #$20 ;Set A in 8bit mode
RTS
}
ApplyManhandlaGraphics:
{
PHX
REP #$20 ; A = 16, XY = 8
LDX #$80 : STX $2100 ; turn the screen off (required)
LDX #$80 : STX $2115 ; Set the video port register every time we write it increase by 1
LDA #$5000 : STA $2116 ; Destination of the DMA $5800 in vram <- this need to be divided by 2
LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register
; "001 => 2 registers write once (2 bytes: p, p+1)"
PHX
REP #$20 ; A = 16, XY = 8
LDX #$80 : STX $2100 ; turn the screen off (required)
LDX #$80 : STX $2115 ; Set the video port register every time we write it increase by 1
LDA #$5000 : STA $2116 ; Destination of the DMA $5800 in vram, need to be divided by 2
LDA #$1801 : STA $4300 ; DMA Transfer Mode and destination register
; "001 => 2 registers write once (2 bytes: p, p+1)"
LDA.w #ManhandlaGraphics : STA $4302
LDX.b #ManhandlaGraphics>>16 : STX $4304
LDA.w #ManhandlaGraphics : STA $4302
LDX.b #ManhandlaGraphics>>16 : STX $4304
LDA #$2000 : STA $4305 ; Size of the transfer 4 sheets of $800 each
LDX #$01 : STX $420B ; Do the DMA
LDX #$0F : STX $2100 ; Turn the screen back on
SEP #$30
PLX
RTS
LDA #$2000 : STA $4305 ; Size of the transfer 4 sheets of $800 each
LDX #$01 : STX $420B ; Do the DMA
LDX #$0F : STX $2100 ; Turn the screen back on
SEP #$30
PLX
RTS
ManhandlaGraphics:
incbin manhandla.bin

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
@@ -501,7 +499,7 @@ Sprite_Octoboss_Secondary:
LDA.w SprHealth, Y : STA.b $00
LDA.w SprHealth, X : CLC : ADC.b $00
RTS
}
}
}
Sprite_Octoboss_Draw:
@@ -509,10 +507,9 @@ Sprite_Octoboss_Draw:
JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer
LDA $0DC0, X : CLC : ADC SprFrame, X : TAY;Animation Frame
LDA $0DC0, X : CLC : ADC.w SprFrame, X : TAY
LDA .start_index, Y : STA $06
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1
LDY.b #$00
@@ -560,11 +557,6 @@ Sprite_Octoboss_Draw:
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
@@ -662,7 +654,7 @@ Sprite_Octoboss_Draw2:
JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer
LDA $0DC0, X : CLC : ADC SprFrame, X : TAY;Animation Frame
LDA $0DC0, X : CLC : ADC.w SprFrame, X : TAY;Animation Frame
LDA .start_index, Y : STA $06

File diff suppressed because it is too large Load Diff

Binary file not shown.

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
@@ -38,7 +38,7 @@ Sprite_VampireBat_Main:
INC.w SprAction, X
LDA.b #$50 : STA.w SprTimerC, X
JSL GetRandomInt : AND.b #$3F : BNE +
JSR Sprite_SpawnFireKeese
JSL Sprite_SpawnFireKeese
+
RTS
}
@@ -87,7 +87,16 @@ Sprite_SpawnFireKeese:
LDA.b #$01 : STA.w SprSubtype, Y ; Fire Keese
JSL Sprite_SetSpawnedCoords
.spawn_failed
RTS
RTL
}
Sprite_SpawnIceKeese:
{
LDA.b #$11
JSL Sprite_SpawnDynamically : BMI +
JSL Sprite_SetSpawnedCoords
+
RTL
}
Sprite_VampireBat_Draw:

View File

@@ -60,7 +60,7 @@ Sprite_Wolfos_Prep:
RTL
.spawn_wolfos
LDA.b #$40 : STA.w SprTimerA, X
LDA.b #$80 : STA.w SprDefl, X ; Sprite persist
LDA.b #$82 : STA.w SprDefl, X ; persist, impervious to arrows
LDA.b #$08 : STA.w SprNbrOAM, X ; Nbr Oam Entries
PLB
RTL
@@ -137,7 +137,7 @@ Wolfos_DecideAction:
Sprite_Wolfos_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Wolfos_AttackForward ; 0x00
dw Wolfos_AttackBack ; 0x01
@@ -249,8 +249,8 @@ Sprite_Wolfos_Main:
.wait
; Wait for Song of Healing before granting the mask.
LDA $FE : BEQ .ninguna_cancion
STZ $FE
LDA.b SongFlag : CMP.b #$01 : BNE .ninguna_cancion
STZ.b SongFlag
LDA.b #$20 : STA.w SprTimerD, X
LDA.w POSX : STA.w SprX, X
LDA.w POSXH : STA.w SprXH, X

View File

@@ -43,15 +43,13 @@ Sprite_AntiKirby_Long:
RTL
}
; =========================================================
Sprite_AntiKirby_Prep:
{
PHB : PHK : PLB
STZ.w SprDefl, X
STZ.w SprTileDie, X
STZ.w SprMiscB, X
LDA.l SWORD : DEC : TAY
LDA.l Sword : DEC : TAY
LDA .bump_damage, Y : STA.w SprBump, X
LDA .health, Y : STA.w SprHealth, X
LDA .prize_pack, Y : STA.w SprPrize, X
@@ -83,7 +81,7 @@ Sprite_AntiKirby_Main:
JSL Sprite_CheckIfRecoiling
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw AntiKirby_Main
dw AntiKirby_Hurt

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_Booki_Prep, Sprite_Booki_Long)
; =========================================================
Sprite_Booki_Long:
{
PHB : PHK : PLB
@@ -46,12 +44,10 @@ Sprite_Booki_Long:
RTL
}
; =========================================================
Sprite_Booki_Prep:
{
PHB : PHK : PLB
LDA.l SWORD : DEC A : TAY
LDA.l Sword : DEC A : TAY
LDA.w .health, Y : STA.w SprHealth, X
STZ.w SprMiscB, X
PLB
@@ -61,12 +57,10 @@ Sprite_Booki_Prep:
db $04, $08, $10, $18
}
; =========================================================
Sprite_Booki_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw StalkPlayer
dw HideFromPlayer
@@ -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
}
}
@@ -135,7 +122,7 @@ Sprite_Booki_Move:
.no_damage
LDA.w SprMiscB, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw SlowFloat
dw FloatAway
@@ -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

@@ -29,7 +29,7 @@
!ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_BusinessScrub_Prep, Sprite_BusinessScrub_Long);
%Set_Sprite_Properties(Sprite_BusinessScrub_Prep, Sprite_BusinessScrub_Long)
Sprite_BusinessScrub_Long:
{
@@ -60,14 +60,10 @@ Sprite_BusinessScrub_Prep:
{
PHB : PHK : PLB
LDA.w SprSubtype, X : CMP.b #$01 : BEQ .pea_shot
CMP.b #$02 : BEQ .cutscene_scrub
JMP +
.pea_shot
LDA.b #$06 : STA.w SprAction, X ; Pea Shot State
LDA.b #$20 : STA.b SprPrize, X
JMP +
.cutscene_scrub
LDA.b #$08 : STA.w SprAction, X
+
PLB
RTL
@@ -84,7 +80,7 @@ Sprite_BusinessScrub_Prep:
Sprite_BusinessScrub_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw BusinessScrub_Hiding
dw BusinessScrub_Attack
@@ -96,8 +92,6 @@ Sprite_BusinessScrub_Main:
dw BusinessScrub_PeaShot
dw BusinessScrub_HidingDefeated
dw BusinessScrub_CutsceneStart
; 0x00
BusinessScrub_Hiding:
{
@@ -239,12 +233,6 @@ Sprite_BusinessScrub_Main:
RTS
}
BusinessScrub_CutsceneStart:
{
; TODO: Add deku dream cutscene
RTS
}
}
; =========================================================

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_Darknut_Prep, Sprite_Darknut_Long)
; =========================================================
Sprite_Darknut_Long:
{
PHB : PHK : PLB
@@ -46,8 +44,6 @@ Sprite_Darknut_Long:
RTL
}
; =========================================================
Sprite_Darknut_Prep:
{
PHB : PHK : PLB
@@ -59,21 +55,14 @@ Sprite_Darknut_Prep:
RTL
.health
db $04, $0C, $0F, $10
db $04, $06, $08, $0A
}
; =========================================================
DarknutSpeed = 04
Sprite_Darknut_Main:
{
LDA.w POSX : STA $02
LDA.w POSY : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
JSL GetDistance8bit_Long
CMP.b #$80 : BCS .no_probe
JSL GetDistance8bit_Long : CMP.b #$80 : BCS .no_probe
; JSL Sprite_SendOutProbe
JSL Sprite_SpawnProbeAlways_long
.no_probe
@@ -83,11 +72,14 @@ Sprite_Darknut_Main:
JSL Sprite_Move
JSL Sprite_BounceFromTileCollision
JSL Sprite_PlayerCantPassThrough
JSL Sprite_DamageFlash_Long
JSL Sprite_CheckIfRecoiling
JSL Sprite_CheckDamageFromPlayer : BCC .no_dano
LDA.b #$FF : STA.w SprTimerD, X
.no_dano
LDA.w SprTimerA, X : BEQ +
LDA.b #$90 : STA.w SprTimerD, X
+
@@ -107,7 +99,7 @@ Sprite_Darknut_Main:
JSR Goriya_HandleTileCollision
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw FaceRight
dw FaceLeft
@@ -181,8 +173,6 @@ Sprite_Darknut_BasicMove:
}
}
; =========================================================
Sprite_Darknut_Draw:
{
JSL Sprite_PrepOamCoord
@@ -239,8 +229,6 @@ Sprite_Darknut_Draw:
RTS
; =======================================================
.start_index
db $00, $03, $06, $09, $0C, $0E, $10, $12
.nbr_of_tiles
@@ -290,5 +278,4 @@ Sprite_Darknut_Draw:
db $02, $02
db $02, $02
db $02, $02
}

View File

@@ -12,7 +12,7 @@
Sprite_EonScrub_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EonScrub_Stalking
dw EonScrub_Attack
@@ -33,10 +33,6 @@ Sprite_EonScrub_Main:
JSL Sprite_IsBelowPlayer : TYA
CMP #$00 : BNE .is_below_player
; Check if the player is too close
LDA $22 : STA $02
LDA $20 : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
JSL GetDistance8bit_Long : CMP.b #$24 : BCC .too_close
; The player is below the scrub, so it should pop up
LDA #$20 : STA.w SprTimerA, X
@@ -60,10 +56,6 @@ Sprite_EonScrub_Main:
INC.w SprAction, X
.not_done
LDA.w POSX : STA $02
LDA.w POSY : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
JSL GetDistance8bit_Long : CMP #$18 : BCS .not_too_close
%GotoAction(0)
.not_too_close

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,12 +57,10 @@ Sprite_Goriya_Prep:
RTL
}
; =========================================================
Sprite_Goriya_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Goriya_WalkingUp
dw Goriya_WalkingDown
@@ -197,7 +191,7 @@ Sprite_Goriya_Move:
+
LDA.w SprMiscB, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Goriya_MoveUp
dw Goriya_MoveDown
@@ -309,9 +303,6 @@ Sprite_Goriya_Draw:
RTS
; =========================================================
.start_index
db $00, $02, $04, $06, $08, $0A, $0C, $0E
.nbr_of_tiles

View File

@@ -51,7 +51,7 @@ Sprite_HelmetChuchu_Long:
Sprite_HelmetChuchu_Prep:
{
PHB : PHK : PLB
LDA.l SWORD : DEC A : TAY
LDA.l Sword : DEC A : TAY
LDA.w .health, Y : STA.w SprHealth, X
JSL GetRandomInt : AND.b #$02 : STA.w SprAction, X
STZ.w SprMiscB, X
@@ -66,7 +66,7 @@ Sprite_HelmetChuchu_Prep:
RTL
.health
db $08, $0C, $40, $C0
db $08, $0C, $0F, $10
}
; =========================================================
@@ -222,7 +222,7 @@ Sprite_Chuchu_Move:
JSL Sprite_CheckIfRecoiling
LDA.w SprMiscB, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw BounceTowardPlayer
dw RecoilFromPlayer

View File

@@ -4,7 +4,7 @@
; 01 - Fire
; 02 - Vampire Bat
!SPRID = $11 ; The sprite ID you are overwriting (HEX)
!SPRID = $11
!NbrTiles = 08 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -58,11 +58,13 @@ Sprite_Keese_Prep:
{
PHB : PHK : PLB
LDA.b #$80 : STA.w SprDefl, X
LDA.b #$30 : STA.w SprTimerC, X
LDA.w SprSubtype, X : CMP.b #$02 : BNE +
LDA.b #$20 : STA.w SprHealth, X
BRA ++
+
LDA.b #$02 : STA.w SprNbrOAM, X
LDA.b #$03 : STA.w SprNbrOAM, X
LDA.b #$03 : STA.w SprPrize, X
++
PLB
RTL
@@ -71,7 +73,7 @@ Sprite_Keese_Prep:
Sprite_Keese_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Keese_Idle
dw Keese_FlyAround
@@ -80,7 +82,9 @@ Sprite_Keese_Main:
{
STZ.w SprFrame, X
; Wait til the player is nearby then fly around
LDA.w SprTimerC, X : BEQ .move
JSL GetDistance8bit_Long : CMP.b #$20 : BCS +
.move
INC.w SprAction, X
JSL GetRandomInt
STA.w SprTimerA, X
@@ -90,21 +94,21 @@ Sprite_Keese_Main:
Keese_FlyAround:
{
%PlayAnimation(0,5,10)
%PlayAnimation(0,5,8)
JSL Sprite_CheckDamageToPlayer
JSL Sprite_CheckDamageFromPlayer
JSL Sprite_CheckDamageFromPlayer : BCC +
JSL ForcePrizeDrop_long
+
JSL Sprite_DamageFlash_Long
JSL Sprite_BounceFromTileCollision
JSL GetRandomInt : AND.b #$1F : BNE +
LDA.w SprSubtype, X : BEQ ++
JSL Sprite_Twinrova_FireAttack
JMP +
++
; Ice Attack
JSL GetRandomInt : AND.b #$3F : BNE +
LDA.b #$10 : STA.w SprTimerC, X
+
JSR Sprite_Keese_Attack
LDA.w SprTimerA, X : AND.b #$10 : BNE +
LDA.b #$40
JSL Sprite_ProjectSpeedTowardsPlayer
+
@@ -118,6 +122,19 @@ Sprite_Keese_Main:
}
}
Sprite_Keese_Attack:
{
LDA.w SprTimerC, X : BEQ +
LDA.w SprSubtype, X : BEQ ++
JSL Sprite_Twinrova_FireAttack
JMP +
++
JSL Sprite_SpawnSparkleGarnish
JSL BlindLaser_SpawnTrailGarnish
+
RTS
}
Sprite_Keese_Draw:
{
JSL Sprite_PrepOamCoord
@@ -126,6 +143,7 @@ Sprite_Keese_Draw:
LDA.w SprFrame, X : TAY ;Animation Frame
LDA .start_index, Y : STA $06
LDA.w SprFlash, X : STA $08
LDA.w SprMiscB, X : STA $09
LDA.w SprSubtype, X : CMP.b #$01 : BNE +
LDA.b #$0A : EOR $08 : STA $08
+
@@ -159,7 +177,14 @@ Sprite_Keese_Draw:
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
INY
; If SprMiscA != 0, then use 4th sheet
LDA.b $09 : BEQ +
LDA .chr_2, X : STA ($90), Y
JMP ++
+
LDA .chr, X : STA ($90), Y
++
INY
LDA .properties, X : ORA $08 : STA ($90), Y
@@ -202,6 +227,13 @@ Sprite_Keese_Draw:
db $84, $84
db $A4, $A4
db $A0
.chr_2
db $C0
db $E2, $E2
db $C2
db $C4, $C4
db $E4, $E4
db $E0
.properties
db $35
db $35, $75

View File

@@ -47,7 +47,7 @@ Sprite_Leever_Main:
{
JSL Sprite_DamageFlash_Long
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Leever_Underground
dw Leever_Emerge

View File

@@ -2,7 +2,7 @@
; Sprite Properties
; =========================================================
!SPRID = $08 ; The sprite ID you are overwriting (HEX)
!SPRID = $08
!NbrTiles = 05 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -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
@@ -80,7 +74,7 @@ Sprite_Octorok_Main:
.not_water_tile
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Octorok_MoveDown
dw Octorok_MoveUp
@@ -148,9 +142,8 @@ Sprite_Octorok_Move:
.wait
LDY.w SprMiscC, X
LDA.w .speed_x, Y : STA.w SprXSpeed,X
LDA.w .speed_y, Y : STA.w SprYSpeed,X
LDA.w .speed_x, Y : STA.w SprXSpeed, X
LDA.w .speed_y, Y : STA.w SprYSpeed, X
JSL Sprite_CheckTileCollision
LDA.w $0E70, X : BEQ .no_collision
@@ -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
EOR.w SprMiscC, X : BNE .exit
LDA.b #$08 : STA.w SprTimerB,X
.exit
RTS
@@ -221,7 +206,7 @@ Sprite_WaterOctorok_Main:
JSR Sprite_WaterOctorok_Attack
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw WaterOctorok_FaceDown
dw WaterOctorok_FaceUp
@@ -270,7 +255,7 @@ Sprite_WaterOctorok_Attack:
JSL Sprite_CheckDamageToPlayer
LDA.w SprMiscG, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw WaterOctorok_Hidden
dw WaterOctorok_PoppingUp
@@ -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
@@ -332,19 +316,14 @@ Sprite_WaterOctorok_Attack:
Octorok_ShootSingle:
{
LDA.w SprTimerA,X : CMP.b #$1C : BNE .bide_time
LDA.w SprTimerA, X : CMP.b #$1C : BNE .bide_time
PHA
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,33 +334,24 @@ Octorok_ShootSingle:
db $02, $01, $01, $00
}
; ---------------------------------------------------------
Octorok_Shoot4Ways:
{
LDA.w SprTimerA,X
LDA.w SprTimerA, X
PHA
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
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
LDA.w .mouth_anim_step, Y : STA.w SprMiscB, X
RTS
.next_direction

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_PolsVoice_Prep, Sprite_PolsVoice_Long)
; =========================================================
Sprite_PolsVoice_Long:
{
PHB : PHK : PLB
@@ -46,8 +44,6 @@ Sprite_PolsVoice_Long:
RTL
}
; =========================================================
Sprite_PolsVoice_Prep:
{
PHB : PHK : PLB
@@ -58,8 +54,6 @@ Sprite_PolsVoice_Prep:
RTL
}
; =========================================================
Sprite_PolsVoice_Main:
{
JSR PolsVoice_CheckForFluteSong
@@ -132,8 +126,9 @@ Sprite_PolsVoice_Main:
PolsVoice_CheckForFluteSong:
{
; If the player plays the flute
LDA $FE : BEQ +
LDA.b SongFlag : BEQ +
LDA.b #$03 : STA.w SprState, X
JSL ForcePrizeDrop_long
+
RTS
}

File diff suppressed because it is too large Load Diff

View File

@@ -124,6 +124,7 @@ Sprite_Puffstool_Main:
JSL Sprite_CheckDamageToPlayerSameLayer
LDA.w SprTimerC, X : BNE +
JSL ForcePrizeDrop_long
STZ.w SprState, X
+
RTS

View File

@@ -60,7 +60,7 @@ Sprite_SeaUrchin_Prep:
Sprite_SeaUrchin_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Idle
dw Death
@@ -80,11 +80,9 @@ Sprite_SeaUrchin_Main:
{
LDA.b #$06 : STA.w SprState, X
LDA.b #$0A : STA.w SprTimerA, X
STZ.w SprPrize,X
LDA.b #$09 ; SFX2.1E
JSL $0DBB8A ; SpriteSFX_QueueSFX3WithPan
JSL ForcePrizeDrop_long
LDA.b #$09 : JSL SpriteSFX_QueueSFX3WithPan
RTS
}
}

View File

@@ -50,7 +50,7 @@ Sprite_ThunderGhost_Long:
Sprite_ThunderGhost_Prep:
{
PHB : PHK : PLB
LDA.l SWORD : DEC A : TAY
LDA.l Sword : DEC A : TAY
LDA.w .health, Y : STA.w SprHealth, X
LDA.b #$08 : STA.w SprTimerB, X
LDA.b #$08 : STA.w SprTimerA, X
@@ -146,7 +146,7 @@ Sprite_ThunderGhost_Move:
.Continue
LDA.w SprMiscB, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw ThunderGhostMove

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_BeanVendor_Prep, Sprite_BeanVendor_Long)
; =========================================================
Sprite_BeanVendor_Long:
{
PHB : PHK : PLB
@@ -53,8 +51,6 @@ Sprite_BeanVendor_Long:
RTL
}
; =========================================================
Sprite_BeanVendor_Prep:
{
PHB : PHK : PLB
@@ -62,24 +58,23 @@ Sprite_BeanVendor_Prep:
LDA.b #$40 : STA.w SprTimerA, X
STZ.w SprMiscD, X
LDA.b $8A : CMP.b #$00 : BNE +
LDA.l MagicBeanProg : BNE .in_progress
LDA.b #$01 : STA.w SprMiscD, X
LDA.b #$04 : STA.w SprAction, X
JMP +
.in_progress
LDA.l MagicBeanProg : CMP.b #$3F : BCS .not_flower
; Sprite is the flower on ranch map
LDA.b #$05 : STA.w SprAction, X
.not_flower
STA.w SprFrame, X
LDA.b $1B : BNE +
LDA.b $8A : CMP.b #$00 : BNE +
LDA.l MagicBeanProg : BNE .in_progress
LDA.b #$01 : STA.w SprMiscD, X
LDA.b #$05 : STA.w SprAction, X
JMP +
.in_progress
LDA.l MagicBeanProg : CMP.b #$3F : BCS .not_flower
; Sprite is the flower on ranch map
LDA.b #$05 : STA.w SprAction, X
.not_flower
STA.w SprFrame, X
+
PLB
RTL
}
; =========================================================
Sprite_BeanVendor_Main:
{
%SpriteJumpTable(BeanVendor,
@@ -398,8 +393,6 @@ Sprite_BeanVendor_Draw:
RTS
; =======================================================
.start_index
db $00, $04, $05, $0B, $11, $13, $15
.nbr_of_tiles

View File

@@ -3,10 +3,10 @@
SickKid_CheckForSongOfHealing:
{
LDA $FE : CMP.b #$01 : BNE .no_song
LDA.b SongFlag : CMP.b #$01 : BNE .no_song
INC $0D80, X
INC $02E4
STZ $FE
STZ.b SongFlag
.no_song
RTL
}

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_DekuScrub_Prep, Sprite_DekuScrub_Long)
; =========================================================
Sprite_DekuScrub_Long:
{
PHB : PHK : PLB
@@ -45,15 +43,13 @@ Sprite_DekuScrub_Long:
RTL
}
; =========================================================
Sprite_DekuScrub_Prep:
{
PHB : PHK : PLB
LDA.b #$80 : STA.w SprDefl, X
; Peacetime Deku Scrub NPCs
LDA.b $8A : CMP.b #$2E : BNE .check_next
LDA.b AreaIndex : CMP.b #$2E : BNE .check_next
; Deku Butler
LDA.b #$07 : STA.w SprAction, X
JMP +
@@ -75,19 +71,17 @@ Sprite_DekuScrub_Prep:
LDA.b #$06 : STA.w SprAction, X
++
; Check if tail palace is cleared
LDA.l CRYSTALS : AND #$10 : BEQ +
LDA.l Crystals : AND #$10 : BEQ +
STZ.w SprState, X
+
PLB
RTL
}
; =========================================================
Sprite_DekuScrub_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EstadoInactivo
dw QuiereCuracion
@@ -100,7 +94,6 @@ Sprite_DekuScrub_Main:
dw DekuButler_Peacetime
dw DekuPrinces_Peacetime
EstadoInactivo:
{
%PlayAnimation(0, 1, 16)
@@ -114,8 +107,8 @@ Sprite_DekuScrub_Main:
QuiereCuracion:
{
%PlayAnimation(0, 1, 16)
LDA $FE : BEQ .ninguna_cancion
STZ $FE
LDA.b SongFlag : CMP.b #$01 : BNE .ninguna_cancion
STZ.b SongFlag
LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2)
.ninguna_cancion
@@ -171,7 +164,9 @@ Sprite_DekuScrub_Main:
%StartOnFrame(3)
%PlayAnimation(3, 3, 10)
JSL Sprite_PlayerCantPassThrough
; %ShowSolicitedMessage($0C4)
%ShowSolicitedMessage($1B9) : BCC +
LDA.b #$02 : STA.l MapIcon
+
RTS
}
@@ -180,13 +175,13 @@ Sprite_DekuScrub_Main:
%StartOnFrame(4)
%PlayAnimation(4, 4, 10)
JSL Sprite_PlayerCantPassThrough
; %ShowSolicitedMessage($0C5)
%ShowSolicitedMessage($1BA) : BCC +
LDA.b #$02 : STA.l MapIcon
+
RTS
}
}
; =========================================================
Sprite_DekuScrub_Draw:
{
JSL Sprite_PrepOamCoord

View File

@@ -62,13 +62,16 @@ Sprite_EonOwl_Long:
Sprite_EonOwl_Prep:
{
PHB : PHK : PLB
STZ.w SprHitbox, X
LDA.b $8A : CMP.b #$0E : BNE .NotGaebora
LDA.b #$20 : STA.w SprTimerA, X
LDA.b #$03 : STA.w SprAction, X
.NotGaebora
LDA.w AreaIndex : CMP.b #$50 : BNE .not_intro
; If Map 0x50, don't spawn after getting sword
LDA.l SWORD : CMP.b #$01 : BCC .continue
.Despawn
LDA.l Sword : CMP.b #$01 : BCC .continue
STZ.w SprState, X
.continue
.not_intro
@@ -81,7 +84,7 @@ Sprite_EonOwl_Prep:
Sprite_EonOwl_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EonOwl_Idle
dw EonOwl_IntroDialogue
@@ -94,10 +97,6 @@ Sprite_EonOwl_Main:
EonOwl_Idle:
{
%PlayAnimation(0,1,16)
LDA.w POSX : STA $02
LDA.w POSY : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
JSL GetDistance8bit_Long : CMP #$28 : BCS .not_too_close
%GotoAction(1)
.not_too_close
@@ -134,9 +133,10 @@ Sprite_EonOwl_Main:
KaeporaGaebora:
{
%PlayAnimation(0,0,1)
LDA.w SprTimerA, X : BNE .not_ready
%ShowUnconditionalMessage($146)
%GotoAction(4)
JSL GetDistance8bit_Long : CMP.b #$50 : BCC .not_ready
LDA.w SprTimerA, X : BNE .not_ready
%ShowUnconditionalMessage($146)
%GotoAction(4)
.not_ready
RTS
}
@@ -144,7 +144,7 @@ Sprite_EonOwl_Main:
KaeporaGaebora_Respond:
{
LDA $1CE8 : BNE .player_said_no
%GotoAction(5)
%GotoAction(3)
RTS
.player_said_no
%GotoAction(5)

View File

@@ -9,7 +9,7 @@ Sprite_EonZora_Main:
JSL Sprite_BounceFromTileCollision
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EonZora_Forward
dw EonZora_Left

View File

@@ -3,7 +3,7 @@
Sprite_EonZoraElder_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw EonZoraElder_Idle
dw EonZoraElder_Surprised

View File

@@ -31,8 +31,6 @@
%Set_Sprite_Properties(Sprite_Farore_Prep, Sprite_Farore_Long)
; =========================================================
Sprite_Farore_Long:
{
PHB : PHK : PLB
@@ -50,8 +48,6 @@ Sprite_Farore_Long:
RTL
}
; =========================================================
Sprite_Farore_Prep:
{
PHB : PHK : PLB
@@ -67,8 +63,6 @@ Sprite_Farore_Prep:
RTL
}
; =========================================================
; Movement key bitwise ---- udlr
WALKSPEED = 14
@@ -77,7 +71,7 @@ STORY_STATE = $B6
Sprite_Farore_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw IntroStart
dw MoveUpTowardsFarore
@@ -198,19 +192,12 @@ Sprite_Farore_Main:
}
; 07
; Look at the RAM SprY to SprYRound, the first few are the actual positions of the sprite
; that you can just set manually or SprYSpeed and SprXSpeed are the "speeds" of the sprites irrc
; You can set one of the speeds and then call the function called Sprite_Move
; And then that will handle it applying the speed for you
MakuArea_FaroreWaitForKydrog:
{
%PlayAnimation(5, 5, 8)
RTS
}
}
; =========================================================
Sprite_Farore_Draw:
{
@@ -220,16 +207,13 @@ Sprite_Farore_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1
LDY.b #$00
.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
@@ -246,7 +230,7 @@ Sprite_Farore_Draw:
LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way
STA $0E
.on_screen_y
.on_screen_y
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
INY
@@ -268,50 +252,48 @@ Sprite_Farore_Draw:
RTS
; =========================================================
.start_index
db $00, $02, $04, $06, $08, $0A, $0C
.nbr_of_tiles
db 1, 1, 1, 1, 1, 1, 1
.x_offsets
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, -1
.y_offsets
dw -8, 4
dw -8, 4
dw 4, -8
dw -8, 4
dw 4, -7
dw -8, 4
dw 4, -7
.chr
db $A8, $AA
db $A8, $88
db $AA, $A8
db $8A, $8C
db $8C, $8A
db $8A, $AC
db $AA, $86
.properties
db $3B, $3B
db $3B, $7B
db $3B, $3B
db $3B, $3B
db $7B, $3B
db $3B, $3B
db $3B, $7B
.sizes
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
.start_index
db $00, $02, $04, $06, $08, $0A, $0C
.nbr_of_tiles
db 1, 1, 1, 1, 1, 1, 1
.x_offsets
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, 0
dw 0, -1
.y_offsets
dw -8, 4
dw -8, 4
dw 4, -8
dw -8, 4
dw 4, -7
dw -8, 4
dw 4, -7
.chr
db $A8, $AA
db $A8, $88
db $AA, $A8
db $8A, $8C
db $8C, $8A
db $8A, $AC
db $AA, $86
.properties
db $3B, $3B
db $3B, $7B
db $3B, $3B
db $3B, $3B
db $7B, $3B
db $3B, $3B
db $3B, $7B
.sizes
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
db $02, $02
}

View File

@@ -1020,12 +1020,42 @@ LinkState_Minecart:
db -1, 0, 0, 0
}
TileBehavior_TL_Long:
{
LDA.w !MinecartDirection : CMP.b #East : BNE +
+
CMP.b #West
RTL
}
TileBehavior_StopLeft_Long:
{
; Transition back to sprite, put link in state default
LDA.w !LinkInCart : BEQ +
JSL MinecartFollower_TransitionToSprite
STZ.w LinkState
STZ.w !LinkInCart
+
RTL
}
pushpc
org $07A5F7
JSL LinkState_Minecart
RTS
TileBehavior_TL:
JSL TileBehavior_TL_Long
RTS
TileBehavior_StopLeft:
JSL TileBehavior_StopLeft_Long
RTS
assert pc() <= $07A64B
; Minecart Track tile types

View File

@@ -1,6 +1,6 @@
; Goron Sprite
!SPRID = $F2 ; The sprite ID you are overwriting (HEX)
!SPRID = $F2
!NbrTiles = 04 ; Number of tiles used in a frame
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -81,7 +81,7 @@ Sprite_Goron_Main:
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw KalyxoGoron_Main
dw KalyxoGoron_OpenMines

View File

@@ -70,7 +70,7 @@ KorokWalkSpeed = $02
Sprite_Korok_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Sprite_Korok_Idle
dw Sprite_Korok_WalkingDown

View File

@@ -1,6 +1,5 @@
; =========================================================
; Sprite Properties
; =========================================================
; Maku Tree
!SPRID = Sprite_MakuTree
!NbrTiles = 00 ; Number of tiles used in a frame
@@ -32,8 +31,6 @@
%Set_Sprite_Properties(Sprite_MakuTree_Prep, Sprite_MakuTree_Long)
; =========================================================
Sprite_MakuTree_Long:
{
PHB : PHK : PLB
@@ -43,7 +40,6 @@ Sprite_MakuTree_Long:
PLB
RTL
}
; =========================================================
Sprite_MakuTree_Prep:
{
@@ -56,8 +52,6 @@ Sprite_MakuTree_Prep:
RTL
}
; =========================================================
PaletteFilter_StartBlindingWhite = $00EEF1
ApplyPaletteFilter = $00E914
@@ -66,7 +60,7 @@ Sprite_MakuTree_Main:
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw MakuTree_Handler
dw MakuTree_MeetLink
@@ -86,10 +80,6 @@ Sprite_MakuTree_Main:
MakuTree_MeetLink:
{
LDA.w POSX : STA $02
LDA.w POSY : STA $03
LDA.w SprX, X : STA $04
LDA.w SprY, X : STA $05
JSL GetDistance8bit_Long : CMP #$28 : BCS .not_too_close
%ShowUnconditionalMessage($20)
LDA.b #$01 : STA.l MakuTreeQuest

View File

@@ -16,17 +16,16 @@ MapleHandler:
dw Maple_PutLinkToSleep
dw Maple_HandleDreams
; LDA.l $7EF351 : BEQ +
; LDA.b #$02 : STA.l $7EF351
; LDA.b #$1B : STA.w $012F
; STZ.w SprAction, X
; +
Maple_Idle:
{
%ShowSolicitedMessage($01B3) : BCC +
INC.w SprAction, X
+
LDA.l $7EF351 : BEQ +
LDA.b #$02 : STA.l $7EF351
LDA.b #$1B : STA.w $012F
+
RTS
}
@@ -77,9 +76,9 @@ MapleHandler:
Maple_CheckForPendant:
{
; Check for pendant
LDA.l PENDANTS : AND.b #$04 : BNE .courage
LDA.l PENDANTS : AND.b #$02 : BNE .power
LDA.l PENDANTS : AND.b #$01 : BNE .wisdom
LDA.l Pendants : AND.b #$04 : BNE .courage
LDA.l Pendants : AND.b #$02 : BNE .power
LDA.l Pendants : AND.b #$01 : BNE .wisdom
JMP .none
.courage
LDA.l Dreams : AND.b #$04 : BNE .power

View File

@@ -53,7 +53,7 @@ Sprite_MaskSalesman_Main:
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw InquiryHandler
dw NoOcarina
@@ -120,7 +120,7 @@ Sprite_MaskSalesman_Main:
HasOcarina:
{
%PlayAnimation(0, 1, 16)
%ShowSolicitedMessage($080) ; Oh! You got it!
%ShowSolicitedMessage($081) ; Oh! You got it!
%GotoAction(3)
RTS
}

View File

@@ -79,7 +79,7 @@ Sprite_Mermaid_Prep:
Sprite_Mermaid_Main:
{
LDA.w SprMiscE, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw MermaidHandler
dw MapleHandler

View File

@@ -1,8 +1,6 @@
; =========================================================
; Sprite Properties
; =========================================================
; Piratian
!SPRID = $0E ; The sprite ID you are overwriting (HEX)
!SPRID = $0E
!NbrTiles = 02 ; Number of tiles used in a frame
!Harmless = 00 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -44,33 +42,33 @@ Sprite_Piratian_Long:
RTL
}
; =========================================================
Sprite_Piratian_Prep:
{
PHB : PHK : PLB
LDA.l $7EF359 : TAY
LDA.w .health, Y : STA.w SprHealth, X
STZ.w SprMiscA, X
LDA.w SprNbrOAM, X : ORA.b #$80 : STA.w SprNbrOAM, X
PLB
RTL
}
; =========================================================
.health
db $08, $0A, $0C, $0F
}
Sprite_Piratian_Main:
{
JSR Sprite_Piratian_Move
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Piratian_MoveDown
dw Piratian_MoveUp
dw Piratian_MoveLeft
dw Piratian_MoveRight
dw SkullHead
Piratian_MoveDown:
{
%PlayAnimation(0,1,16)
@@ -119,68 +117,38 @@ Sprite_Piratian_Move:
JSL ThrownSprite_TileAndSpriteInteraction_long
JSL Sprite_CheckDamageFromPlayer : BCC .no_dano
LDA.b #$01 : STA.w SprMiscA, X
LDA.w SprNbrOAM, X : AND.b #$7F : STA.w SprNbrOAM, X
%SetTimerA($60)
%SetTimerF($20)
.no_dano
LDA.w SprMiscA, X : BEQ .no_aggro
LDA.b #$10 : STA.w SprTimerA, X
LDA.b #$08
JSL Sprite_ProjectSpeedTowardsPlayer
JSL Sprite_CheckDamageToPlayer
JMP .return
.no_aggro
JSR Sprite_Piratian_Friendly
.return
RTS
}
; =========================================================
Sprite_Piratian_Friendly:
{
LDA.w SprTimerD, X : BNE +
%ShowMessageOnContact($01BB) : BCC +
LDA.b #$FF : STA.w SprTimerD, X
+
RTS
}
Sprite_Piratian_Draw:
{
JSL Sprite_PrepOamCoord
JSL Sprite_OAM_AllocateDeferToPlayer
%DrawSprite()
LDA.w SprFrame, X : TAY ;Animation Frame
LDA .start_index, Y : STA $06
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1
LDY.b #$00
.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
REP #$20
LDA $00 : CLC : ADC .x_offsets, X : STA ($90), Y
AND.w #$0100 : STA $0E
INY
LDA $02 : CLC : ADC .y_offsets, X : STA ($90), Y
CLC : ADC #$0010 : CMP.w #$0100
SEP #$20
BCC .on_screen_y
LDA.b #$F0 : STA ($90), Y ;Put the sprite out of the way
STA $0E
.on_screen_y
PLX ; Pullback Animation Index Offset (without the *2 not 16bit anymore)
INY
LDA .chr, X : STA ($90), Y
INY
LDA .properties, X : STA ($90), Y
PHY
TYA : LSR #2 : TAY
LDA .sizes, X : ORA $0F : STA ($92), Y ; store size in oam buffer
PLY : INY
PLX : DEX : BPL .nextTile
PLX
RTS
; =========================================================
.start_index
db $00, $01, $02, $03, $04, $05, $06, $07, $08, $09
.nbr_of_tiles

View File

@@ -43,13 +43,7 @@ RanchGirl_TeachSong:
.not_started
.running_dialog
.has_song
LDA.b $1A
LSR A
LSR A
LSR A
LSR A
AND.b #$01
STA.w $0DC0,X
LDA.b $1A : LSR #4 : AND.b #$01 : STA.w $0DC0,X
RTL
}

View File

@@ -1,6 +1,6 @@
; Tingle Sprite
!SPRID = $22 ; The sprite ID you are overwriting (HEX)
!SPRID = $22
!NbrTiles = 03 ; Number of tiles used in a frame
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -54,7 +54,7 @@ Sprite_Tingle_Main:
{
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Tingle_Forward
dw Tingle_Right

View File

@@ -31,12 +31,9 @@
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_Vasu_Prep, Sprite_Vasu_Long)
; =========================================================
Sprite_Vasu_Long:
{
PHB : PHK : PLB
LDA.w SprSubtype, X : BNE +
JSR Sprite_Vasu_Draw
JMP ++
@@ -45,14 +42,12 @@ Sprite_Vasu_Long:
++
JSL Sprite_DrawShadow
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
JSR Sprite_Vasu_Main
JSR Sprite_Vasu_Main
.SpriteIsNotActive
PLB
RTL
}
; =========================================================
Sprite_Vasu_Prep:
{
PHB : PHK : PLB
@@ -64,14 +59,12 @@ Sprite_Vasu_Prep:
RTL
}
; =========================================================
Sprite_Vasu_Main:
{
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Vasu_Idle
dw Vasu_MessageHandler
@@ -180,8 +173,6 @@ Sprite_Vasu_Main:
}
}
; =========================================================
Sprite_Vasu_Draw:
{
JSL Sprite_PrepOamCoord

View File

@@ -88,7 +88,7 @@ LiftOrTalk:
Sprite_VillageDog_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Dog_Handler ; 00
dw Dog_LookLeftAtLink ; 01

View File

@@ -3,11 +3,11 @@ Sprite_VillageElder_Main:
%PlayAnimation(2,3,16)
JSL Sprite_PlayerCantPassThrough
REP #$30
LDA.l MAPICON : AND.w #$00FF
LDA.l OOSPROG : AND.w #$00FF
SEP #$30
CMP.b #$02 : BCS .already_met
AND.b #$10 : BNE .already_met
%ShowSolicitedMessage($143) : BCC .no_message
LDA.b #$02 : STA.l $7EF3C7
LDA.l OOSPROG : ORA.b #$10 : STA.l OOSPROG
.no_message
RTS

View File

@@ -52,7 +52,7 @@ Sprite_Zora_Handler:
RTS
.not_princess
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Sprite_Zora_Main
dw Sprite_ZoraPrincess_Main
@@ -68,7 +68,7 @@ Sprite_Zora_Main:
JSR Zora_HandleDialogue
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Zora_Forward
dw Zora_Right
@@ -105,7 +105,7 @@ Zora_TrackHeadToPlayer:
Zora_HandleDialogue:
{
LDA.l CRYSTALS : AND.b #$20 : BEQ +++
LDA.l Crystals : AND.b #$20 : BEQ +++
%ShowSolicitedMessage($01A6)
JMP +
+++

View File

@@ -35,7 +35,7 @@ Sprite_ZoraPrincess_Long:
PHB : PHK : PLB
JSR Sprite_ZoraPrincess_Draw
JSL Sprite_CheckActive : BCC .SpriteIsNotActive
JSR Sprite_ZoraPrincess_Main
JSR Sprite_ZoraPrincess_Main
.SpriteIsNotActive
PLB
RTL
@@ -44,7 +44,7 @@ Sprite_ZoraPrincess_Long:
Sprite_ZoraPrincess_Prep:
{
PHB : PHK : PLB
LDA.l $7EF302 : BEQ .doesnt_have_mask
LDA.l $7EF302 : BEQ .doesnt_have_mask
STZ.w SprState, X ; Kill the sprite
.doesnt_have_mask
@@ -60,7 +60,7 @@ Sprite_ZoraPrincess_Main:
JSL Sprite_PlayerCantPassThrough
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw WaitForLink
dw CheckForSongOfHealing
@@ -79,8 +79,8 @@ Sprite_ZoraPrincess_Main:
CheckForSongOfHealing:
{
%PlayAnimation(0, 1, 10)
LDA $FE : BEQ .ninguna_cancion
STZ $FE
LDA.b SongFlag : BEQ .ninguna_cancion
STZ.b SongFlag
LDA.b #$C0 : STA.w SprTimerD, X
%GotoAction(2)
.ninguna_cancion

View File

@@ -1,8 +1,8 @@
; =========================================================
; Sprite Properties
; =========================================================
; Collectible Sprites
; (Pineapple, Seashell, Sword/Shield, Rock Sirloin)
!SPRID = $52 ; The sprite ID you are overwriting (HEX)
!SPRID = $52
!NbrTiles = 03 ; Number of tiles used in a frame
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_Collectible_Prep, Sprite_Collectible_Long)
; =========================================================
Sprite_Collectible_Long:
{
PHB : PHK : PLB
@@ -59,8 +57,6 @@ Sprite_Collectible_Long:
RTL
}
; =========================================================
Sprite_Collectible_Prep:
{
PHB : PHK : PLB
@@ -80,12 +76,10 @@ Sprite_Collectible_Prep:
RTL
}
; =========================================================
Sprite_Collectible_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw Pineapple
dw Seashell
@@ -139,8 +133,6 @@ Sprite_Collectible_Main:
}
; =========================================================
Sprite_Pineapple_Draw:
{
JSL Sprite_PrepOamCoord
@@ -196,9 +188,6 @@ Sprite_Pineapple_Draw:
RTS
; =========================================================
.start_index
db $00
.nbr_of_tiles
@@ -271,7 +260,6 @@ Sprite_SwordShield_Draw:
RTS
.start_index
db $00
.nbr_of_tiles

View File

@@ -32,8 +32,6 @@
%Set_Sprite_Properties(Sprite_DekuLeaf_Prep, Sprite_DekuLeaf_Long)
; =========================================================
Sprite_DekuLeaf_Long:
{
PHB : PHK : PLB
@@ -50,8 +48,6 @@ Sprite_DekuLeaf_Long:
RTL
}
; =========================================================
Sprite_DekuLeaf_Prep:
{
PHB : PHK : PLB
@@ -62,12 +58,10 @@ Sprite_DekuLeaf_Prep:
RTL
}
; =========================================================
Sprite_DekuLeaf_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw WaitForPlayer
dw Whirlpool_Main
@@ -95,61 +89,35 @@ Sprite_DekuLeaf_Main:
LDA $0AAB : BEQ .not_on
STZ $55 ; Reset cape flag
STZ $0AAB ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $037B ; Reset invincibility flag
STZ $02B2
STZ $55 ; Reset cape flag
STZ $0AAB ; Reset underwater flag
STZ $0351 ; Reset ripple flag
STZ $037B ; Reset invincibility flag
STZ $02B2 ; Reset mask flag
LDA.b $10
CMP.b #$0B
BEQ .exit
LDA.b $10 : CMP.b #$0B : BEQ .exit
LDA.b $8A : AND.b #$40 : STA.b $7B : BEQ .no_mirror_portal
LDA.b $20 : STA.w $1ADF
LDA.b $21 : STA.w $1AEF
LDA.b $22 : STA.w $1ABF
LDA.b $23 : STA.w $1ACF
.no_mirror_portal
LDA.b #$23
LDA.b $8A
AND.b #$40
STA.b $7B
#SetGameModeLikeMirror:
STA.b $11
STZ.w $03F8
LDA.b #$01 : STA.w $02DB
STZ.b $B0
STZ.b $27 : STZ.b $28
LDA.b #$14 : STA.b $5D
BEQ .no_mirror_portal
LDA.b $20
STA.w $1ADF
LDA.b $21
STA.w $1AEF
LDA.b $22
STA.w $1ABF
LDA.b $23
STA.w $1ACF
.no_mirror_portal
LDA.b #$23
#SetGameModeLikeMirror:
STA.b $11
STZ.w $03F8
LDA.b #$01
STA.w $02DB
STZ.b $B0
STZ.b $27
STZ.b $28
LDA.b #$14 ; LINKSTATE 14
STA.b $5D
.not_on
.exit
.not_on
.exit
RTS
}
}
; =========================================================
Sprite_DekuLeaf_Draw:
{
JSL Sprite_PrepOamCoord
@@ -159,7 +127,6 @@ Sprite_DekuLeaf_Draw:
LDA $0DC0, X : CLC : ADC $0D90, X : TAY;Animation Frame
LDA .start_index, Y : STA $06
PHX
LDX .nbr_of_tiles, Y ;amount of tiles -1
LDY.b #$00
@@ -207,9 +174,6 @@ Sprite_DekuLeaf_Draw:
RTS
; =========================================================
.start_index
db $00
.nbr_of_tiles
@@ -280,8 +244,6 @@ Sprite_Whirlpool_Draw:
RTS
.start_index
db $00, $04, $08
.nbr_of_tiles

View File

@@ -1,7 +1,7 @@
; Pushable Ice Block
!SPRID = $D5; The sprite ID you are overwriting (HEX)
!NbrTiles = 03 ; Number of tiles used in a frame
!SPRID = $D5
!NbrTiles = 02
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
!Health = 00 ; Number of Health the sprite have
@@ -11,7 +11,7 @@
!SmallShadow = 00 ; 01 = small shadow, 00 = no shadow
!Shadow = 00 ; 00 = don't draw shadow, 01 = draw a shadow
!Palette = 00 ; Unused in this template (can be 0 to 7)
!Hitbox = 00 ; 00 to 31, can be viewed in sprite draw tool
!Hitbox = 09 ; 00 to 31, can be viewed in sprite draw tool
!Persist = 00 ; 01 = your sprite continue to live offscreen
!Statis = 00 ; 00 = is sprite is alive?, (kill all enemies room)
!CollisionLayer = 00 ; 01 = will check both layer for collision
@@ -33,15 +33,17 @@
Sprite_IceBlock_Long:
{
PHB : PHK : PLB
LDA.w SprMiscC, X : BEQ .not_being_pushed
STZ.w SprMiscC, X
STZ.b $5E ; Clear Links speed
STZ.b LinkSpeedTbl
STZ.b $48 ; Clear push actions bitfield
.not_being_pushed
LDA.w SprTimerA, X : BEQ .retain_momentum
LDA.b #$01 : STA.w SprMiscC, X
LDA.b #$84 : STA.b $48 ; Set statue and push block actions
LDA.b #$04 : STA.b $5E ; Slipping into pit speed
LDA.b #$04 : STA.b LinkSpeedTbl ; Slipping into pit speed
.retain_momentum
JSR Sprite_IceBlock_Draw
@@ -60,122 +62,115 @@ Sprite_IceBlock_Prep:
LDA.w SprY, X : STA.w SprMiscE, X
LDA.w SprXH, X : STA.w SprMiscF, X
LDA.w SprYH, X : STA.w SprMiscG, X
STZ.w SprDefl, X
LDA.w SprHitbox, X : ORA.b #$09 : STA.w SprHitbox, X
PLB
RTL
}
Sprite_IceBlock_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
dw MovementHandler
%PlayAnimation(0, 0, 1)
MovementHandler:
{
%PlayAnimation(0, 0, 1)
JSR Statue_BlockSprites
JSL Sprite_CheckDamageFromPlayer : BCC .no_damage
LDA.w SprMiscD, X : STA.w SprX, X
LDA.w SprMiscE, X : STA.w SprY, X
LDA.w SprMiscF, X : STA.w SprXH, X
LDA.w SprMiscG, X : STA.w SprYH, X
STZ.w SprXSpeed, X : STZ.w SprYSpeed, X
STZ.w SprTimerA, X : STZ.w SprMiscA, X
.no_damage
JSR Statue_BlockSprites
JSL Sprite_CheckDamageFromPlayer : BCC .no_damage
LDA.w SprMiscD, X : STA.w SprX, X
LDA.w SprMiscE, X : STA.w SprY, X
LDA.w SprMiscF, X : STA.w SprXH, X
LDA.w SprMiscG, X : STA.w SprYH, X
STZ.w SprXSpeed, X : STZ.w SprYSpeed, X
.no_damage
STZ.w $0642
JSR Sprite_IceBlock_CheckForSwitch : BCC .no_switch
STZ.w SprXSpeed, X : STZ.w SprYSpeed, X
LDA.b #$01 : STA.w $0642
.no_switch
STZ.w $0642
JSR Sprite_IceBlock_CheckForSwitch : BCC .no_switch
STZ.w SprXSpeed, X : STZ.w SprYSpeed, X
LDA.b #$01 : STA.w $0642
.no_switch
JSL Sprite_Move
JSL Sprite_Get_16_bit_Coords
JSL Sprite_CheckTileCollision
; ----udlr , u = up, d = down, l = left, r = right
LDA.w SprCollision, X : AND.b #$0F : BEQ +
STZ.w SprMiscA, X
+
JSL Sprite_Move ; Sprite MoveXY
JSL Sprite_Get_16_bit_Coords ; Get 16bit coords
JSL Sprite_CheckTileCollision ; Check Tile collision
; ----udlr , u = up, d = down, l = left, r = right
LDA.w SprCollision, X : AND.b #$0F : BEQ +
STZ.w SprMiscA, X
+
; If link is in contact, register a push with the sprite
; Run a timer briefly, and confirm the facing direction
; matches the push direction (cached) and then initiate
; the speed changes if they agree
JSL Sprite_CheckDamageToPlayerSameLayer : BCC .NotInContact
LDA.w SprMiscA, X : BNE .push_cached
LDA.b $26 : STA.w SprMiscA, X
JSR Sprite_ApplyPush
.push_cached
; TODO: Update Link push collision reaction
; If link is in contact, register a push with the sprite
; Run a timer briefly, and confirm the facing direction
; matches the push direction (cached) and then initiate
; the speed changes if they agree
JSL Sprite_CheckDamageToPlayerSameLayer : BCC .NotInContact
LDA.w SprMiscA, X : BNE .push_cached
LDA.b $26 : STA.w SprMiscA, X
JSR ApplyPush
.push_cached
LDA.b #$07 : STA.w SprTimerA, X
STZ.b $5E
JSL Sprite_RepelDash
LDA.w SprTimerB, X : BNE .CancelHookshot
LDA.w SprX, X : AND #$F8 : STA.w SprX, X
LDA.w SprY, X : AND #$F8 : STA.w SprY, X
RTS
.CancelHookshot:
JSL $0FF540
LDA.b #$07 : STA.w SprTimerA, X
STZ.b $5E
JSL Sprite_RepelDash
LDA.w SprTimerB, X : BNE .CancelHookshot
LDA.w SprX, X : AND #$F8 : STA.w SprX, X
LDA.w SprY, X : AND #$F8 : STA.w SprY, X
RTS
.NotInContact:
LDA.w SprTimerA, X : BNE .delay_timer
LDA.b #$0D : STA.w SprTimerB,X
.delay_timer
.CancelHookshot:
JSL Sprite_CancelHookshot
RTS
}
.NotInContact:
ApplyPush:
{
; Only apply the push if the facing direction
; and pushing direction agree with each other
LDA $26 : CMP.b #$01 : BEQ .push_right
CMP.b #$02 : BEQ .push_left
CMP.b #$04 : BEQ .push_down
CMP.b #$08 : BEQ .push_up
LDA.w SprTimerA, X : BNE .delay_timer
LDA.b #$0D : STA.w SprTimerB, X
.delay_timer
RTS
}
.push_right
LDA #16 : STA.w SprXSpeed, X
STZ.w SprYSpeed, X
JMP +
.push_left
LDA #-16 : STA.w SprXSpeed, X
STZ.w SprYSpeed, X
JMP +
.push_down
STZ.w SprXSpeed, X
LDA #16 : STA.w SprYSpeed, X
JMP +
.push_up
STZ.w SprXSpeed, X
LDA #-16 : STA.w SprYSpeed, X
+
Sprite_ApplyPush:
{
; Only apply the push if the facing direction
; and pushing direction agree with each other
LDA.w SprMiscA, X : CMP.b $26 : BEQ .push
RTS
}
.push
LDA $26 : CMP.b #$01 : BEQ .push_right
CMP.b #$02 : BEQ .push_left
CMP.b #$04 : BEQ .push_down
CMP.b #$08 : BEQ .push_up
.push_right
LDA #16 : STA.w SprXSpeed, X : STZ.w SprYSpeed, X
JMP +
.push_left
LDA #-16 : STA.w SprXSpeed, X : STZ.w SprYSpeed, X
JMP +
.push_down
LDA #16 : STA.w SprYSpeed, X : STZ.w SprXSpeed, X
JMP +
.push_up
LDA #-16 : STA.w SprYSpeed, X : STZ.w SprXSpeed, X
+
RTS
}
; Check if the tile beneath the sprite is the sliding ice
; Currently unused as it doesnt play well with the hitbox choices
IceBlock_CheckForGround:
{
LDA.w SprY,X : CLC : ADC.b #$08 : STA.b $00
LDA.w SprYH,X : ADC.b #$00 : STA.b $01
LDA.w SprX,X : STA.b $02
LDA.w SprXH,X : ADC.b #$00 : STA.b $03
LDA.w $0F20,X
LDA.w SprY, X : CLC : ADC.b #$08 : STA.b $00
LDA.w SprYH, X : ADC.b #$00 : STA.b $01
LDA.w SprX, X : STA.b $02
LDA.w SprXH, X : ADC.b #$00 : STA.b $03
LDA.w SprFloor, X
PHY
JSL $06E87B ; GetTileType_long
JSL Sprite_GetTileAttr
PLY
LDA.w $0FA5
CMP.b #$0E : BNE .stop
SEC
RTS
.stop
STZ.w SprXSpeed,X
STZ.w SprYSpeed,X
LDA.w $0FA5 : CMP.b #$0E : BNE .stop
SEC
RTS
.stop
STZ.w SprXSpeed, X
STZ.w SprYSpeed, X
CLC
RTS
}
@@ -185,14 +180,14 @@ Sprite_IceBlock_CheckForSwitch:
LDY.b #$03
.next_tile
LDA.w SprY,X : CLC : ADC.w .offset_y,Y : STA.b $00
LDA.w SprYH,X : ADC.b #$00 : STA.b $01
LDA.w SprX,X : CLC : ADC.w .offset_x,Y : STA.b $02
LDA.w SprXH,X : ADC.b #$00 : STA.b $03
LDA.w $0F20,X
LDA.w SprY, X : CLC : ADC.w .offset_y, Y : STA.b $00
LDA.w SprYH, X : ADC.b #$00 : STA.b $01
LDA.w SprX, X : CLC : ADC.w .offset_x, Y : STA.b $02
LDA.w SprXH, X : ADC.b #$00 : STA.b $03
LDA.w SprFloor, X
PHY
JSL $06E87B ; GetTileType_long
JSL Sprite_GetTileAttr
PLY
LDA.w $0FA5
@@ -227,71 +222,38 @@ Statue_BlockSprites:
LDY.b #$0F
.next
LDA.w $0E20,Y
CMP.b #$1C ; SPRITE 1C
BEQ .skip
; SPRITE 1C
LDA.w SprType, Y : CMP.b #$1C : BEQ .skip
CPY.w SprSlot : BEQ .skip
TYA : EOR.b $1A : AND.b #$01 : BNE .skip
LDA.w SprState, Y : CMP.b #$09 : BCC .skip
CPY.w $0FA0
BEQ .skip
TYA
EOR.b $1A
AND.b #$01
BNE .skip
LDA.w SprState,Y
CMP.b #$09
BCC .skip
LDA.w SprX,Y
STA.b $04
LDA.w SprXH,Y
STA.b $05
LDA.w SprY,Y
STA.b $06
LDA.w SprYH,Y
STA.b $07
LDA.w SprX, Y : STA.b $04
LDA.w SprXH, Y : STA.b $05
LDA.w SprY, Y : STA.b $06
LDA.w SprYH, Y : STA.b $07
REP #$20
LDA.w SprCachedX
SEC
SBC.b $04
CLC
ADC.w #$000C
LDA.w SprCachedX
SEC : SBC.b $04
CLC : ADC.w #$000C : CMP.w #$0018 : BCS .skip
CMP.w #$0018
BCS .skip
LDA.w SprCachedY
SEC
SBC.b $06
CLC
ADC.w #$000C
CMP.w #$0024
BCS .skip
LDA.w SprCachedY
SEC : SBC.b $06
CLC : ADC.w #$000C : CMP.w #$0024 : BCS .skip
SEP #$20
LDA.b #$04
STA.w $0EA0,Y
LDA.b #$04 : STA.w $0EA0, Y
PHY
LDA.b #$20
JSL Sprite_CheckSlopedTileCollision ; JSR Sprite_ProjectSpeedTowardsLocation
PLY
LDA.b $00
STA.w SprYRecoil,Y
LDA.b $01
STA.w SprXRecoil,Y
LDA.b $00 : STA.w SprYRecoil, Y
LDA.b $01 : STA.w SprXRecoil, Y
.skip
SEP #$20

View File

@@ -0,0 +1,53 @@
; Magic Pedestal Sprite
;
; Zora Temple (Map 1E)
; Goron Desert (Map 36)
; Fortress Secrets (Map 5E)
pushpc
org $1EE05F
JSL CheckForBook
pullpc
CheckForBook:
{
LDA.b $2F : BNE .exit
JSL Sprite_CheckDamageToPlayer : BCC .exit
LDA.w $0202 : CMP.b #$0F : BNE .not_holding_book
LDY.b #$01 : BIT.b $F4 : BVS .not_pressing_y
.not_holding_book
LDY.b #$00
.not_pressing_y
CPY.b #$01 : BNE .no_book_pose
STZ.w $0300
LDA.b #$20
STA.w $037A
STZ.w $012E
.no_book_pose
JSR PedestalPlaque
.exit
LDA.b AreaIndex : CMP.b #$30
RTL
}
PedestalPlaque:
{
LDA.b AreaIndex : CMP.b #$1E : BEQ .zora_temple
CMP.b #$36 : BEQ .goron_desert
CMP.b #$5E : BEQ .fortress_secrets
JMP .return
.zora_temple
LDA.l $7EF29E : AND.b #$20 : BNE .return
LDA.b SongFlag : CMP.b #$03 : BNE .return
LDA.b #$01 : STA $04C6
STZ.b SongFlag
JMP .return
.goron_desert
.fortress_secrets
.return
RTS
}

View File

@@ -73,7 +73,7 @@ BlueSpriteIndex = $7E0632
Sprite_Portal_Main:
{
LDA.w SprAction, X
JSL UseImplicitRegIndexedLocalJumpTable
JSL JumpTableLocal
dw StateHandler
dw BluePortal
@@ -104,7 +104,6 @@ Sprite_Portal_Main:
LDA.w SprY, X : STA.w BluePortal_X
LDA.w SprX, X : STA.w BluePortal_Y
LDA.b #$02 : STA.w SprSubtype, X
%GotoAction(1)
RTS
}
@@ -124,9 +123,7 @@ Sprite_Portal_Main:
JSL $0683EA ; Sprite_SetupHitbox_long
JSL CheckIfHitBoxesOverlap : BCC .NoOverlap
CLC
LDA $1B : BEQ .outdoors
%GotoAction(3) ; BluePortal_WarpDungeon
.NoOverlap
RTS
@@ -171,10 +168,6 @@ Sprite_Portal_Main:
LDA $7EC18A : STA $0604
LDA $7EC18C : STA $0608
LDA $7EC18E : STA $060C
; LDA $7EC190 : STA $0610
; LDA $7EC192 : STA $0612
; LDA $7EC194 : STA $0614
; LDA $7EC196 : STA $0616
PHX
LDA.w OrangeSpriteIndex : TAX
@@ -200,10 +193,6 @@ Sprite_Portal_Main:
LDA $7EC18A : STA $0604 ; Small Room South
LDA $7EC18C : STA $0608 ; Small Room West
LDA $7EC18E : STA $060C ; Small Room South
; LDA $7EC190 : STA $0610
; LDA $7EC192 : STA $0612
; LDA $7EC194 : STA $0614
; LDA $7EC196 : STA $0616
PHX
LDA.w BlueSpriteIndex : TAX

View File

@@ -82,6 +82,9 @@ print "End of bottle_vendor.asm ", pc
incsrc "Sprites/Enemies/leever.asm"
print "End of leever.asm ", pc
incsrc "Sprites/Objects/pedestal.asm"
print "End of pedestal.asm ", pc
DontTeleportWithoutFlippers:
{
LDA.l $7EF356 : BNE +
@@ -432,3 +435,6 @@ SpriteDraw_RunningBoy:
#_05EA3D: dw 0, -7 : db $2E, $40, $00, $02
#_05EA45: dw 0, 1 : db $CE, $4E, $00, $02
; Sword Barrier Sprite Prep
; Skip overworld flag check, sprite is indoors now
org $06891B : NOP #12

View File

@@ -2,7 +2,7 @@
SummonGuards:
{
LDA.l SWORD : CMP.b #$02 : BNE +
LDA.l Sword : CMP.b #$02 : BNE +
JSR Overlord_SpawnSoldierPath
+
RTL