Formatting

This commit is contained in:
codemann8
2024-04-05 21:00:55 -05:00
committed by aerinon
parent a70251d2b2
commit 0339e09b5d
5 changed files with 245 additions and 247 deletions

View File

@@ -2,24 +2,24 @@
; Randomize Book of Mudora ; Randomize Book of Mudora
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadLibraryItemGFX: LoadLibraryItemGFX:
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID LDA.l LibraryItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues) %GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
JSL AttemptItemSubstitution JSL AttemptItemSubstitution
JSL ResolveLootIDLong JSL ResolveLootIDLong
STA.w SpriteID, X STA.w SpriteID, X
JSL PrepDynamicTile_loot_resolved JSL PrepDynamicTile_loot_resolved
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawLibraryItemGFX: DrawLibraryItemGFX:
PHA PHA
LDA.w SpriteID, X LDA.w SpriteID, X
JSL DrawDynamicTile JSL DrawDynamicTile
PLA PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
SetLibraryItem: SetLibraryItem:
LDY.w SpriteID, X LDY.w SpriteID, X
JSL ItemSet_Library ; contains thing we wrote over JSL ItemSet_Library ; contains thing we wrote over
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
@@ -28,90 +28,89 @@ RTL
; Randomize Bonk Keys ; Randomize Bonk Keys
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadBonkItemGFX: LoadBonkItemGFX:
LDA.b #$08 : STA.w SpriteOAMProp, X ; thing we wrote over LDA.b #$08 : STA.w SpriteOAMProp, X ; thing we wrote over
LoadBonkItemGFX_inner: LoadBonkItemGFX_inner:
LDA.b #$00 : STA.l RedrawFlag LDA.b #$00 : STA.l RedrawFlag
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID JSR LoadBonkItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
JSR LoadBonkItem JSR LoadBonkItem
JSL AttemptItemSubstitution JSL AttemptItemSubstitution
JSL ResolveLootIDLong JSL ResolveLootIDLong
STA.w $0E80, X STA.w $0E80, X
STA.w SpriteID, X STA.w SpriteID, X
JSL PrepDynamicTile JSL PrepDynamicTile
PHA : PHX PHA : PHX
LDA.w SpriteID,X : TAX LDA.w SpriteID,X : TAX
LDA.l SpriteProperties_standing_width,X : BNE + LDA.l SpriteProperties_standing_width,X : BNE +
LDA.b #$00 : STA.l SpriteOAM : STA.l SpriteOAM+8 LDA.b #$00 : STA.l SpriteOAM : STA.l SpriteOAM+8
+ +
PLX : PLA PLX : PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawBonkItemGFX: DrawBonkItemGFX:
PHA PHA
LDA.l RedrawFlag : BEQ .skipInit LDA.l RedrawFlag : BEQ .skipInit
JSL LoadBonkItemGFX_inner JSL LoadBonkItemGFX_inner
BRA .done ; don't draw on the init frame BRA .done ; don't draw on the init frame
.skipInit .skipInit
LDA.w SpriteID,X LDA.w SpriteID,X
JSL DrawDynamicTileNoShadow JSL DrawDynamicTileNoShadow
.done .done
PLA PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
GiveBonkItem: GiveBonkItem:
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID JSR LoadBonkItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
JSR LoadBonkItem JSR LoadBonkItem
JSR AbsorbKeyCheck : BCC .notKey JSR AbsorbKeyCheck : BCC .notKey
.key PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys LDA.b #$2F : JSL Sound_SetSfx3PanLong
LDA.b #$2F : JSL Sound_SetSfx3PanLong INC.w UpdateHUDFlag
INC.w UpdateHUDFlag RTL
RTL
.notKey .notKey
PHY : TAY : JSL Link_ReceiveItem : PLY PHY : TAY : JSL Link_ReceiveItem : PLY
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadBonkItem: LoadBonkItem:
LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP.b #$73 : BNE + ; Desert Bonk Key CMP.b #$73 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert LDA.l BonkKey_Desert
BRA ++ BRA ++
+ : CMP.b #$8C : BNE + ; GTower Bonk Key + : CMP.b #$8C : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower LDA.l BonkKey_GTower
BRA ++ BRA ++
+ +
LDA.b #$24 ; default to small key LDA.b #$24 ; default to small key
++ ++
RTS RTS
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadBonkItem_Player: LoadBonkItem_Player:
LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
CMP.b #$73 : BNE + ; Desert Bonk Key CMP.b #$73 : BNE + ; Desert Bonk Key
LDA.l BonkKey_Desert_Player LDA.l BonkKey_Desert_Player
BRA ++ BRA ++
+ : CMP.b #$8C : BNE + ; GTower Bonk Key + : CMP.b #$8C : BNE + ; GTower Bonk Key
LDA.l BonkKey_GTower_Player LDA.l BonkKey_GTower_Player
BRA ++ BRA ++
+ +
LDA.b #$00 LDA.b #$00
++ ++
RTS RTS
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
AbsorbKeyCheck: AbsorbKeyCheck:
PHA PHA
CMP.b #$24 : BEQ .key CMP.b #$24 : BEQ .key
CMP.b #$A0 : BCC .not_key CMP.b #$A0 : BCC .not_key
CMP.b #$B0 : BCS .not_key CMP.b #$B0 : BCS .not_key
AND.b #$0F : ASL AND.b #$0F : ASL
CMP.w DungeonID : BNE .not_key CMP.w DungeonID : BNE .not_key
.key .key
PLA PLA
SEC SEC
RTS RTS
.not_key .not_key
PLA PLA
CLC CLC
RTS RTS

