Merge pull request #147 from robojumper/counters

Counters except sinit won't match
This commit is contained in:
robojumper
2025-04-07 16:27:46 +02:00
committed by GitHub
13 changed files with 343 additions and 165 deletions
+7
View File
@@ -600,6 +600,13 @@ d/lyt/d_lyt_cursor_stick.cpp:
toBeSorted/counters/counter.cpp:
.text start:0x8016CC40 end:0x8016CD94
toBeSorted/counters/counters.cpp:
.text start:0x8016CDA0 end:0x8016DE08
.ctors start:0x804DB7B8 end:0x804DB7BC
.data start:0x80527BD0 end:0x80527FF0
.sbss start:0x80575508 end:0x80575610
.bss start:0x805B1F70 end:0x805B2010
toBeSorted/counters/rupee_counter.cpp:
.text start:0x8016DE10 end:0x8016DF98
.ctors start:0x804DB7BC end:0x804DB7C0
+149 -149
View File
@@ -9356,112 +9356,112 @@ fn_8016CB60 = .text:0x8016CB60; // type:function size:0x78
AcItem__isItemThatHasStruct = .text:0x8016CBE0; // type:function size:0x3C
AcItem__getIndex = .text:0x8016CC20; // type:function size:0x14
checkedAdd__7CounterFl = .text:0x8016CC40; // type:function size:0xF0
getCommittedValue__7CounterFv = .text:0x8016CD30; // type:function size:0x20
getUncommittedValue__7CounterFv = .text:0x8016CD50; // type:function size:0x20
getCommittedValue__7CounterCFv = .text:0x8016CD30; // type:function size:0x20
getUncommittedValue__7CounterCFv = .text:0x8016CD50; // type:function size:0x20
setValue__7CounterFUs = .text:0x8016CD70; // type:function size:0x24
DungeonCounter__getCommitedDungeonValue = .text:0x8016CDA0; // type:function size:0x64
DungeonCounter__getUncommitedDungeonValue = .text:0x8016CE10; // type:function size:0x10
DungeonCounter__setValue = .text:0x8016CE20; // type:function size:0x14
DungeonCounter__dtor = .text:0x8016CE40; // type:function size:0x40
PouchExpansionCounter__dtor = .text:0x8016CE80; // type:function size:0x40
HeartPieceCounter__dtor = .text:0x8016CEC0; // type:function size:0x40
HeartPieceCounter__addChecked = .text:0x8016CF00; // type:function size:0x84
HeartContainerCounterMaybe__dtor = .text:0x8016CF90; // type:function size:0x40
FaronGrasshopperCounter__dtor = .text:0x8016CFD0; // type:function size:0x40
WoodlandRhinoCounter__dtor = .text:0x8016D010; // type:function size:0x40
DekuHornetCounter__dtor = .text:0x8016D050; // type:function size:0x40
SkyloftMantisCounter__dtor = .text:0x8016D090; // type:function size:0x40
VolcanicLadybugCounter__dtor = .text:0x8016D0D0; // type:function size:0x40
BlessedButterflyCounter__dtor = .text:0x8016D110; // type:function size:0x40
LanayruAntCounter__dtor = .text:0x8016D150; // type:function size:0x40
SandCicadaCounter__dtor = .text:0x8016D190; // type:function size:0x40
GerudoDragonflyCounter__dtor = .text:0x8016D1D0; // type:function size:0x40
EldinRollerCounter__dtor = .text:0x8016D210; // type:function size:0x40
SkyStagBeetleCounter__dtor = .text:0x8016D250; // type:function size:0x40
StarryFireflyCounter__dtor = .text:0x8016D290; // type:function size:0x40
HornetLarvaeCounter__dtor = .text:0x8016D2D0; // type:function size:0x40
BirdFeatherCounter__dtor = .text:0x8016D310; // type:function size:0x40
TumbleweedCounter__dtor = .text:0x8016D350; // type:function size:0x40
LizardTailCounter__dtor = .text:0x8016D390; // type:function size:0x40
EldinOreCounter__dtor = .text:0x8016D3D0; // type:function size:0x40
AncientFlowerCounter__dtor = .text:0x8016D410; // type:function size:0x40
AmberRelicCounter__dtor = .text:0x8016D450; // type:function size:0x40
DuskRelicCounter__dtor = .text:0x8016D490; // type:function size:0x40
JellyBlobCounter__dtor = .text:0x8016D4D0; // type:function size:0x40
MonsterClawCounter__dtor = .text:0x8016D510; // type:function size:0x40
MonsterHornCounter__dtor = .text:0x8016D550; // type:function size:0x40
OrnamentalSkullCounter__dtor = .text:0x8016D590; // type:function size:0x40
EvilCrystalCounter__dtor = .text:0x8016D5D0; // type:function size:0x40
BlueBirdFeatherCounter__dtor = .text:0x8016D610; // type:function size:0x40
GoldenSkullCounter__dtor = .text:0x8016D650; // type:function size:0x40
GoddessPlumeCounter__dtor = .text:0x8016D690; // type:function size:0x40
GratitudeCrystalCounter__dtor = .text:0x8016D6D0; // type:function size:0x40
increaseCounter = .text:0x8016D710; // type:function size:0x20
getCounterByIndex = .text:0x8016D730; // type:function size:0x40
getMaxItemCount = .text:0x8016D770; // type:function size:0x40
GratitudeCrystalCounter__getMaxGratitudeCrystalCount = .text:0x8016D7B0; // type:function size:0x8
GoddessPlumeCounter__getMaxGoddessPlumeCount = .text:0x8016D7C0; // type:function size:0x8
GoldenSkullCounter__getMaxGoldenSkullCount = .text:0x8016D7D0; // type:function size:0x8
BlueBirdFeatherCounter__getMaxBlueBirdFeatherCount = .text:0x8016D7E0; // type:function size:0x8
EvilCrystalCounter__getMaxEvilCrystalCount = .text:0x8016D7F0; // type:function size:0x8
OrnamentalSkullCounter__getMaxOrnamentalSkullCount = .text:0x8016D800; // type:function size:0x8
MonsterHornCounter__getMaxMonsterHornCount = .text:0x8016D810; // type:function size:0x8
MonsterClawCounter__getMaxMonsterClawCount = .text:0x8016D820; // type:function size:0x8
JellyBlobCounter__getMaxJellyBlobCount = .text:0x8016D830; // type:function size:0x8
DuskRelicCounter__getMaxDuskRelicCount = .text:0x8016D840; // type:function size:0x8
AmberRelicCounter__getMaxAmberRelicCount = .text:0x8016D850; // type:function size:0x8
AncientFlowerCounter__getMaxAncientFlowerCount = .text:0x8016D860; // type:function size:0x8
EldinOreCounter__getMaxEldinOreCount = .text:0x8016D870; // type:function size:0x8
LizardTailCounter__getMaxLizardTailCount = .text:0x8016D880; // type:function size:0x8
TumbleweedCounter__getMaxTumbleweedCount = .text:0x8016D890; // type:function size:0x8
BirdFeatherCounter__getMaxBirdFeatherCount = .text:0x8016D8A0; // type:function size:0x8
HornetLarvaeCounter__getMaxHornetLarvaeCount = .text:0x8016D8B0; // type:function size:0x8
StarryFireflyCounter__getMaxStarryFireflyCount = .text:0x8016D8C0; // type:function size:0x8
SkyStagBeetleCounter__getMaxSkyStagBeetleCount = .text:0x8016D8D0; // type:function size:0x8
EldinRollerCounter__getMaxEldinRollerCount = .text:0x8016D8E0; // type:function size:0x8
GerudoDragonflyCounter__getMaxGerudoDragonflyCount = .text:0x8016D8F0; // type:function size:0x8
SandCicadaCounter__getMaxSandCicadaCount = .text:0x8016D900; // type:function size:0x8
LanayruAntCounter__getMaxLanayruAntCount = .text:0x8016D910; // type:function size:0x8
BlessedButterflyCounter__getMaxBlessedButterflyCount = .text:0x8016D920; // type:function size:0x8
VolcanicLadybugCounter__getMaxVolcanicLadybugCount = .text:0x8016D930; // type:function size:0x8
SkyloftMantisCounter__getMaxSkyloftMantisCount = .text:0x8016D940; // type:function size:0x8
DekuHornetCounter__getMaxDekuHornetCount = .text:0x8016D950; // type:function size:0x8
WoodlandRhinoCounter__getMaxWoodlandRhinoBeetleCount = .text:0x8016D960; // type:function size:0x8
FaronGrasshopperCounter__getMaxFaronGrasshopperCount = .text:0x8016D970; // type:function size:0x8
HeartContainerCounterMaybe__getMaxHeartContainerHealthCountMaybe = .text:0x8016D980; // type:function size:0x8
HeartPieceCounter__getMaxHeartPieceCount = .text:0x8016D990; // type:function size:0x8
PouchExpansionCounter__getMaxPouchExpansionCount = .text:0x8016D9A0; // type:function size:0x8
DungeonCounter__getMaxSmallKeyCount = .text:0x8016D9B0; // type:function size:0x8
ItemCounterMgr__init = .text:0x8016D9C0; // type:function size:0x448
getCommittedValue__15SmallKeyCounterCFv = .text:0x8016CDA0; // type:function size:0x64
getUncommittedValue__15SmallKeyCounterCFv = .text:0x8016CE10; // type:function size:0x10
setValue__15SmallKeyCounterFUs = .text:0x8016CE20; // type:function size:0x14
__dt__15SmallKeyCounterFv = .text:0x8016CE40; // type:function size:0x40
__dt__21PouchExpansionCounterFv = .text:0x8016CE80; // type:function size:0x40
__dt__17HeartPieceCounterFv = .text:0x8016CEC0; // type:function size:0x40
checkedAdd__17HeartPieceCounterFl = .text:0x8016CF00; // type:function size:0x84
__dt__21HeartContainerCounterFv = .text:0x8016CF90; // type:function size:0x40
__dt__23FaronGrasshopperCounterFv = .text:0x8016CFD0; // type:function size:0x40
__dt__26WoodlandRhinoBeetleCounterFv = .text:0x8016D010; // type:function size:0x40
__dt__17DekuHornetCounterFv = .text:0x8016D050; // type:function size:0x40
__dt__20SkyloftMantisCounterFv = .text:0x8016D090; // type:function size:0x40
__dt__22VolcanicLadybugCounterFv = .text:0x8016D0D0; // type:function size:0x40
__dt__23BlessedButterflyCounterFv = .text:0x8016D110; // type:function size:0x40
__dt__17LanayruAntCounterFv = .text:0x8016D150; // type:function size:0x40
__dt__17SandCicadaCounterFv = .text:0x8016D190; // type:function size:0x40
__dt__22GerudoDragonflyCounterFv = .text:0x8016D1D0; // type:function size:0x40
__dt__18EldinRollerCounterFv = .text:0x8016D210; // type:function size:0x40
__dt__20SkyStagBeetleCounterFv = .text:0x8016D250; // type:function size:0x40
__dt__20StarryFireflyCounterFv = .text:0x8016D290; // type:function size:0x40
__dt__19HornetLarvaeCounterFv = .text:0x8016D2D0; // type:function size:0x40
__dt__18BirdFeatherCounterFv = .text:0x8016D310; // type:function size:0x40
__dt__17TumbleweedCounterFv = .text:0x8016D350; // type:function size:0x40
__dt__17LizardTailCounterFv = .text:0x8016D390; // type:function size:0x40
__dt__15EldinOreCounterFv = .text:0x8016D3D0; // type:function size:0x40
__dt__20AncientFlowerCounterFv = .text:0x8016D410; // type:function size:0x40
__dt__17AmberRelicCounterFv = .text:0x8016D450; // type:function size:0x40
__dt__16DuskRelicCounterFv = .text:0x8016D490; // type:function size:0x40
__dt__16JellyBlobCounterFv = .text:0x8016D4D0; // type:function size:0x40
__dt__18MonsterClawCounterFv = .text:0x8016D510; // type:function size:0x40
__dt__18MonsterHornCounterFv = .text:0x8016D550; // type:function size:0x40
__dt__22OrnamentalSkullCounterFv = .text:0x8016D590; // type:function size:0x40
__dt__18EvilCrystalCounterFv = .text:0x8016D5D0; // type:function size:0x40
__dt__22BlueBirdFeatherCounterFv = .text:0x8016D610; // type:function size:0x40
__dt__18GoldenSkullCounterFv = .text:0x8016D650; // type:function size:0x40
__dt__19GoddessPlumeCounterFv = .text:0x8016D690; // type:function size:0x40
__dt__23GratitudeCrystalCounterFv = .text:0x8016D6D0; // type:function size:0x40
increaseCounter__FUsl = .text:0x8016D710; // type:function size:0x20
getCounterByIndex__FUs = .text:0x8016D730; // type:function size:0x40
getMaxItemCount__FUs = .text:0x8016D770; // type:function size:0x40
getMax__23GratitudeCrystalCounterCFv = .text:0x8016D7B0; // type:function size:0x8
getMax__19GoddessPlumeCounterCFv = .text:0x8016D7C0; // type:function size:0x8
getMax__18GoldenSkullCounterCFv = .text:0x8016D7D0; // type:function size:0x8
getMax__22BlueBirdFeatherCounterCFv = .text:0x8016D7E0; // type:function size:0x8
getMax__18EvilCrystalCounterCFv = .text:0x8016D7F0; // type:function size:0x8
getMax__22OrnamentalSkullCounterCFv = .text:0x8016D800; // type:function size:0x8
getMax__18MonsterHornCounterCFv = .text:0x8016D810; // type:function size:0x8
getMax__18MonsterClawCounterCFv = .text:0x8016D820; // type:function size:0x8
getMax__16JellyBlobCounterCFv = .text:0x8016D830; // type:function size:0x8
getMax__16DuskRelicCounterCFv = .text:0x8016D840; // type:function size:0x8
getMax__17AmberRelicCounterCFv = .text:0x8016D850; // type:function size:0x8
getMax__20AncientFlowerCounterCFv = .text:0x8016D860; // type:function size:0x8
getMax__15EldinOreCounterCFv = .text:0x8016D870; // type:function size:0x8
getMax__17LizardTailCounterCFv = .text:0x8016D880; // type:function size:0x8
getMax__17TumbleweedCounterCFv = .text:0x8016D890; // type:function size:0x8
getMax__18BirdFeatherCounterCFv = .text:0x8016D8A0; // type:function size:0x8
getMax__19HornetLarvaeCounterCFv = .text:0x8016D8B0; // type:function size:0x8
getMax__20StarryFireflyCounterCFv = .text:0x8016D8C0; // type:function size:0x8
getMax__20SkyStagBeetleCounterCFv = .text:0x8016D8D0; // type:function size:0x8
getMax__18EldinRollerCounterCFv = .text:0x8016D8E0; // type:function size:0x8
getMax__22GerudoDragonflyCounterCFv = .text:0x8016D8F0; // type:function size:0x8
getMax__17SandCicadaCounterCFv = .text:0x8016D900; // type:function size:0x8
getMax__17LanayruAntCounterCFv = .text:0x8016D910; // type:function size:0x8
getMax__23BlessedButterflyCounterCFv = .text:0x8016D920; // type:function size:0x8
getMax__22VolcanicLadybugCounterCFv = .text:0x8016D930; // type:function size:0x8
getMax__20SkyloftMantisCounterCFv = .text:0x8016D940; // type:function size:0x8
getMax__17DekuHornetCounterCFv = .text:0x8016D950; // type:function size:0x8
getMax__26WoodlandRhinoBeetleCounterCFv = .text:0x8016D960; // type:function size:0x8
getMax__23FaronGrasshopperCounterCFv = .text:0x8016D970; // type:function size:0x8
getMax__21HeartContainerCounterCFv = .text:0x8016D980; // type:function size:0x8
getMax__17HeartPieceCounterCFv = .text:0x8016D990; // type:function size:0x8
getMax__21PouchExpansionCounterCFv = .text:0x8016D9A0; // type:function size:0x8
getMax__15SmallKeyCounterCFv = .text:0x8016D9B0; // type:function size:0x8
__sinit_\counters_cpp = .text:0x8016D9C0; // type:function size:0x448 scope:local
getBaseCapacity__Fv = .text:0x8016DE10; // type:function size:0xAC scope:local
getExtraWalletCapacity__Fv = .text:0x8016DEC0; // type:function size:0x2C scope:local
__dt__12RupeeCounterFv = .text:0x8016DEF0; // type:function size:0x40 scope:weak
__ct__12RupeeCounterFv = .text:0x8016DF30; // type:function size:0x18
getMax__12RupeeCounterFv = .text:0x8016DF50; // type:function size:0x38 scope:weak
getMax__12RupeeCounterCFv = .text:0x8016DF50; // type:function size:0x38 scope:weak
__sinit_\rupee_counter_cpp = .text:0x8016DF90; // type:function size:0x8 scope:local
__dt__12ArrowCounterFv = .text:0x8016DFA0; // type:function size:0x40 scope:weak
__ct__12ArrowCounterFv = .text:0x8016DFE0; // type:function size:0x18
getMax__12ArrowCounterFv = .text:0x8016E000; // type:function size:0x8 scope:weak
getMax__12ArrowCounterCFv = .text:0x8016E000; // type:function size:0x8 scope:weak
__sinit_\arrow_counter_cpp = .text:0x8016E010; // type:function size:0x8 scope:local
__dt__11BombCounterFv = .text:0x8016E020; // type:function size:0x40 scope:weak
__ct__11BombCounterFv = .text:0x8016E060; // type:function size:0x18
getMax__11BombCounterFv = .text:0x8016E080; // type:function size:0x8 scope:weak
getMax__11BombCounterCFv = .text:0x8016E080; // type:function size:0x8 scope:weak
__sinit_\bomb_counter_cpp = .text:0x8016E090; // type:function size:0x8 scope:local
__dt__11TearCounterFv = .text:0x8016E0A0; // type:function size:0x40 scope:weak
__ct__11TearCounterFv = .text:0x8016E0E0; // type:function size:0x18
getMax__11TearCounterFv = .text:0x8016E100; // type:function size:0x8 scope:weak
getMax__11TearCounterCFv = .text:0x8016E100; // type:function size:0x8 scope:weak
__sinit_\tear_counter_cpp = .text:0x8016E110; // type:function size:0x8 scope:local
__dt__20SlingshotSeedCounterFv = .text:0x8016E120; // type:function size:0x40 scope:weak
__ct__20SlingshotSeedCounterFv = .text:0x8016E160; // type:function size:0x18
getMax__20SlingshotSeedCounterFv = .text:0x8016E180; // type:function size:0x8 scope:weak
getMax__20SlingshotSeedCounterCFv = .text:0x8016E180; // type:function size:0x8 scope:weak
__sinit_\slingshot_seed_counter_cpp = .text:0x8016E190; // type:function size:0x8 scope:local
__dt__15KeyPieceCounterFv = .text:0x8016E1A0; // type:function size:0x40 scope:weak
__ct__15KeyPieceCounterFv = .text:0x8016E1E0; // type:function size:0x18
getMax__15KeyPieceCounterFv = .text:0x8016E200; // type:function size:0x8 scope:weak
getMax__15KeyPieceCounterCFv = .text:0x8016E200; // type:function size:0x8 scope:weak
__sinit_\key_piece_counter_cpp = .text:0x8016E210; // type:function size:0x8 scope:local
__dt__18ExtraWalletCounterFv = .text:0x8016E220; // type:function size:0x40 scope:weak
__ct__18ExtraWalletCounterFv = .text:0x8016E260; // type:function size:0x18
getMax__18ExtraWalletCounterFv = .text:0x8016E280; // type:function size:0x8 scope:weak
getMax__18ExtraWalletCounterCFv = .text:0x8016E280; // type:function size:0x8 scope:weak
__sinit_\extra_wallet_counter_cpp = .text:0x8016E290; // type:function size:0x8 scope:local
itemHasPutItemModel = .text:0x8016E2A0; // type:function size:0x6C
fn_8016E310 = .text:0x8016E310; // type:function size:0x194
@@ -33386,39 +33386,39 @@ lbl_80527AB4 = .data:0x80527AB4; // type:object size:0xC
lbl_80527AC0 = .data:0x80527AC0; // type:object size:0xCC
lbl_80527B8C = .data:0x80527B8C; // type:object size:0x34
lbl_80527BC0 = .data:0x80527BC0; // type:object size:0x10
GRATITUDE_CRYSTAL_COUNTER_vtable = .data:0x80527BD0; // type:object size:0x20
GODDESS_PLUME_COUNTER_vtable = .data:0x80527BF0; // type:object size:0x20
GOLDEN_SKULL_COUNTER_vtable = .data:0x80527C10; // type:object size:0x20
BLUE_BIRD_FEATHER_COUNTER_vtable = .data:0x80527C30; // type:object size:0x20
EVIL_CRYSTAL_COUNTER_vtable = .data:0x80527C50; // type:object size:0x20
ORNAMENTAL_SKULL_COUNTER_vtable = .data:0x80527C70; // type:object size:0x20
MONSTER_HORN_COUNTER_vtable = .data:0x80527C90; // type:object size:0x20
MONSTER_CLAW_COUNTER_vtable = .data:0x80527CB0; // type:object size:0x20
JELLY_BLOB_COUNTER_vtable = .data:0x80527CD0; // type:object size:0x20
DUSK_RELIC_COUNTER_vtable = .data:0x80527CF0; // type:object size:0x20
AMBER_RELIC_COUNTER_vtable = .data:0x80527D10; // type:object size:0x20
ANCIENT_FLOWER_COUNTER_vtable = .data:0x80527D30; // type:object size:0x20
ELDIN_ORE_COUNTER_vtable = .data:0x80527D50; // type:object size:0x20
LIZARD_TAIL_COUNTER_vtable = .data:0x80527D70; // type:object size:0x20
TUMBLEWEED_COUNTER_vtable = .data:0x80527D90; // type:object size:0x20
BIRD_FEATHER_COUNTER_vtable = .data:0x80527DB0; // type:object size:0x20
HORNET_LARVAE_COUNTER_vtable = .data:0x80527DD0; // type:object size:0x20
STARRY_FIREFLY_COUNTER_vtable = .data:0x80527DF0; // type:object size:0x20
SKY_STAG_BEETLE_COUNTER_vtable = .data:0x80527E10; // type:object size:0x20
ELDIN_ROLLER_COUNTER_vtable = .data:0x80527E30; // type:object size:0x20
GERUDO_DRAGONFLY_COUNTER_vtable = .data:0x80527E50; // type:object size:0x20
SAND_CICADA_COUNTER_vtable = .data:0x80527E70; // type:object size:0x20
LANAYRU_ANT_COUNTER_vtable = .data:0x80527E90; // type:object size:0x20
BLESSED_BUTTERFLY_COUNTER_vtable = .data:0x80527EB0; // type:object size:0x20
VOLCANIC_LADYBUG_COUNTER_vtable = .data:0x80527ED0; // type:object size:0x20
SKYLOFT_MANTIS_COUNTER_vtable = .data:0x80527EF0; // type:object size:0x20
DEKU_HORNET_COUNTER_vtable = .data:0x80527F10; // type:object size:0x20
WOODLAND_RHINO_BEETLE_COUNTER_vtable = .data:0x80527F30; // type:object size:0x20
FARON_GRASSHOPPER_COUNTER_vtable = .data:0x80527F50; // type:object size:0x20
HEART_CONTAINER_HEALTH_COUNTER_MAYBE_vtable = .data:0x80527F70; // type:object size:0x20
HEART_PIECE_COUNTER_vtable = .data:0x80527F90; // type:object size:0x20
POUCH_EXPANSION_COUNTER_vtable = .data:0x80527FB0; // type:object size:0x20
SMALL_KEY_COUNTER_vtable = .data:0x80527FD0; // type:object size:0x20
__vt__23GratitudeCrystalCounter = .data:0x80527BD0; // type:object size:0x20
__vt__19GoddessPlumeCounter = .data:0x80527BF0; // type:object size:0x20
__vt__18GoldenSkullCounter = .data:0x80527C10; // type:object size:0x20
__vt__22BlueBirdFeatherCounter = .data:0x80527C30; // type:object size:0x20
__vt__18EvilCrystalCounter = .data:0x80527C50; // type:object size:0x20
__vt__22OrnamentalSkullCounter = .data:0x80527C70; // type:object size:0x20
__vt__18MonsterHornCounter = .data:0x80527C90; // type:object size:0x20
__vt__18MonsterClawCounter = .data:0x80527CB0; // type:object size:0x20
__vt__16JellyBlobCounter = .data:0x80527CD0; // type:object size:0x20
__vt__16DuskRelicCounter = .data:0x80527CF0; // type:object size:0x20
__vt__17AmberRelicCounter = .data:0x80527D10; // type:object size:0x20
__vt__20AncientFlowerCounter = .data:0x80527D30; // type:object size:0x20
__vt__15EldinOreCounter = .data:0x80527D50; // type:object size:0x20
__vt__17LizardTailCounter = .data:0x80527D70; // type:object size:0x20
__vt__17TumbleweedCounter = .data:0x80527D90; // type:object size:0x20
__vt__18BirdFeatherCounter = .data:0x80527DB0; // type:object size:0x20
__vt__19HornetLarvaeCounter = .data:0x80527DD0; // type:object size:0x20
__vt__20StarryFireflyCounter = .data:0x80527DF0; // type:object size:0x20
__vt__20SkyStagBeetleCounter = .data:0x80527E10; // type:object size:0x20
__vt__18EldinRollerCounter = .data:0x80527E30; // type:object size:0x20
__vt__22GerudoDragonflyCounter = .data:0x80527E50; // type:object size:0x20
__vt__17SandCicadaCounter = .data:0x80527E70; // type:object size:0x20
__vt__17LanayruAntCounter = .data:0x80527E90; // type:object size:0x20
__vt__23BlessedButterflyCounter = .data:0x80527EB0; // type:object size:0x20
__vt__22VolcanicLadybugCounter = .data:0x80527ED0; // type:object size:0x20
__vt__20SkyloftMantisCounter = .data:0x80527EF0; // type:object size:0x20
__vt__17DekuHornetCounter = .data:0x80527F10; // type:object size:0x20
__vt__26WoodlandRhinoBeetleCounter = .data:0x80527F30; // type:object size:0x20
__vt__23FaronGrasshopperCounter = .data:0x80527F50; // type:object size:0x20
__vt__21HeartContainerCounter = .data:0x80527F70; // type:object size:0x20
__vt__17HeartPieceCounter = .data:0x80527F90; // type:object size:0x20
__vt__21PouchExpansionCounter = .data:0x80527FB0; // type:object size:0x20
__vt__15SmallKeyCounter = .data:0x80527FD0; // type:object size:0x20
__vt__12RupeeCounter = .data:0x80527FF0; // type:object size:0x20 scope:weak
__vt__12ArrowCounter = .data:0x80528010; // type:object size:0x20 scope:weak
__vt__11BombCounter = .data:0x80528030; // type:object size:0x20 scope:weak
@@ -40123,39 +40123,39 @@ lbl_805754F0 = .sbss:0x805754F0; // type:object size:0x8 data:4byte
sInstance__17dLytCursorStick_c = .sbss:0x805754F8; // type:object size:0x8 data:4byte
GLOBAL_FI_CONTEXT = .sbss:0x80575500; // type:object size:0x4 data:4byte
NAVI_TABLE = .sbss:0x80575504; // type:object size:0x4 data:4byte
SMALL_KEY_COUNTER = .sbss:0x80575508; // type:object size:0x8 data:4byte
POUCH_EXPANSION_COUNTER = .sbss:0x80575510; // type:object size:0x8 data:4byte
HEART_PIECE_COUNTER = .sbss:0x80575518; // type:object size:0x8 data:4byte
HEART_CONTAINER_HEALTH_COUNTER_MAYBE = .sbss:0x80575520; // type:object size:0x8 data:4byte
FARON_GRASSHOPPER_COUNTER = .sbss:0x80575528; // type:object size:0x8 data:4byte
WOODLAND_RHINO_BEETLE_COUNTER = .sbss:0x80575530; // type:object size:0x8 data:4byte
DEKU_HORNET_COUNTER = .sbss:0x80575538; // type:object size:0x8 data:4byte
SKYLOFT_MANTIS_COUNTER = .sbss:0x80575540; // type:object size:0x8 data:4byte
VOLCANIC_LADYBUG_COUNTER = .sbss:0x80575548; // type:object size:0x8 data:4byte
BLESSED_BUTTERFLY_COUNTER = .sbss:0x80575550; // type:object size:0x8 data:4byte
LANAYRU_ANT_COUNTER = .sbss:0x80575558; // type:object size:0x8 data:4byte
SAND_CICADA_COUNTER = .sbss:0x80575560; // type:object size:0x8 data:4byte
GERUDO_DRAGONFLY_COUNTER = .sbss:0x80575568; // type:object size:0x8 data:4byte
ELDIN_ROLLER_COUNTER = .sbss:0x80575570; // type:object size:0x8 data:4byte
SKY_STAG_BEETLE_COUNTER = .sbss:0x80575578; // type:object size:0x8 data:4byte
STARRY_FIREFLY_COUNTER = .sbss:0x80575580; // type:object size:0x8 data:4byte
HORNET_LARVAE_COUNTER = .sbss:0x80575588; // type:object size:0x8 data:4byte
BIRD_FEATHER_COUNTER = .sbss:0x80575590; // type:object size:0x8 data:4byte
TUMBLEWEED_COUNTER = .sbss:0x80575598; // type:object size:0x8 data:4byte
LIZARD_TAIL_COUNTER = .sbss:0x805755A0; // type:object size:0x8 data:4byte
ELDIN_ORE_COUNTER = .sbss:0x805755A8; // type:object size:0x8 data:4byte
ANCIENT_FLOWER_COUNTER = .sbss:0x805755B0; // type:object size:0x8 data:4byte
AMBER_RELIC_COUNTER = .sbss:0x805755B8; // type:object size:0x8 data:4byte
DUSK_RELIC_COUNTER = .sbss:0x805755C0; // type:object size:0x8 data:4byte
JELLY_BLOB_COUNTER = .sbss:0x805755C8; // type:object size:0x8 data:4byte
MONSTER_CLAW_COUNTER = .sbss:0x805755D0; // type:object size:0x8 data:4byte
MONSTER_HORN_COUNTER = .sbss:0x805755D8; // type:object size:0x8 data:4byte
ORNAMENTAL_SKULL_COUNTER = .sbss:0x805755E0; // type:object size:0x8 data:4byte
EVIL_CRYSTAL_COUNTER = .sbss:0x805755E8; // type:object size:0x8 data:4byte
BLUE_BIRD_FEATHER_COUNTER = .sbss:0x805755F0; // type:object size:0x8 data:4byte
GOLDEN_SKULL_COUNTER = .sbss:0x805755F8; // type:object size:0x8 data:4byte
GODDESS_PLUME_COUNTER = .sbss:0x80575600; // type:object size:0x8 data:4byte
GRATITUDE_CRYSTAL_COUNTER = .sbss:0x80575608; // type:object size:0x8 data:4byte
sSmallKeyCounter = .sbss:0x80575508; // type:object size:0x8 data:4byte
sPouchExpansionCounter = .sbss:0x80575510; // type:object size:0x8 data:4byte
sHeartPieceCounter = .sbss:0x80575518; // type:object size:0x8 data:4byte
sHeartContainerCounter = .sbss:0x80575520; // type:object size:0x8 data:4byte
sFaronGrasshopperCounter = .sbss:0x80575528; // type:object size:0x8 data:4byte
sWoodlandRhinoBeetleCounter = .sbss:0x80575530; // type:object size:0x8 data:4byte
sDekuHornetCounter = .sbss:0x80575538; // type:object size:0x8 data:4byte
sSkyloftMantisCounter = .sbss:0x80575540; // type:object size:0x8 data:4byte
sVolcanicLadybugCounter = .sbss:0x80575548; // type:object size:0x8 data:4byte
sBlessedButterflyCounter = .sbss:0x80575550; // type:object size:0x8 data:4byte
sLanayruAntCounter = .sbss:0x80575558; // type:object size:0x8 data:4byte
sSandCicadaCounter = .sbss:0x80575560; // type:object size:0x8 data:4byte
sGerudoDragonflyCounter = .sbss:0x80575568; // type:object size:0x8 data:4byte
sEldinRollerCounter = .sbss:0x80575570; // type:object size:0x8 data:4byte
sSkyStagBeetleCounter = .sbss:0x80575578; // type:object size:0x8 data:4byte
sStarryFireflyCounter = .sbss:0x80575580; // type:object size:0x8 data:4byte
sHornetLarvaeCounter = .sbss:0x80575588; // type:object size:0x8 data:4byte
sBirdFeatherCounter = .sbss:0x80575590; // type:object size:0x8 data:4byte
sTumbleweedCounter = .sbss:0x80575598; // type:object size:0x8 data:4byte
sLizardTailCounter = .sbss:0x805755A0; // type:object size:0x8 data:4byte
sEldinOreCounter = .sbss:0x805755A8; // type:object size:0x8 data:4byte
sAncientFlowerCounter = .sbss:0x805755B0; // type:object size:0x8 data:4byte
sAmberRelicCounter = .sbss:0x805755B8; // type:object size:0x8 data:4byte
sDuskRelicCounter = .sbss:0x805755C0; // type:object size:0x8 data:4byte
sJellyBlobCounter = .sbss:0x805755C8; // type:object size:0x8 data:4byte
sMonsterClawCounter = .sbss:0x805755D0; // type:object size:0x8 data:4byte
sMonsterHornCounter = .sbss:0x805755D8; // type:object size:0x8 data:4byte
sOrnamentalSkullCounter = .sbss:0x805755E0; // type:object size:0x8 data:4byte
sEvilCrystalCounter = .sbss:0x805755E8; // type:object size:0x8 data:4byte
sBlueBirdFeatherCounter = .sbss:0x805755F0; // type:object size:0x8 data:4byte
sGoldenSkullCounter = .sbss:0x805755F8; // type:object size:0x8 data:4byte
sGoddessPlumeCounter = .sbss:0x80575600; // type:object size:0x8 data:4byte
sGratitudeCrystalCounter = .sbss:0x80575608; // type:object size:0x8 data:4byte
RUPEE_COUNTER = .sbss:0x80575610; // type:object size:0x8
ARROW_COUNTER = .sbss:0x80575618; // type:object size:0x8
BOMB_COUNTER = .sbss:0x80575620; // type:object size:0x8
+1
View File
@@ -367,6 +367,7 @@ config.libs = [
Object(NonMatching, "toBeSorted/nand_request_thread.cpp"),
Object(Matching, "toBeSorted/save_file.cpp"),
Object(Matching, "toBeSorted/counters/counter.cpp"),
Object(NonMatching, "toBeSorted/counters/counters.cpp"),
Object(Matching, "toBeSorted/counters/rupee_counter.cpp"),
Object(Matching, "toBeSorted/counters/arrow_counter.cpp"),
Object(Matching, "toBeSorted/counters/bomb_counter.cpp"),
+8 -4
View File
@@ -6,14 +6,18 @@
class Counter {
public:
Counter(u16 id) : counterId(id) {}
virtual ~Counter(){};
virtual ~Counter() {}
virtual s32 checkedAdd(s32 num);
virtual u16 getCommittedValue();
virtual u16 getMax() = 0;
virtual u16 getUncommittedValue();
virtual u16 getCommittedValue() const;
virtual u16 getMax() const = 0;
virtual u16 getUncommittedValue() const;
virtual void setValue(u16 num);
u16 counterId;
};
s32 increaseCounter(u16 counterIdx, s32 value);
s32 getCounterByIndex(u16 counterIdx);
s32 getMaxItemCount(u16 counterIdx);
#endif
+1 -1
View File
@@ -4,7 +4,7 @@ class ArrowCounter : public Counter {
public:
ArrowCounter();
/* 8016DFA0 */ ~ArrowCounter() {}
/* 8016E000 */ virtual u16 getMax() override {
/* 8016E000 */ virtual u16 getMax() const override {
return 20;
};
};
+1 -1
View File
@@ -4,7 +4,7 @@ class BombCounter : public Counter {
public:
BombCounter();
/* 8016E020 */ ~BombCounter() {}
/* 8016E080 */ virtual u16 getMax() override {
/* 8016E080 */ virtual u16 getMax() const override {
return 10;
}
};
+2 -2
View File
@@ -21,11 +21,11 @@
return result <= max ? 0 : (result - max);
}
/* 8016cd30 */ u16 Counter::getCommittedValue() {
/* 8016cd30 */ u16 Counter::getCommittedValue() const {
return ItemflagManager::sInstance->getCounterOrFlag(counterId | 0x4000);
}
/* 8016cd50 */ u16 Counter::getUncommittedValue() {
/* 8016cd50 */ u16 Counter::getUncommittedValue() const {
return ItemflagManager::sInstance->getUncommittedValue(counterId | 0x4000);
}
+169
View File
@@ -0,0 +1,169 @@
#include "d/flag/dungeonflag_manager.h"
#include "toBeSorted/counters/counter.h"
class SmallKeyCounter : public Counter {
public:
SmallKeyCounter() : Counter(0xF) {}
virtual u16 getMax() const override {
return 15;
}
virtual u16 getCommittedValue() const override;
virtual u16 getUncommittedValue() const override;
virtual void setValue(u16 num) override;
};
u16 SmallKeyCounter::getCommittedValue() const {
u16 counter = counterId;
return DungeonflagManager::sInstance->getCounterOrFlag(counter, 8);
}
u16 SmallKeyCounter::getUncommittedValue() const {
return DungeonflagManager::sInstance->getDungeonFlag(counterId);
}
void SmallKeyCounter::setValue(u16 num) {
return DungeonflagManager::sInstance->setToValue(counterId, num);
}
static SmallKeyCounter sSmallKeyCounter;
#define MAKE_COMMON_COUNTER(name, id, max) \
class name##Counter : public Counter { \
public: \
name##Counter() : Counter(id) {} \
virtual u16 getMax() const override { \
return max; \
} \
}; \
static name##Counter s##name##Counter;
MAKE_COMMON_COUNTER(PouchExpansion, 0x1EA, 7);
class HeartPieceCounter : public Counter {
public:
HeartPieceCounter() : Counter(0x1E9) {}
virtual s32 checkedAdd(s32 num) override;
virtual u16 getMax() const override {
return 3;
}
};
static HeartPieceCounter sHeartPieceCounter;
s32 HeartPieceCounter::checkedAdd(s32 num) {
if (num > 0) {
s32 uncommitted = getUncommittedValue();
s32 newCount = uncommitted + num;
setValue(newCount % 4);
}
return 0;
}
MAKE_COMMON_COUNTER(HeartContainer, 0x1Fd, 24);
MAKE_COMMON_COUNTER(FaronGrasshopper, 0x1B9, 99);
MAKE_COMMON_COUNTER(WoodlandRhinoBeetle, 0x1BA, 99);
MAKE_COMMON_COUNTER(DekuHornet, 0x1BB, 99);
MAKE_COMMON_COUNTER(SkyloftMantis, 0x1BC, 99);
MAKE_COMMON_COUNTER(VolcanicLadybug, 0x1BD, 99);
MAKE_COMMON_COUNTER(BlessedButterfly, 0x1BE, 99);
MAKE_COMMON_COUNTER(LanayruAnt, 0x1BF, 99);
MAKE_COMMON_COUNTER(SandCicada, 0x1C0, 99);
MAKE_COMMON_COUNTER(GerudoDragonfly, 0x1C1, 99);
MAKE_COMMON_COUNTER(EldinRoller, 0x1C2, 99);
MAKE_COMMON_COUNTER(SkyStagBeetle, 0x1C3, 99);
MAKE_COMMON_COUNTER(StarryFirefly, 0x1C4, 99);
MAKE_COMMON_COUNTER(HornetLarvae, 0x1A5, 99);
MAKE_COMMON_COUNTER(BirdFeather, 0x1A6, 99);
MAKE_COMMON_COUNTER(Tumbleweed, 0x1A7, 99); // TIM!!
MAKE_COMMON_COUNTER(LizardTail, 0x1A8, 99);
MAKE_COMMON_COUNTER(EldinOre, 0x1A9, 99);
MAKE_COMMON_COUNTER(AncientFlower, 0x1AA, 99);
MAKE_COMMON_COUNTER(AmberRelic, 0x1AB, 99);
MAKE_COMMON_COUNTER(DuskRelic, 0x1AC, 99);
MAKE_COMMON_COUNTER(JellyBlob, 0x1AD, 99);
MAKE_COMMON_COUNTER(MonsterClaw, 0x1AE, 99);
MAKE_COMMON_COUNTER(MonsterHorn, 0x1AF, 99);
MAKE_COMMON_COUNTER(OrnamentalSkull, 0x1B0, 99);
MAKE_COMMON_COUNTER(EvilCrystal, 0x1B1, 99);
MAKE_COMMON_COUNTER(BlueBirdFeather, 0x1B2, 99);
MAKE_COMMON_COUNTER(GoldenSkull, 0x1B3, 99);
MAKE_COMMON_COUNTER(GoddessPlume, 0x1B4, 99);
MAKE_COMMON_COUNTER(GratitudeCrystal, 0x1B5, 127);
// I don't want to move all of these to headers yet
extern TumbleweedCounter ARROW_COUNTER;
extern TumbleweedCounter BOMB_COUNTER;
extern TumbleweedCounter EXTRA_WALLET_COUNTER;
extern TumbleweedCounter KEY_PIECE_COUNTER;
extern TumbleweedCounter RUPEE_COUNTER;
extern TumbleweedCounter SLINGSHOT_SEED_COUNTER;
extern TumbleweedCounter TEAR_COUNTER;
class Counters {
public:
Counters() {
// mCounters\[([0-9]+)\] = &([A-Za-z_]+);
mCounters[0] = &RUPEE_COUNTER;
mCounters[1] = &ARROW_COUNTER;
mCounters[2] = &BOMB_COUNTER;
mCounters[3] = &TEAR_COUNTER;
mCounters[4] = &SLINGSHOT_SEED_COUNTER;
mCounters[5] = &KEY_PIECE_COUNTER;
mCounters[6] = &sSmallKeyCounter;
mCounters[7] = &sPouchExpansionCounter;
mCounters[8] = &sHeartPieceCounter;
mCounters[9] = &sHeartContainerCounter;
mCounters[10] = &sFaronGrasshopperCounter;
mCounters[11] = &sWoodlandRhinoBeetleCounter;
mCounters[12] = &sDekuHornetCounter;
mCounters[13] = &sSkyloftMantisCounter;
mCounters[14] = &sVolcanicLadybugCounter;
mCounters[15] = &sBlessedButterflyCounter;
mCounters[16] = &sLanayruAntCounter;
mCounters[17] = &sSandCicadaCounter;
mCounters[18] = &sGerudoDragonflyCounter;
mCounters[19] = &sEldinRollerCounter;
mCounters[20] = &sSkyStagBeetleCounter;
mCounters[21] = &sStarryFireflyCounter;
mCounters[22] = &sHornetLarvaeCounter;
mCounters[23] = &sBirdFeatherCounter;
mCounters[24] = &sTumbleweedCounter;
mCounters[25] = &sLizardTailCounter;
mCounters[26] = &sEldinOreCounter;
mCounters[27] = &sAncientFlowerCounter;
mCounters[28] = &sAmberRelicCounter;
mCounters[29] = &sDuskRelicCounter;
mCounters[30] = &sJellyBlobCounter;
mCounters[31] = &sMonsterClawCounter;
mCounters[32] = &sMonsterHornCounter;
mCounters[33] = &sOrnamentalSkullCounter;
mCounters[34] = &sEvilCrystalCounter;
mCounters[35] = &sBlueBirdFeatherCounter;
mCounters[36] = &sGoldenSkullCounter;
mCounters[37] = &sGoddessPlumeCounter;
mCounters[38] = &sGratitudeCrystalCounter;
mCounters[39] = &EXTRA_WALLET_COUNTER;
}
Counter *mCounters[40];
};
Counters sCounters;
s32 increaseCounter(u16 counterIdx, s32 value) {
return sCounters.mCounters[counterIdx]->checkedAdd(value);
}
s32 getCounterByIndex(u16 counterIdx) {
return sCounters.mCounters[counterIdx]->getCommittedValue();
}
s32 getMaxItemCount(u16 counterIdx) {
return sCounters.mCounters[counterIdx]->getMax();
}
@@ -4,7 +4,7 @@ class ExtraWalletCounter : public Counter {
public:
ExtraWalletCounter();
/* 8016E220 */ ~ExtraWalletCounter() {}
/* 8016E280 */ virtual u16 getMax() override {
/* 8016E280 */ virtual u16 getMax() const override {
return 3;
}
};
@@ -4,7 +4,7 @@ class KeyPieceCounter : public Counter {
public:
KeyPieceCounter();
/* 8016E1A0 */ ~KeyPieceCounter() {}
/* 8016E200 */ virtual u16 getMax() override {
/* 8016E200 */ virtual u16 getMax() const override {
return 5;
}
};
+1 -4
View File
@@ -9,7 +9,7 @@ class RupeeCounter : public Counter {
public:
RupeeCounter();
/* 8016DEF0 */ ~RupeeCounter() {}
/* 8016DF50 */ virtual u16 getMax() override {
/* 8016DF50 */ virtual u16 getMax() const override {
return (getBaseCapacity() + getExtraWalletCapacity());
}
};
@@ -36,9 +36,6 @@ struct WalletStruct {
return 300;
}
// TODO main counters class
extern "C" u16 getCounterByIndex(u16);
/* 8016DEC0 */ static u16 getExtraWalletCapacity() {
return 300 * getCounterByIndex(0x27); // Maybe 0x27 corresponds to item 27 -> small wallet?
}
@@ -4,7 +4,7 @@ class SlingshotSeedCounter : public Counter {
public:
SlingshotSeedCounter();
/* 8016E120 */ ~SlingshotSeedCounter() {}
/* 8016E180 */ virtual u16 getMax() override {
/* 8016E180 */ virtual u16 getMax() const override {
return 20;
};
};
+1 -1
View File
@@ -4,7 +4,7 @@ class TearCounter : public Counter {
public:
TearCounter();
/* 8016E0A0 */ ~TearCounter() {}
/* 8016E100 */ virtual u16 getMax() override {
/* 8016E100 */ virtual u16 getMax() const override {
return 15;
};
};