Applied labels and byte designators
This commit is contained in:
@@ -4,22 +4,22 @@
|
||||
LoadLibraryItemGFX:
|
||||
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
%GetPossiblyEncryptedItem(LibraryItem, SpriteItemValues)
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w SpriteID, X
|
||||
JSL.l PrepDynamicTile_loot_resolved
|
||||
JSL PrepDynamicTile_loot_resolved
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DrawLibraryItemGFX:
|
||||
PHA
|
||||
LDA.w SpriteID, X
|
||||
JSL.l DrawDynamicTile
|
||||
JSL DrawDynamicTile
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
SetLibraryItem:
|
||||
LDY.w SpriteID, X
|
||||
JSL.l ItemSet_Library ; contains thing we wrote over
|
||||
JSL ItemSet_Library ; contains thing we wrote over
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -31,13 +31,13 @@ LoadBonkItemGFX:
|
||||
LDA.b #$08 : STA.w SpriteOAMProp, X ; thing we wrote over
|
||||
LoadBonkItemGFX_inner:
|
||||
LDA.b #$00 : STA.l RedrawFlag
|
||||
JSR LoadBonkItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
JSR LoadBonkItem
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSL.l ResolveLootIDLong
|
||||
STA.w SpriteItemType, X
|
||||
JSL AttemptItemSubstitution
|
||||
JSL ResolveLootIDLong
|
||||
STA.w $0E80, X
|
||||
STA.w SpriteID, X
|
||||
JSL.l PrepDynamicTile
|
||||
JSL PrepDynamicTile
|
||||
PHA : PHX
|
||||
LDA.w SpriteID,X : TAX
|
||||
LDA.l SpriteProperties_standing_width,X : BNE +
|
||||
@@ -49,37 +49,37 @@ RTL
|
||||
DrawBonkItemGFX:
|
||||
PHA
|
||||
LDA.l RedrawFlag : BEQ .skipInit
|
||||
JSL.l LoadBonkItemGFX_inner
|
||||
JSL LoadBonkItemGFX_inner
|
||||
BRA .done ; don't draw on the init frame
|
||||
|
||||
.skipInit
|
||||
LDA.w SpriteID,X
|
||||
JSL.l DrawDynamicTileNoShadow
|
||||
JSL DrawDynamicTileNoShadow
|
||||
|
||||
.done
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
GiveBonkItem:
|
||||
JSR LoadBonkItem_Player : STA !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSR LoadBonkItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
|
||||
JSR LoadBonkItem
|
||||
JSR.w AbsorbKeyCheck : BCC .notKey
|
||||
JSR AbsorbKeyCheck : BCC .notKey
|
||||
.key
|
||||
PHY : LDY.b #$24 : JSL.l 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.b #$2F : JSL.l Sound_SetSfx3PanLong
|
||||
LDA.b #$2F : JSL Sound_SetSfx3PanLong
|
||||
INC.w UpdateHUDFlag
|
||||
RTL
|
||||
.notKey
|
||||
PHY : TAY : JSL.l Link_ReceiveItem : PLY
|
||||
PHY : TAY : JSL Link_ReceiveItem : PLY
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadBonkItem:
|
||||
LDA.b RoomIndex ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
CMP.b #115 : BNE + ; Desert Bonk Key
|
||||
CMP.b #$73 : BNE + ; Desert Bonk Key
|
||||
LDA.l BonkKey_Desert
|
||||
BRA ++
|
||||
+ : CMP.b #140 : BNE + ; GTower Bonk Key
|
||||
+ : CMP.b #$8C : BNE + ; GTower Bonk Key
|
||||
LDA.l BonkKey_GTower
|
||||
BRA ++
|
||||
+
|
||||
@@ -88,11 +88,11 @@ LoadBonkItem:
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
LoadBonkItem_Player:
|
||||
LDA $A0 ; check room ID - only bonk keys in 2 rooms so we're just checking the lower byte
|
||||
CMP #115 : BNE + ; Desert Bonk Key
|
||||
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
|
||||
LDA.l BonkKey_Desert_Player
|
||||
BRA ++
|
||||
+ : CMP #140 : BNE + ; GTower Bonk Key
|
||||
+ : CMP.b #$8C : BNE + ; GTower Bonk Key
|
||||
LDA.l BonkKey_GTower_Player
|
||||
BRA ++
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user