View File

@@ -2,65 +2,65 @@
; Randomize Heart Pieces ; Randomize Heart Pieces
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HeartPieceGet: HeartPieceGet:
PHX : PHY PHX : PHY
TAY
.skipLoad
JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_ITEM_PLAYER_ID
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .not_heart
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter
.not_heart
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JSL MaybeUnlockTabletAnimation
JSL LoadHeartPieceRoomValue JSL LoadHeartPieceRoomValue
JSL AttemptItemSubstitution JSL AttemptItemSubstitution
JSL ResolveLootIDLong JSL ResolveLootIDLong
TAY
JSL MaybeMarkDigSpotCollected JSL MaybeMarkDigSpotCollected
.skipLoad
JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_ITEM_PLAYER_ID
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .not_heart
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter
.not_heart
JSL Player_HaltDashAttackLong JSL Player_HaltDashAttackLong
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JSL Link_ReceiveItem JSL Link_ReceiveItem
JSL MaybeUnlockTabletAnimation
PLY : PLX PLY : PLX
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HeartContainerGet: HeartContainerGet:
PHX : PHY PHX : PHY
LDY.w SpriteID, X : BNE +
+
BRA HeartPieceGet_skipLoad
JSL IncrementBossSword JSL IncrementBossSword
LDY.w SpriteID, X : BNE +
JSL LoadHeartContainerRoomValue : TAY JSL LoadHeartContainerRoomValue : TAY
+
BRA HeartPieceGet_skipLoad
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawHeartPieceGFX: DrawHeartPieceGFX:
PHP PHP
PHA : PHY
LDA.l RedrawFlag : BEQ .skipInit ; skip init if already ready
JMP .done ; don't draw on the init frame
.skipInit
LDA.w SpriteID, X ; Retrieve stored item type
.skipLoad
PHA : PHX
TAX
LDA.l SpriteProperties_standing_width,X : BNE +
PLX
LDA.w SpriteControl, X : ORA.b #$20 : STA.w SpriteControl, X
PLA
LDA.b Scrap00
CLC : ADC.b #$04
STA.b Scrap00
BRA .done
+
PLX
PLA
.done
PLY : PLA
.offscreen
PLP
JSL Sprite_IsOnscreen : BCC .offscreen JSL Sprite_IsOnscreen : BCC .offscreen
PHA : PHY
LDA.l RedrawFlag : BEQ .skipInit ; skip init if already ready
JSL HeartPieceSpritePrep JSL HeartPieceSpritePrep
JMP .done ; don't draw on the init frame
.skipInit
LDA.w SpriteID, X ; Retrieve stored item type
.skipLoad
PHA : PHX
TAX
LDA.l SpriteProperties_standing_width,X : BNE +
PLX
LDA.w SpriteControl, X : ORA.b #$20 : STA.w SpriteControl, X
PLA
JSL DrawDynamicTile JSL DrawDynamicTile
LDA.b Scrap00
CLC : ADC.b #$04
STA.b Scrap00
JSL Sprite_DrawShadowLong JSL Sprite_DrawShadowLong
BRA .done
+
PLX
PLA
JSL DrawDynamicTile JSL DrawDynamicTile
JSL Sprite_DrawShadowLong JSL Sprite_DrawShadowLong
.done
PLY : PLA
.offscreen
PLP
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawHeartContainerGFX: DrawHeartContainerGFX:
@@ -78,119 +78,118 @@ DrawHeartContainerGFX:
BRA DrawHeartPieceGFX_skipLoad BRA DrawHeartPieceGFX_skipLoad
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HeartContainerSound: HeartContainerSound:
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE + LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
LDA.w ItemReceiptMethod : CMP.b #$03 : BEQ + LDA.w ItemReceiptMethod : CMP.b #$03 : BEQ +
LDA.b #$2E
SEC
RTL
+
CLC
JSL CheckIfBossRoom : BCC + ; Skip if not in a boss room JSL CheckIfBossRoom : BCC + ; Skip if not in a boss room
LDA.b #$2E
SEC
RTL
+
CLC
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
NormalItemSkipSound: NormalItemSkipSound:
; Out: c - skip sounds if set ; Out: c - skip sounds if set
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .skip LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .skip
JSL.l CheckIfBossRoom : BCS .boss_room JSL CheckIfBossRoom : BCS .boss_room
TDC TDC
CPY #$17 : BEQ .skip CPY.b #$17 : BEQ .skip
CLC
RTL
.boss_room
LDA.w ItemReceiptMethod : CMP.b #$03 : BEQ +
.skip
SEC
RTL
+
LDA.b #$20
.dont_skip
CLC CLC
RTL
.boss_room
LDA.w ItemReceiptMethod : CMP.b #$03 : BEQ +
.skip
SEC
RTL
+
LDA.b #$20
.dont_skip
CLC
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HeartPieceSpritePrep: HeartPieceSpritePrep:
PHA PHA
LDA.l ServerRequestMode : BEQ + : : + LDA.l ServerRequestMode : BEQ + : : +
LDA.b #$01 : STA.l RedrawFlag LDA.b #$01 : STA.l RedrawFlag
LDA.b LinkState : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror LDA.b LinkState : CMP.b #$14 : BEQ .skip ; skip if we're mid-mirror
LDA.b #$00 : STA.l RedrawFlag LDA.b #$00 : STA.l RedrawFlag
JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
STA.w SpriteID, X
JSL LoadHeartPieceRoomValue JSL LoadHeartPieceRoomValue
JSL AttemptItemSubstitution JSL AttemptItemSubstitution
JSL ResolveLootIDLong JSL ResolveLootIDLong
STA.w SpriteID, X
JSL PrepDynamicTile_loot_resolved JSL PrepDynamicTile_loot_resolved
.skip .skip
PLA PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HeartContainerSpritePrep: HeartContainerSpritePrep:
PHA PHA
LDA.b #$00 : STA.l RedrawFlag LDA.b #$00 : STA.l RedrawFlag
JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID JSL HeartPieceGetPlayer : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
STA.w SpriteID, X
JSL LoadHeartContainerRoomValue ; load item type JSL LoadHeartContainerRoomValue ; load item type
JSL AttemptItemSubstitution JSL AttemptItemSubstitution
JSL ResolveLootIDLong JSL ResolveLootIDLong
STA.w SpriteID, X
JSL PrepDynamicTile_loot_resolved JSL PrepDynamicTile_loot_resolved
PLA PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
LoadHeartPieceRoomValue: LoadHeartPieceRoomValue:
LDA.b IndoorsFlag : BEQ .outdoors ; check if we're indoors or outdoors LDA.b IndoorsFlag : BEQ .outdoors ; check if we're indoors or outdoors
.indoors .indoors
JMP .done
.outdoors
.done
JSL LoadIndoorValue JSL LoadIndoorValue
JMP .done
.outdoors
JSL LoadOutdoorValue JSL LoadOutdoorValue
.done
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
HPItemReset: HPItemReset:
PHA PHA
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .skip LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE .skip
PLA PLA
BRA .done
.skip
PLA
.done
PHA : LDA.b #$01 : STA.l RedrawFlag : PLA
JSL GiveRupeeGift ; thing we wrote over JSL GiveRupeeGift ; thing we wrote over
BRA .done
.skip
PLA
.done
PHA : LDA.b #$01 : STA.l RedrawFlag : PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
MaybeMarkDigSpotCollected: MaybeMarkDigSpotCollected:
PHA : PHP PHA : PHP
LDA.b IndoorsFlag : BNE + LDA.b IndoorsFlag : BNE +
REP #$20 ; set 16-bit accumulator REP #$20 ; set 16-bit accumulator
LDA.b OverworldIndex LDA.b OverworldIndex : CMP.w #$002A : BNE +
CMP.w #$2A : BNE + LDA.l HasGroveItem : ORA.w #$0001 : STA.l HasGroveItem
LDA.l HasGroveItem : ORA.w #$0001 : STA.l HasGroveItem +
+ PLP : PLA
PLP : PLA
RTL RTL
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
macro GetPossiblyEncryptedItem(ItemLabel,TableLabel) macro GetPossiblyEncryptedItem(ItemLabel,TableLabel)
LDA.l IsEncrypted : BNE ?encrypted LDA.l IsEncrypted : BNE ?encrypted
LDA.l <ItemLabel> LDA.l <ItemLabel>
BRA ?done BRA ?done
?encrypted: ?encrypted:
PHX : PHP PHX : PHP
REP #$30 ; set 16-bit accumulator & index registers REP #$30 ; set 16-bit accumulator & index registers
LDA.b Scrap00 : PHA : LDA.b Scrap02 : PHA LDA.b Scrap00 : PHA : LDA.b Scrap02 : PHA
LDA.w #<TableLabel> : STA.b Scrap00 LDA.w #<TableLabel> : STA.b Scrap00
LDA.w #<TableLabel>>>16 : STA.b Scrap02 LDA.w #<TableLabel>>>16 : STA.b Scrap02
LDA.w #<ItemLabel>-<TableLabel> LDA.w #<ItemLabel>-<TableLabel>
JSL RetrieveValueFromEncryptedTable JSL RetrieveValueFromEncryptedTable
PLX : STX.b Scrap02 : PLX : STX.b Scrap01 PLX : STX.b Scrap02 : PLX : STX.b Scrap01
PLP : PLX PLP : PLX
?done: ?done:
endmacro endmacro
LoadIndoorValue: LoadIndoorValue:
@@ -224,10 +223,10 @@ LoadIndoorValue:
LDA.l StandingKey_Hera LDA.l StandingKey_Hera
JMP .done JMP .done
+ +
PHX PHX
LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite
LDA.w SpriteID,X ; we can see and are interacting with LDA.w SpriteID,X ; we can see and are interacting with
PLX PLX
.done .done
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
PLP PLP
@@ -290,10 +289,10 @@ LoadOutdoorValue:
%GetPossiblyEncryptedItem(HeartPiece_Zora, HeartPieceOutdoorValues) %GetPossiblyEncryptedItem(HeartPiece_Zora, HeartPieceOutdoorValues)
JMP .done JMP .done
+ +
PHX PHX
LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite LDX.w CurrentSpriteSlot ; If we're on a different screen ID via glitches load the sprite
LDA.w SpriteID,X ; we can see and are interacting with. LDA.w SpriteID,X ; we can see and are interacting with.
PLX PLX
.done .done
AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before AND.w #$00FF ; the loads are words but the values are 1-byte so we need to clear the top half of the accumulator - no guarantee it was 8-bit before
PLP PLP

