Refactor inventory.asm
Refactor extended save data to use MVN Free small keys can be place in their own dungeon
This commit is contained in:
@@ -5,30 +5,16 @@ HeartPieceGet:
|
||||
PHX : PHY
|
||||
LDY.w SpriteItemType, X ; load item value into Y register
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
JSL.l LoadHeartPieceRoomValue : TAY
|
||||
+
|
||||
JSL.l MaybeMarkDigSpotCollected
|
||||
|
||||
.skipLoad
|
||||
|
||||
|
||||
CPY.b #$26 : BNE .notHeart ; don't add a 1/4 heart if it's not a heart piece
|
||||
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter : BNE .unfinished_heart ; add up heart quarters
|
||||
BRA .giveItem
|
||||
|
||||
.notHeart
|
||||
.giveItem
|
||||
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
|
||||
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter
|
||||
.not_heart
|
||||
JSL.l $8791B3 ; Player_HaltDashAttackLong
|
||||
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
|
||||
|
||||
JSL.l Link_ReceiveItem
|
||||
CLC ; return false
|
||||
JMP .done ; finished
|
||||
|
||||
.unfinished_heart
|
||||
SEC ; return true
|
||||
.done
|
||||
JSL MaybeUnlockTabletAnimation
|
||||
|
||||
PLY : PLX
|
||||
@@ -36,10 +22,8 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
HeartContainerGet:
|
||||
PHX : PHY
|
||||
JSL.l AddInventory_incrementBossSwordLong
|
||||
LDY.w SpriteItemType, X ; load item value into Y register
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
JSL.l IncrementBossSword
|
||||
LDY.w SpriteItemType, X : BNE +
|
||||
JSL.l LoadHeartContainerRoomValue : TAY
|
||||
+
|
||||
BRA HeartPieceGet_skipLoad
|
||||
|
||||
@@ -1744,7 +1744,7 @@ JSL DialogResetSelectionIndex
|
||||
;----------------------------------------------------
|
||||
;-- Agahnim 1 Defeated
|
||||
org $868475 ; <- 30475 Bank06.asm : 762 - (JSL Sprite_ShowMessageMinimal)
|
||||
JSL AddInventory_incrementBossSwordLong
|
||||
JSL IncrementBossSword
|
||||
;----------------------------------------------------------
|
||||
;-- We'll take your sword
|
||||
org $86B4F3 ; <- 334F3 sprite_smithy_bros.asm : 556 (JSL Sprite_ShowMessageUnconditional)
|
||||
|
||||
955
inventory.asm
955
inventory.asm
File diff suppressed because it is too large
Load Diff
359
newitems.asm
359
newitems.asm
@@ -125,35 +125,6 @@ macro ValueShift()
|
||||
BRA ?start : ?end:
|
||||
endmacro
|
||||
;--------------------------------------------------------------------------------
|
||||
GetDungeonBitByID:
|
||||
LDA.w #$8000
|
||||
CPX.w #$0000 : BEQ .castle
|
||||
DEX
|
||||
-
|
||||
LSR
|
||||
DEX
|
||||
BPL -
|
||||
RTS
|
||||
|
||||
.castle
|
||||
LSR
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
GetDungeonBitByOffset:
|
||||
LDA.w #$0001
|
||||
CPX.w #$000E : BEQ .castle
|
||||
CPX.w #$000F : BEQ .castle
|
||||
DEX
|
||||
-
|
||||
ASL
|
||||
DEX
|
||||
BPL -
|
||||
RTS
|
||||
|
||||
.castle
|
||||
LDA.w #$00C0
|
||||
RTS
|
||||
;--------------------------------------------------------------------------------
|
||||
;carry clear if pass
|
||||
;carry set if caught
|
||||
;incsrc eventdata.asm
|
||||
@@ -221,6 +192,126 @@ ItemBehavior:
|
||||
.skip
|
||||
RTS
|
||||
|
||||
.blue_boomerang
|
||||
LDA.l InventoryTracking : ORA.b #$80
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.red_boomerang
|
||||
LDA.l InventoryTracking : ORA.b #$40
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.mushroom
|
||||
LDA.l InventoryTracking : ORA.b #$28
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.powder
|
||||
LDA.l InventoryTracking : ORA.b #$10
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.flute_inactive
|
||||
LDA.l InventoryTracking : ORA.b #$02
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.flute_active
|
||||
LDA.l InventoryTracking : ORA.b #$01
|
||||
BRA .store_inventory_tracking
|
||||
|
||||
.store_inventory_tracking
|
||||
STA.l InventoryTracking
|
||||
RTS
|
||||
|
||||
.fighter_sword_shield
|
||||
SEP #$10
|
||||
LDX.b #$01
|
||||
JSR .increment_sword
|
||||
JSR .increment_shield
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.master_sword
|
||||
SEP #$10
|
||||
LDX.b #$02
|
||||
JSR .increment_sword
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.tempered_sword
|
||||
SEP #$10
|
||||
LDX.b #$03
|
||||
JSR .increment_sword
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.gold_sword
|
||||
SEP #$10
|
||||
LDX.b #$04
|
||||
JSR .increment_sword
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.fighter_shield
|
||||
SEP #$10
|
||||
LDX.b #$01
|
||||
JSR .increment_shield
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.red_shield
|
||||
SEP #$10
|
||||
LDX.b #$02
|
||||
JSR .increment_shield
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.mirror_shield
|
||||
SEP #$10
|
||||
LDX.b #$03
|
||||
JSR .increment_shield
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.blue_mail
|
||||
SEP #$10
|
||||
LDX.b #$01
|
||||
JSR .increment_mail
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.red_mail
|
||||
SEP #$10
|
||||
LDX.b #$02
|
||||
JSR .increment_mail
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.fighter_sword
|
||||
SEP #$10
|
||||
LDX.b #$01
|
||||
JSR .increment_sword
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.prog_sword
|
||||
SEP #$10
|
||||
LDA.l SwordEquipment : INC : TAX
|
||||
JSR .increment_sword
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.prog_shield
|
||||
SEP #$10
|
||||
LDA.l ShieldEquipment : INC : TAX
|
||||
JSR .increment_shield
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.prog_mail
|
||||
SEP #$10
|
||||
LDA.l ArmorEquipment : INC : TAX
|
||||
JSR .increment_mail
|
||||
REP #$10
|
||||
RTS
|
||||
|
||||
.bow
|
||||
LDA.l BowTracking : ORA.b #$80 : STA.l BowTracking
|
||||
BIT #$40 : BNE .silversbow
|
||||
@@ -236,27 +327,34 @@ ItemBehavior:
|
||||
|
||||
.dungeon_compass
|
||||
REP #$20
|
||||
LDA.w DungeonID : LSR : TAX
|
||||
JSR.w GetDungeonBitByID
|
||||
ORA.l CompassField : STA.l CompassField
|
||||
SEP #$20
|
||||
RTS
|
||||
LDA.w DungeonID : CMP.w #$0003 : BCC ..hc_sewers
|
||||
TAX
|
||||
LDA.l DungeonMask,X : ORA.l CompassField : STA.l CompassField
|
||||
JMP.w .increment_compass
|
||||
..hc_sewers
|
||||
LDA.w #$C000 : ORA.l CompassField : STA.l CompassField
|
||||
JMP.w .increment_compass
|
||||
|
||||
|
||||
.dungeon_bigkey
|
||||
REP #$20
|
||||
LDA.w DungeonID : LSR : TAX
|
||||
JSR.w GetDungeonBitByID
|
||||
ORA.l BigKeyField : STA.l BigKeyField
|
||||
SEP #$20
|
||||
RTS
|
||||
LDA.w DungeonID : CMP.w #$0003 : BCC ..hc_sewers
|
||||
TAX
|
||||
LDA.l DungeonMask,X : ORA.l BigKeyField : STA.l BigKeyField
|
||||
JMP.w .increment_bigkey
|
||||
..hc_sewers
|
||||
LDA.w #$C000 : ORA.l BigKeyField : STA.l BigKeyField
|
||||
JMP.w .increment_bigkey
|
||||
|
||||
.dungeon_map
|
||||
REP #$20
|
||||
LDA.w DungeonID : LSR : TAX
|
||||
JSR.w GetDungeonBitByID
|
||||
ORA.l MapField : STA.l MapField
|
||||
SEP #$20
|
||||
RTS
|
||||
LDA.w DungeonID : CMP.w #$0003 : BCC ..hc_sewers
|
||||
TAX
|
||||
LDA.l DungeonMask,X : ORA.l MapField : STA.l MapField
|
||||
JMP.w .increment_map
|
||||
..hc_sewers
|
||||
LDA.w #$C000 : ORA.l MapField : STA.l MapField
|
||||
JMP.w .increment_map
|
||||
|
||||
.bow_and_arrows
|
||||
BIT.b #$40 : BEQ +
|
||||
@@ -302,9 +400,12 @@ ItemBehavior:
|
||||
RTS
|
||||
|
||||
.master_sword_safe
|
||||
SEP #$10
|
||||
LDA.l SwordEquipment : CMP.b #$02 : !BGE + ; skip if we have a better sword
|
||||
LDA.b #$02 : STA.l SwordEquipment ; set master sword
|
||||
+
|
||||
LDX.b #$02
|
||||
JSR .increment_sword
|
||||
RTS
|
||||
|
||||
.bombs_5
|
||||
@@ -413,50 +514,57 @@ ItemBehavior:
|
||||
|
||||
.free_map
|
||||
REP #$20
|
||||
AND.w #$000F : LSR : TAX
|
||||
JSR.w GetDungeonBitByOffset
|
||||
ORA.l MapField : STA.l MapField
|
||||
AND.w #$000F : ASL : TAX
|
||||
LDA.w DungeonItemIDMap,X : TAX
|
||||
LDA.l DungeonMask,X : ORA.l MapField : STA.l MapField
|
||||
SEP #$20
|
||||
RTS
|
||||
JMP.w .increment_map
|
||||
|
||||
.hc_map
|
||||
LDA.b #$C0 : ORA.l MapField+1 : STA.l MapField+1
|
||||
RTS
|
||||
JMP.w .increment_map
|
||||
|
||||
.free_compass
|
||||
REP #$20
|
||||
AND.w #$000F : LSR : TAX
|
||||
JSR.w GetDungeonBitByOffset
|
||||
ORA.l CompassField : STA.l CompassField
|
||||
AND.w #$000F : ASL : TAX
|
||||
LDA.w DungeonItemIDMap,X : TAX
|
||||
LDA.l DungeonMask,X : ORA.l CompassField : STA.l CompassField
|
||||
SEP #$20
|
||||
RTS
|
||||
JMP.w .increment_compass
|
||||
|
||||
.hc_compass
|
||||
LDA.b #$C0 : ORA.l CompassField+1 : STA.l CompassField+1
|
||||
RTS
|
||||
JMP.w .increment_compass
|
||||
|
||||
.free_bigkey
|
||||
REP #$20
|
||||
AND.w #$000F : LSR : TAX
|
||||
JSR.w GetDungeonBitByOffset
|
||||
ORA.l BigKeyField : STA.l BigKeyField
|
||||
AND.w #$000F : ASL : TAX
|
||||
LDA.w DungeonItemIDMap,X : TAX
|
||||
LDA.l DungeonMask,X : ORA.l BigKeyField : STA.l BigKeyField
|
||||
SEP #$20
|
||||
RTS
|
||||
JMP.w .increment_bigkey
|
||||
|
||||
.hc_bigkey
|
||||
LDA.b #$C0 : ORA.l BigKeyField+1 : STA.l BigKeyField+1
|
||||
RTS
|
||||
JMP.w .increment_bigkey
|
||||
|
||||
.free_smallkey
|
||||
REP #$20
|
||||
AND.w #$000F : TAX
|
||||
LDA.l DungeonKeys, X : INC : STA.l DungeonKeys, X ; Increment Key Count
|
||||
ASL : CMP.w DungeonID : BEQ .same_dungeon
|
||||
LSR : TAX
|
||||
LDA.l DungeonKeys,X : INC : STA.l DungeonKeys,X
|
||||
RTS
|
||||
.same_dungeon
|
||||
SEP #$20
|
||||
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
|
||||
RTS
|
||||
|
||||
.hc_smallkey
|
||||
LDA.l HyruleCastleKeys : INC : STA.l HyruleCastleKeys
|
||||
LDA.l SewerKeys : INC : STA.l SewerKeys
|
||||
RTS
|
||||
LDA.w DungeonID : CMP.b #$03 : BCC .same_dungeon
|
||||
LDA.l HyruleCastleKeys : INC : STA.l HyruleCastleKeys
|
||||
LDA.l SewerKeys : INC : STA.l SewerKeys
|
||||
RTS
|
||||
|
||||
.generic_smallkey
|
||||
LDA.l GenericKeys : BEQ .normal
|
||||
@@ -464,8 +572,50 @@ ItemBehavior:
|
||||
RTS
|
||||
.normal
|
||||
LDA.w DungeonID : CMP.b #$FF : BEQ .done
|
||||
LSR : TAX
|
||||
LDA.l DungeonKeys, X : INC : STA.l DungeonKeys, X
|
||||
LDA.l CurrentSmallKeys : INC : STA.l CurrentSmallKeys
|
||||
|
||||
.increment_sword
|
||||
LDA.l HighestSword
|
||||
INC : STA.b Scrap04 : CPX.b Scrap04 : !BLT + ; don't increment unless we're getting a better sword
|
||||
TXA : STA.l HighestSword
|
||||
+
|
||||
RTS
|
||||
|
||||
.increment_shield
|
||||
LDA.l HighestShield
|
||||
INC : STA.b Scrap04 : CPX.b Scrap04 : !BLT + ; don't increment unless we're getting a better shield
|
||||
TXA : STA.l HighestShield
|
||||
+
|
||||
RTS
|
||||
|
||||
.increment_mail
|
||||
LDA.l HighestMail
|
||||
INC : STA.b Scrap04 : CPX.b Scrap04 : !BLT + ; don't increment unless we're getting a better mail
|
||||
TXA : STA.l HighestMail
|
||||
+
|
||||
RTS
|
||||
|
||||
.increment_bigkey
|
||||
SEP #$30
|
||||
LDA.l BigKeysBigChests
|
||||
CLC : ADC.b #$10
|
||||
STA.l BigKeysBigChests
|
||||
RTS
|
||||
|
||||
.increment_map
|
||||
SEP #$30
|
||||
LDA.l MapsCompasses
|
||||
CLC : ADC.b #$10
|
||||
STA.l MapsCompasses
|
||||
RTS
|
||||
|
||||
.increment_compass
|
||||
SEP #$30
|
||||
LDA.l MapsCompasses : INC : AND.b #$0F : TAX
|
||||
LDA.l MapsCompasses : AND.b #$F0 : STA.l MapsCompasses
|
||||
TXA : ORA.l MapsCompasses : STA.l MapsCompasses
|
||||
JSL MaybeFlagCompassTotalPickup
|
||||
|
||||
.done
|
||||
RTS
|
||||
|
||||
@@ -520,19 +670,21 @@ ResolveLootID:
|
||||
..ids
|
||||
db $4E, $4F, $4F
|
||||
|
||||
.swords
|
||||
LDA.l HighestSword : CMP.l ProgressiveSwordLimit : BCC +
|
||||
.prog_sword
|
||||
LDA.l HighestSword
|
||||
CMP.l ProgressiveSwordLimit : BCC +
|
||||
LDA.l ProgressiveSwordReplacement
|
||||
JMP.w .get_item
|
||||
+
|
||||
TAX
|
||||
LDA.w ResolveLootID_swords_ids,X
|
||||
LDA.w ResolveLootID_prog_sword_ids,X
|
||||
JMP.w .have_item
|
||||
..ids
|
||||
db $49, $01, $02, $03, $03
|
||||
db $49, $50, $02, $03, $03
|
||||
|
||||
.shields
|
||||
LDA.l HighestShield : CMP.l ProgressiveShieldLimit : BCC +
|
||||
LDA.l HighestShield
|
||||
CMP.l ProgressiveShieldLimit : BCC +
|
||||
LDA.l ProgressiveShieldReplacement
|
||||
JMP.w .get_item
|
||||
+
|
||||
@@ -543,7 +695,8 @@ ResolveLootID:
|
||||
db $04, $05, $06, $06
|
||||
|
||||
.armor
|
||||
LDA.l HighestMail : CMP.l ProgressiveArmorLimit : BCC +
|
||||
LDA.l HighestMail
|
||||
CMP.l ProgressiveArmorLimit : BCC +
|
||||
LDA.l ProgressiveArmorReplacement
|
||||
JMP.w .get_item
|
||||
+
|
||||
@@ -552,6 +705,7 @@ ResolveLootID:
|
||||
..ids
|
||||
db $22, $23, $23
|
||||
|
||||
|
||||
.gloves
|
||||
LDA.l GloveEquipment : TAX
|
||||
LDA.w ResolveLootID_gloves_ids,X
|
||||
@@ -565,6 +719,7 @@ ResolveLootID:
|
||||
JMP.w .get_item
|
||||
+
|
||||
TAX
|
||||
LDA.b #$80 : STA.l BowTrackingFlags
|
||||
LDA.w ResolveLootID_bows_ids,X
|
||||
JMP.w .get_item
|
||||
|
||||
@@ -574,6 +729,7 @@ ResolveLootID:
|
||||
JMP.w .get_item
|
||||
+
|
||||
TAX
|
||||
LDA.b #$20 : STA.l BowTrackingFlags
|
||||
LDA.w ResolveLootID_bows_ids,X
|
||||
JMP.w .get_item
|
||||
|
||||
@@ -654,27 +810,27 @@ macro ReceiptProps(id, y, x, gfx, width, pal, sram, value, pal_override, behavio
|
||||
|
||||
endmacro
|
||||
|
||||
%ReceiptProps($00, -5, 0, $06, 2, $02, $F359, $01, $00, skip, skip) ; 00 - Fighter sword & Shield
|
||||
%ReceiptProps($01, -5, 4, $18, 0, $FF, $F359, $02, $00, skip, skip) ; 01 - Master sword - TODO gfx value?
|
||||
%ReceiptProps($02, -5, 4, $18, 0, $05, $F359, $03, $00, skip, skip) ; 02 - Tempered sword - TODO gfx value?
|
||||
%ReceiptProps($03, -5, 4, $18, 0, $05, $F359, $04, $00, skip, skip) ; 03 - Butter sword - TODO gfx value?
|
||||
%ReceiptProps($04, -5, 4, $2D, 0, $05, $F35A, $01, $01, skip, skip) ; 04 - Fighter shield
|
||||
%ReceiptProps($05, -4, 0, $20, 2, $05, $F35A, $02, $01, skip, skip) ; 05 - Fire shield
|
||||
%ReceiptProps($06, -4, 0, $2E, 2, $05, $F35A, $03, $01, skip, skip) ; 06 - Mirror shield
|
||||
%ReceiptProps($00, -5, 0, $06, 2, $02, $F359, $01, $00, fighter_sword_shield, skip) ; 00 - Fighter sword & Shield
|
||||
%ReceiptProps($01, -5, 4, $18, 0, $FF, $F359, $02, $00, master_sword, skip) ; 01 - Master sword
|
||||
%ReceiptProps($02, -5, 4, $18, 0, $05, $F359, $03, $00, tempered_sword, skip) ; 02 - Tempered sword
|
||||
%ReceiptProps($03, -5, 4, $18, 0, $05, $F359, $04, $00, gold_sword, skip) ; 03 - Golden sword
|
||||
%ReceiptProps($04, -5, 4, $2D, 0, $05, $F35A, $01, $01, fighter_shield, skip) ; 04 - Fighter shield
|
||||
%ReceiptProps($05, -4, 0, $20, 2, $05, $F35A, $02, $01, red_shield, skip) ; 05 - Fire shield
|
||||
%ReceiptProps($06, -4, 0, $2E, 2, $05, $F35A, $03, $01, mirror_shield, skip) ; 06 - Mirror shield
|
||||
%ReceiptProps($07, -5, 4, $09, 0, $01, $F345, $01, $00, skip, skip) ; 07 - Fire rod
|
||||
%ReceiptProps($08, -5, 4, $09, 0, $02, $F346, $01, $00, skip, skip) ; 08 - Ice rod
|
||||
%ReceiptProps($09, -4, 4, $0A, 0, $01, $F34B, $01, $00, skip, skip) ; 09 - Hammer
|
||||
%ReceiptProps($0A, -4, 4, $08, 0, $01, $F342, $01, $00, skip, skip) ; 0A - Hookshot
|
||||
%ReceiptProps($0B, -4, 4, $05, 0, $01, $F340, $01, $00, bow, skip) ; 0B - Bow
|
||||
%ReceiptProps($0C, -2, 5, $10, 0, $02, $F341, $01, $00, skip, skip) ; 0C - Blue Boomerang
|
||||
%ReceiptProps($0D, -4, 0, $0B, 2, $02, $F344, $02, $00, skip, skip) ; 0D - Powder
|
||||
%ReceiptProps($0C, -2, 5, $10, 0, $02, $F341, $01, $00, blue_boomerang, skip) ; 0C - Blue Boomerang
|
||||
%ReceiptProps($0D, -4, 0, $0B, 2, $02, $F344, $02, $00, powder, skip) ; 0D - Powder
|
||||
%ReceiptProps($0E, -4, 0, $2C, 2, $02, $F35C, $FF, $00, skip, skip) ; 0E - Bottle refill (bee)
|
||||
%ReceiptProps($0F, -4, 0, $1B, 2, $04, $F347, $01, $00, skip, skip) ; 0F - Bombos
|
||||
%ReceiptProps($10, -4, 0, $1A, 2, $04, $F348, $01, $00, skip, skip) ; 10 - Ether
|
||||
%ReceiptProps($11, -4, 0, $1C, 2, $04, $F349, $01, $00, skip, skip) ; 11 - Quake
|
||||
%ReceiptProps($12, -4, 0, $14, 2, $01, $F34A, $01, $00, skip, skip) ; 12 - Lamp
|
||||
%ReceiptProps($13, -4, 4, $19, 0, $01, $F34C, $01, $00, skip, skip) ; 13 - Shovel
|
||||
%ReceiptProps($14, -4, 0, $0C, 2, $02, $F34C, $02, $00, skip, skip) ; 14 - Flute
|
||||
%ReceiptProps($14, -4, 0, $0C, 2, $02, $F34C, $02, $00, flute_inactive, skip) ; 14 - Flute
|
||||
%ReceiptProps($15, -4, 4, $07, 0, $01, $F350, $01, $00, skip, skip) ; 15 - Somaria
|
||||
%ReceiptProps($16, -4, 0, $1D, 2, $01, $F35C, $FF, $00, skip, bottles) ; 16 - Bottle
|
||||
%ReceiptProps($17, -4, 0, $2F, 2, $01, $F36B, $FF, $00, skip, skip) ; 17 - Heart piece
|
||||
@@ -688,15 +844,15 @@ endmacro
|
||||
%ReceiptProps($1F, -4, 0, $17, 2, $01, $F357, $01, $00, skip, skip) ; 1F - Pearl
|
||||
%ReceiptProps($20, -4, 0, $28, 2, $06, $F37A, $FF, $01, skip, skip) ; 20 - Crystal
|
||||
%ReceiptProps($21, -4, 0, $27, 2, $01, $F34D, $01, $00, skip, skip) ; 21 - Net
|
||||
%ReceiptProps($22, -4, 0, $04, 2, $02, $F35B, $FF, $00, skip, skip) ; 22 - Blue mail
|
||||
%ReceiptProps($23, -5, 0, $04, 2, $01, $F35B, $02, $00, skip, skip) ; 23 - Red mail
|
||||
%ReceiptProps($22, -4, 0, $04, 2, $02, $F35B, $FF, $00, blue_mail, skip) ; 22 - Blue mail
|
||||
%ReceiptProps($23, -5, 0, $04, 2, $01, $F35B, $02, $00, red_mail, skip) ; 23 - Red mail
|
||||
%ReceiptProps($24, -4, 4, $0F, 0, $02, $F36F, $FF, $00, skip, skip) ; 24 - Small key
|
||||
%ReceiptProps($25, -4, 0, $16, 2, $02, $F364, $FF, $00, dungeon_compass, skip) ; 25 - Compass
|
||||
%ReceiptProps($26, -4, 0, $03, 2, $01, $F36C, $FF, $00, skip, skip) ; 26 - Heart container from 4/4
|
||||
%ReceiptProps($27, -4, 0, $13, 2, $02, $F375, $FF, $00, skip, skip) ; 27 - Bomb
|
||||
%ReceiptProps($28, -4, 0, $01, 2, $02, $F375, $FF, $00, skip, skip) ; 28 - 3 bombs
|
||||
%ReceiptProps($29, -4, 0, $1E, 2, $04, $F344, $FF, $00, skip, skip) ; 29 - Mushroom
|
||||
%ReceiptProps($2A, -2, 5, $10, 0, $01, $F341, $02, $00, skip, skip) ; 2A - Red boomerang
|
||||
%ReceiptProps($29, -4, 0, $1E, 2, $04, $F344, $FF, $00, mushroom, skip) ; 29 - Mushroom
|
||||
%ReceiptProps($2A, -2, 5, $10, 0, $01, $F341, $02, $00, red_boomerang, skip) ; 2A - Red boomerang
|
||||
%ReceiptProps($2B, -4, 0, $00, 2, $01, $F35C, $FF, $00, skip, bottles) ; 2B - Full bottle (red)
|
||||
%ReceiptProps($2C, -4, 0, $00, 2, $04, $F35C, $FF, $00, skip, bottles) ; 2C - Full bottle (green)
|
||||
%ReceiptProps($2D, -4, 0, $00, 2, $02, $F35C, $FF, $00, skip, bottles) ; 2D - Full bottle (blue)
|
||||
@@ -727,14 +883,15 @@ endmacro
|
||||
%ReceiptProps($46, -4, 0, $36, 2, $04, $F360, $FF, $00, skip, skip) ; 46 - 300 rupees
|
||||
%ReceiptProps($47, -4, 0, $37, 2, $04, $F360, $FF, $00, skip, skip) ; 47 - 20 rupees green
|
||||
%ReceiptProps($48, -4, 0, $2C, 2, $02, $F35C, $FF, $00, skip, skip) ; 48 - Full bottle (good bee)
|
||||
%ReceiptProps($49, -5, 4, $06, 0, $05, $F359, $01, $00, skip, skip) ; 49 - Tossed fighter sword
|
||||
%ReceiptProps($4A, -4, 0, $0C, 2, $02, $F34C, $03, $00, skip, skip) ; 4A - Active Flute
|
||||
%ReceiptProps($49, -5, 4, $06, 0, $05, $F359, $01, $00, fighter_sword, skip) ; 49 - Tossed fighter sword
|
||||
%ReceiptProps($50, -5, 4, $06, 0, $05, $F359, $01, $00, skip, skip) ; 50 - Master Sword (safe)
|
||||
%ReceiptProps($4A, -4, 0, $0C, 2, $02, $F34C, $03, $00, flute_active, skip) ; 4A - Active Flute
|
||||
%ReceiptProps($4B, -4, 0, $38, 2, $01, $F355, $01, $00, skip, skip) ; 4B - Boots
|
||||
%ReceiptProps($4C, -4, 0, $39, 2, $04, $F375, $32, $00, bombs_50, skip) ; 4C - Bomb capacity (50)
|
||||
%ReceiptProps($4D, -4, 0, $3A, 2, $04, $F376, $46, $00, arrows_70, skip) ; 4D - Arrow capacity (70)
|
||||
%ReceiptProps($4E, -4, 0, $3B, 2, $04, $F373, $80, $00, magic_2, magic) ; 4E - 1/2 magic
|
||||
%ReceiptProps($4F, -4, 0, $3C, 2, $04, $F373, $80, $00, magic_4, magic) ; 4F - 1/4 magic
|
||||
%ReceiptProps($50, -5, 4, $18, 0, $05, $F359, $02, $00, master_sword_safe, skip) ; 50 - Safe master sword - TODO gfx value
|
||||
%ReceiptProps($50, -5, 4, $18, 0, $05, $F359, $02, $00, master_sword_safe, skip) ; 50 - Safe master sword
|
||||
%ReceiptProps($51, -4, 0, $42, 2, $04, $F375, $FF, $00, bombs_5, skip) ; 51 - Bomb capacity (+5)
|
||||
%ReceiptProps($52, -4, 0, $3E, 2, $04, $F375, $FF, $00, bombs_10, skip) ; 52 - Bomb capacity (+10)
|
||||
%ReceiptProps($53, -4, 0, $3F, 2, $04, $F376, $FF, $00, arrows_5, skip) ; 53 - Arrow capacity (+5)
|
||||
@@ -748,9 +905,9 @@ endmacro
|
||||
%ReceiptProps($5B, -4, 0, $4B, 2, $01, $F454, $FF, $00, red_clock, skip) ; 5B - Red clock
|
||||
%ReceiptProps($5C, -4, 0, $4B, 2, $02, $F454, $FF, $00, blue_clock, skip) ; 5C - Blue clock
|
||||
%ReceiptProps($5D, -4, 0, $4B, 2, $04, $F454, $FF, $00, green_clock, skip) ; 5D - Green clock
|
||||
%ReceiptProps($5E, -4, 0, $FE, 2, $FF, $F359, $FF, $00, skip, swords) ; 5E - Progressive sword
|
||||
%ReceiptProps($5F, -4, 0, $FF, 2, $FF, $F35A, $FF, $01, skip, shields) ; 5F - Progressive shield
|
||||
%ReceiptProps($60, -4, 0, $FD, 2, $FF, $F35B, $FF, $00, skip, armor) ; 60 - Progressive armor
|
||||
%ReceiptProps($5E, -4, 0, $FE, 2, $FF, $F359, $FF, $00, prog_sword, prog_sword) ; 5E - Progressive sword
|
||||
%ReceiptProps($5F, -4, 0, $FF, 2, $FF, $F35A, $FF, $01, prog_shield, shields) ; 5F - Progressive shield
|
||||
%ReceiptProps($60, -4, 0, $FD, 2, $FF, $F35B, $FF, $00, prog_mail, armor) ; 60 - Progressive armor
|
||||
%ReceiptProps($61, -4, 0, $0D, 2, $FF, $F354, $FF, $00, skip, gloves) ; 61 - Progressive glove
|
||||
%ReceiptProps($62, -4, 0, $FF, 2, $FF, $F36A, $FF, $00, skip, rng_single) ; 62 - RNG pool item (single)
|
||||
%ReceiptProps($63, -4, 0, $FF, 2, $FF, $F36A, $FF, $00, skip, rng_multi) ; 63 - RNG pool item (multi)
|
||||
@@ -792,7 +949,7 @@ endmacro
|
||||
%ReceiptProps($87, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 87 - Compass of Skull Woods
|
||||
%ReceiptProps($88, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 88 - Compass of Misery Mire
|
||||
%ReceiptProps($89, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 89 - Compass of Dark Palace
|
||||
%ReceiptProps($8A, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 8A - Compass of Swamp Palace
|
||||
%ReceiptProps($8A, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 8A - Compass of4Swamp Palace
|
||||
%ReceiptProps($8B, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 8B - Compass of Agahnim's Tower
|
||||
%ReceiptProps($8C, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 8C - Compass of Desert Palace
|
||||
%ReceiptProps($8D, -4, 0, $16, 2, $02, $F36A, $FF, $00, free_compass, skip) ; 8D - Compass of Eastern Palace
|
||||
@@ -1221,3 +1378,21 @@ MaybeFlagCompassTotalEntrance:
|
||||
.done
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DungeonItemIDMap: ; Maps lower four bits of our new dungeon items to DungeonID
|
||||
db $FFFF
|
||||
db $FFFF
|
||||
db $001A ; GT
|
||||
db $0018 ; TR
|
||||
db $0016 ; TT
|
||||
db $0014 ; TH
|
||||
db $0012 ; IP
|
||||
db $0010 ; SW
|
||||
db $000E ; MM
|
||||
db $000C ; PD
|
||||
db $000A ; SP
|
||||
db $0008 ; CT
|
||||
db $0006 ; DP
|
||||
db $0004 ; EP
|
||||
db $0002 ; HC
|
||||
db $0000 ; SW
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ RTL
|
||||
UpdateKeys:
|
||||
PHX : PHP
|
||||
SEP #$30 ; set 8-bit accumulator & index registers
|
||||
LDA.w DungeonID : CMP.b TSWQ : !BLT .skip
|
||||
LDA.w DungeonID : CMP.b #$1F : !BLT .skip
|
||||
|
||||
LSR : TAX ; get dungeon index and store to X
|
||||
|
||||
@@ -285,7 +285,7 @@ DrawHUDDungeonItems:
|
||||
|
||||
|
||||
.dungeon_bitmasks
|
||||
dw $4000 ; Hyrule Castle
|
||||
dw $C000 ; Hyrule Castle
|
||||
dw $2000 ; Eastern
|
||||
dw $1000 ; Desert
|
||||
dw $0020 ; Hera
|
||||
|
||||
2
ram.asm
2
ram.asm
@@ -477,7 +477,7 @@ BossKills: skip 1 ;
|
||||
LagTime: skip 4 ; Computed during stats preparation for display
|
||||
RupeesCollected: skip 2 ; Computed during stats preparation for display
|
||||
NonChestCounter: skip 2 ; Computed during stats preparation for display
|
||||
skip 2 ; Unused
|
||||
BowTrackingFlags: skip 2 ; Stores tracking bits for progressive bows before resolution to concrete item.
|
||||
TileUploadOffsetOverride: skip 2 ; Offset override for loading sprite gfx
|
||||
skip 3 ;
|
||||
skip 9 ;
|
||||
|
||||
109
save.asm
109
save.asm
@@ -14,11 +14,13 @@ WriteSaveChecksumAndBackup:
|
||||
STA.l InverseChecksumSRAM
|
||||
|
||||
PHB
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #CartridgeSRAM&$FFFF ; | Copies $1500 bytes from beginning of cart SRAM to
|
||||
LDY.w #SaveBackupSRAM&$FFFF ; | $704000
|
||||
MVN !SRAMBank, !SRAMBank ; /
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #CartridgeSRAM ; | Copies $1500 bytes from beginning of cart SRAM to
|
||||
LDY.w #SaveBackupSRAM ; | $704000
|
||||
MVN !SRAMBank, !SRAMBank ; /
|
||||
PLB
|
||||
TDC
|
||||
TAX
|
||||
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
@@ -51,10 +53,10 @@ ValidateSRAM:
|
||||
TDC : STA.l FileValiditySRAM ; Delete save by way of zeroing validity marker
|
||||
BRA .goodchecksum : +
|
||||
PHB
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #SaveBackupSRAM&$FFFF ; | Copies $1500 bytes from backup on cart SRAM to
|
||||
LDY.w #CartridgeSRAM&$FFFF ; | main save location at $700000
|
||||
MVN !SRAMBank, !SRAMBank ; /
|
||||
LDA.w #$14FF ; \
|
||||
LDX.w #SaveBackupSRAM ; | Copies $1500 bytes from backup on cart SRAM to
|
||||
LDY.w #CartridgeSRAM ; | main save location at $700000
|
||||
MVN !SRAMBank, !SRAMBank ; /
|
||||
PLB
|
||||
|
||||
.goodchecksum
|
||||
@@ -131,88 +133,23 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CopyExtendedSaveFileToWRAM:
|
||||
PHA
|
||||
SEP #$30
|
||||
LDA.w DMAP0 : PHA ; preserve DMA parameters
|
||||
LDA.w BBAD0 : PHA ; preserve DMA parameters
|
||||
LDA.w A1T0L : PHA ; preserve DMA parameters
|
||||
LDA.w A1T0H : PHA ; preserve DMA parameters
|
||||
LDA.w A1B0 : PHA ; preserve DMA parameters
|
||||
LDA.w DAS0L : PHA ; preserve DMA parameters
|
||||
LDA.w DAS0H : PHA ; preserve DMA parameters
|
||||
;--------------------------------------------------------------------------------
|
||||
STZ.w NMITIMEN ; Disable NMI, V/H, joypad
|
||||
STZ.w HDMAEN ; Disable HDMA
|
||||
LDA.b #$00 : STA.w DMAP0 ; set DMA transfer direction A -> B, bus A auto increment, single-byte mode
|
||||
|
||||
LDA.b #$80 : STA.w BBAD0 ; set bus B source to WRAM register
|
||||
|
||||
LDA.b #$00 : STA.w WMADDL ; set WRAM register source address
|
||||
LDA.b #$60 : STA.w WMADDH
|
||||
LDA.b #$7F : STA.w WMADDB
|
||||
|
||||
STZ.w A1T0L ; set bus A destination address to SRAM
|
||||
LDA.b #$05 : STA.w A1T0H
|
||||
LDA.b #$70 : STA.w A1B0
|
||||
|
||||
LDA.b #$00 : STA.w DAS0L ; set transfer size to 0x1000
|
||||
LDA.b #$10 : STA.w DAS0H ; STZ DAS0B
|
||||
|
||||
LDA.b #$01 : STA.w MDMAEN ; begin DMA transfer
|
||||
LDA.b #$81 : STA.w NMITIMEN ; Re-enable NMI and joypad
|
||||
;--------------------------------------------------------------------------------
|
||||
PLA : STA.w DAS0H ; restore DMA parameters
|
||||
PLA : STA.w DAS0L ; restore DMA parameters
|
||||
PLA : STA.w A1B0 ; restore DMA parameters
|
||||
PLA : STA.w A1T0H ; restore DMA parameters
|
||||
PLA : STA.w A1T0L ; restore DMA parameters
|
||||
PLA : STA.w BBAD0 ; restore DMA parameters
|
||||
PLA : STA.w DMAP0 ; restore DMA parameters
|
||||
REP #$30
|
||||
PHB
|
||||
LDA.w #$0FFF
|
||||
LDX.w #ExtendedSaveDataSRAM
|
||||
LDY.w #ExtendedSaveDataWRAM
|
||||
MVN $7F, !SRAMBank
|
||||
PLB
|
||||
PLA
|
||||
STA.l $7EC00D ; what we wrote over
|
||||
STA.l $7EC00D ; What we wrote over. Keep this write last.
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CopyExtendedWRAMSaveFileToSRAM:
|
||||
PHA
|
||||
PHB
|
||||
SEP #$30
|
||||
LDA.b #$00 : PHA : PLB
|
||||
LDA.w DMAP0 : PHA ; preserve DMA parameters
|
||||
LDA.w BBAD0 : PHA ; preserve DMA parameters
|
||||
LDA.w A1T0L : PHA ; preserve DMA parameters
|
||||
LDA.w A1T0H : PHA ; preserve DMA parameters
|
||||
LDA.w A1B0 : PHA ; preserve DMA parameters
|
||||
LDA.w DAS0L : PHA ; preserve DMA parameters
|
||||
LDA.w DAS0H : PHA ; preserve DMA parameters
|
||||
;--------------------------------------------------------------------------------
|
||||
STZ.w NMITIMEN ; Disable NMI, V/H, joypad
|
||||
STZ.w HDMAEN ; Disable HDMA
|
||||
LDA.b #$80 : STA.w DMAP0 ; set DMA transfer direction B -> A, bus A auto increment, single-byte mode
|
||||
|
||||
STA.w BBAD0 ; set bus B source to WRAM register
|
||||
|
||||
LDA.b #$00 : STA.w WMADDL ; set WRAM register source address
|
||||
LDA.b #$60 : STA.w WMADDH
|
||||
LDA.b #$7F : STA.w WMADDB
|
||||
|
||||
STZ.w A1T0L ; set bus A destination address to SRAM
|
||||
LDA.b #$05 : STA.w A1T0H
|
||||
LDA.b #$70 : STA.w A1B0
|
||||
|
||||
LDA.b #$10 : STA.w DAS0L ; set transfer size to 0xB00
|
||||
LDA.b #$0B : STA.w DAS0H ; STZ DAS0B
|
||||
|
||||
LDA.b #$01 : STA.w MDMAEN ; begin DMA transfer
|
||||
LDA.b #$81 : STA.w NMITIMEN; Re-enable NMI and joypad
|
||||
;--------------------------------------------------------------------------------
|
||||
PLA : STA.w DAS0H ; restore DMA parameters
|
||||
PLA : STA.w DAS0L ; restore DMA parameters
|
||||
PLA : STA.w A1B0 ; restore DMA parameters
|
||||
PLA : STA.w A1T0H ; restore DMA parameters
|
||||
PLA : STA.w A1T0L ; restore DMA parameters
|
||||
PLA : STA.w BBAD0 ; restore DMA parameters
|
||||
PLA : STA.w DMAP0 ; restore DMA parameters
|
||||
REP #$30
|
||||
LDA.w #$0FFF
|
||||
LDX.w #ExtendedSaveDataSRAM
|
||||
LDY.w #ExtendedSaveDataWRAM
|
||||
MVN !SRAMBank, $7F
|
||||
PLB
|
||||
PLA
|
||||
TDC
|
||||
TAX
|
||||
RTL
|
||||
|
||||
4
sram.asm
4
sram.asm
@@ -381,6 +381,7 @@ InverseChecksumWRAM: skip 2 ; Vanilla Inverse Checksum. Don't write unless c
|
||||
; beginning at $700500
|
||||
;--------------------------------------------------------------------------------
|
||||
base $7F6000 ; $1000 byte buffer we place beginning at second save file
|
||||
ExtendedSaveDataWRAM: ;
|
||||
ExtendedFileNameWRAM: skip 24 ; File name, 12 word-length characters.
|
||||
RoomPotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
||||
SpritePotData: skip 592 ; Table for expanded pot shuffle. One word per room.
|
||||
@@ -413,6 +414,7 @@ FileNameVanillaSRAM: skip 8 ; First four characters of file name
|
||||
FileValiditySRAM: skip 2 ;
|
||||
skip 283 ;
|
||||
InverseChecksumSRAM: skip 2 ;
|
||||
ExtendedSaveDataSRAM: ;
|
||||
ExtendedFileNameSRAM: skip 24 ; We read and write the file name directly from and to SRAM (24 bytes)
|
||||
skip $1AE4 ;
|
||||
RomVersionSRAM: skip 4 ; ALTTPR ROM version. Low byte is the version, high byte writes
|
||||
@@ -654,6 +656,7 @@ endmacro
|
||||
%assertSRAM(GTCollectedKeys, $7EF4ED)
|
||||
%assertSRAM(FileMarker, $7EF4F0)
|
||||
;--------------------------------------------------------------------------------
|
||||
%assertSRAM(ExtendedSaveDataWRAM, $7F6000)
|
||||
%assertSRAM(ExtendedFileNameWRAM, $7F6000)
|
||||
%assertSRAM(RoomPotData, $7F6018)
|
||||
%assertSRAM(SpritePotData, $7F6268)
|
||||
@@ -676,6 +679,7 @@ endmacro
|
||||
%assertSRAM(FileNameVanillaSRAM, $7003D9)
|
||||
%assertSRAM(FileValiditySRAM, $7003E1)
|
||||
%assertSRAM(InverseChecksumSRAM, $7004FE)
|
||||
%assertSRAM(ExtendedSaveDataSRAM, $700500)
|
||||
%assertSRAM(ExtendedFileNameSRAM, $700500)
|
||||
%assertSRAM(RomVersionSRAM, $701FFC)
|
||||
%assertSRAM(RomNameSRAM, $702000)
|
||||
|
||||
58
stats.asm
58
stats.asm
@@ -78,31 +78,35 @@ IncrementSmallKeys:
|
||||
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
|
||||
PHX
|
||||
LDA.l StatsLocked : BNE +
|
||||
JSL AddInventory_incrementKeyLong
|
||||
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
|
||||
+
|
||||
JSL.l UpdateKeys
|
||||
PHY : LDY.b #24 : JSL.l FullInventoryExternal : PLY
|
||||
PHY : LDY.b #24 : JSL.l AddInventory : PLY
|
||||
JSL.l HUD_RebuildLong
|
||||
PLX
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementSmallKeysNoPrimary:
|
||||
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
|
||||
PHX
|
||||
LDA.l StatsLocked : BNE +
|
||||
JSL AddInventory_incrementKeyLong
|
||||
+
|
||||
JSL.l UpdateKeys
|
||||
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
|
||||
PHP : REP #$20 ; set 16-bit accumulator
|
||||
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
|
||||
PLP : PHY : LDY.b #$24 : JSL.l FullInventoryExternal
|
||||
JSR CountChestKey : PLY : BRA +
|
||||
++
|
||||
PLP
|
||||
+
|
||||
JSL.l HUD_RebuildLong
|
||||
PLX
|
||||
STA.l CurrentSmallKeys ; thing we wrote over, write small key count
|
||||
PHX
|
||||
LDA.l StatsLocked : BNE +
|
||||
LDA.l SmallKeyCounter : INC : STA.l SmallKeyCounter
|
||||
+
|
||||
JSL.l UpdateKeys
|
||||
LDA.b IndoorsFlag : BEQ + ; skip room check if outdoors
|
||||
PHP : REP #$20 ; set 16-bit accumulator
|
||||
LDA.b RoomIndex : CMP.w #$0087 : BNE ++ ; hera basement
|
||||
PLP : PHY
|
||||
LDY.b #$24
|
||||
JSL.l AddInventory
|
||||
JSR CountChestKey
|
||||
PLY
|
||||
BRA +
|
||||
++
|
||||
PLP
|
||||
+
|
||||
JSL.l HUD_RebuildLong
|
||||
PLX
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
DecrementSmallKeys:
|
||||
@@ -150,7 +154,7 @@ RTL
|
||||
IncrementAgahnim2Sword:
|
||||
PHA
|
||||
LDA.l StatsLocked : BNE +
|
||||
JSL AddInventory_incrementBossSwordLong
|
||||
JSL.l IncrementBossSword
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
@@ -209,12 +213,14 @@ DecrementItemCounter:
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementBigChestCounter:
|
||||
JSL.l Dungeon_SaveRoomQuadrantData ; thing we wrote over
|
||||
PHA
|
||||
LDA.l StatsLocked : BNE +
|
||||
%BottomHalf(BigKeysBigChests)
|
||||
+
|
||||
PLA
|
||||
JSL.l Dungeon_SaveRoomQuadrantData ; thing we wrote over
|
||||
PHA
|
||||
LDA.l StatsLocked : BNE +
|
||||
LDA.l BigKeysBigChests : INC : AND.b #$0F : TAX
|
||||
LDA.l BigKeysBigChests : AND.b #$F0 : STA.l BigKeysBigChests
|
||||
TXA : ORA.l BigKeysBigChests : STA.l BigKeysBigChests
|
||||
+
|
||||
PLA
|
||||
RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
IncrementDamageTakenCounter_Eight:
|
||||
@@ -327,7 +333,7 @@ StatsFinalPrep:
|
||||
LDA.l StatsLocked : BNE .ramPostOnly
|
||||
INC : STA.l StatsLocked
|
||||
|
||||
JSL.l AddInventory_incrementBossSwordLong
|
||||
JSL.l IncrementBossSword
|
||||
|
||||
LDA.l HighestMail : INC : STA.l HighestMail ; add green mail to mail count
|
||||
|
||||
|
||||
@@ -2555,8 +2555,8 @@ db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
|
||||
; 0x186C00 - 186FFE (unused)
|
||||
;--------------------------------------------------------------------------------
|
||||
org $B0EFFF ; PC 0x186FFF
|
||||
BallNChainDungeon:
|
||||
db $02
|
||||
BallNChainDungeon: ; Dungeon ID where ball n chain guard is located. Write
|
||||
db $02 ; $FF to count ball and chain item for collection stats.
|
||||
|
||||
org $B0F000 ; PC 0x187000-0x18700F
|
||||
CompassTotalsROM:
|
||||
|
||||
Reference in New Issue
Block a user