View File

@@ -138,8 +138,8 @@ RTL
GanonTowerAnimation: GanonTowerAnimation:
LDA.l InvertedMode : BEQ .done LDA.l InvertedMode : BEQ .done
LDA.b #$1B : STA.w SFX3 LDA.b #$1B : STA.w SFX3
STZ.w OWEntranceCutscene STZ.w OWEntranceCutscene
STZ.b SubSubModule STZ.b SubSubModule
STZ.w SkipOAM STZ.w SkipOAM
@@ -155,10 +155,10 @@ GanonTowerAnimation:
LDA.b #$09 : STA.w SFX1 LDA.b #$09 : STA.w SFX1
RTL RTL
.done .done
LDA.b #$05 : STA.w OWEntranceCutscene ; what we wrote over LDA.b #$05 : STA.w OWEntranceCutscene ; what we wrote over
STZ.b SubSubModule ; (continued) STZ.b SubSubModule ; (continued)
STZ.b ScrapBufferBD+$0B ; (continued) STZ.b ScrapBufferBD+$0B ; (continued)
RTL RTL
GanonTowerInvertedCheck: GanonTowerInvertedCheck:
@@ -195,44 +195,44 @@ TurtleRockPegSolved:
RTL RTL
MirrorBonk: MirrorBonk:
; must preserve X/Y, and must preserve $00-$0F ; must preserve X/Y, and must preserve $00-$0F
LDA.l InvertedMode : BEQ .normal LDA.l InvertedMode : BEQ .normal
; Goal: use $20 and $22 to decide to force a bonk ; Goal: use $20 and $22 to decide to force a bonk
; if we want to bonk branch to .forceBonk ; if we want to bonk branch to .forceBonk
; otherwise fall through to .normal ; otherwise fall through to .normal
PHX : PHP PHX : PHP
PHB : PHK : PLB PHB : PHK : PLB
LDA.b OverworldIndex : AND.b #$40 : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks LDA.b OverworldIndex : AND.b #$40 : BEQ .endLoop ;World we're in? branch if we are in LW we don't want bonks
REP #$30 REP #$30
LDX.w #$0000 LDX.w #$0000
.loop .loop
LDA.l .bonkRectanglesTable, X ;Load X1 LDA.l .bonkRectanglesTable, X ;Load X1
CMP.b LinkPosX : !BGE ++ CMP.b LinkPosX : !BGE ++
;IF X > X1 ;IF X > X1
LDA.l .bonkRectanglesTable+2, X ; Load X2 LDA.l .bonkRectanglesTable+2, X ; Load X2
CMP.b LinkPosX : !BLT ++ CMP.b LinkPosX : !BLT ++
;IF X < X2 ;IF X < X2
LDA.l .bonkRectanglesTable+4, X ;Load Y1 LDA.l .bonkRectanglesTable+4, X ;Load Y1
CMP.b LinkPosY : !BGE ++ CMP.b LinkPosY : !BGE ++
;IF Y > Y1 ;IF Y > Y1
LDA.l .bonkRectanglesTable+6, X ; Load Y2 LDA.l .bonkRectanglesTable+6, X ; Load Y2
CMP.b LinkPosY : !BLT ++ CMP.b LinkPosY : !BLT ++
;IF Y < Y2 ;IF Y < Y2
;Bonk Here ;Bonk Here
PLB : PLP : PLX PLB : PLP : PLX
BRA .forceBonk BRA .forceBonk
++ ++
TAX
BRA .loop
.endbonkRectanglesTable
.endLoop
PLB : PLP : PLX
.normal
;Not forcing a bonk, so the vanilla bonk detection run.
LDA.b Scrap0C : ORA.b Scrap0E
TXA : !ADD.w #$0008 : CMP.w #.tableEnd-.bonkRectanglesTable : BEQ .endLoop TXA : !ADD.w #$0008 : CMP.w #.tableEnd-.bonkRectanglesTable : BEQ .endLoop
TAX
BRA .loop
.endbonkRectanglesTable
.endLoop
PLB : PLP : PLX
.normal
;Not forcing a bonk, so the vanilla bonk detection run.
LDA.b Scrap0C : ORA.b Scrap0E
JML MirrorBonk_NormalReturn JML MirrorBonk_NormalReturn
.forceBonk .forceBonk
JML MirrorBonk_BranchGamma JML MirrorBonk_BranchGamma

View File

@@ -23,7 +23,7 @@ org $86E3C4
JSL RevealSpriteDrop2 : NOP JSL RevealSpriteDrop2 : NOP
org $86F933 org $86F933
JSL PikitOverride JSL PikitOverride
org $86926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X) org $86926e ; <- 3126e - sprite_prep.asm : 2664 (LDA $0B9B : STA $0CBA, X)
JSL SpriteKeyPrep : NOP #2 JSL SpriteKeyPrep : NOP #2

View File

@@ -211,14 +211,14 @@ LoadCatfishItemGFX:
JML PrepDynamicTile_loot_resolved JML PrepDynamicTile_loot_resolved
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
DrawThrownItem: DrawThrownItem:
LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish
.zora .zora
LDA.b #$01 : STA.l RedrawFlag LDA.b #$01 : STA.l RedrawFlag
BRA .draw BRA .draw
.catfish .catfish
.draw .draw
LDA.w SpriteID,X LDA.w SpriteID,X
JML DrawDynamicTile JML DrawDynamicTile
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
MarkThrownItem: MarkThrownItem:
PHA PHA