Skip to content

Commit

Permalink
Add "More info in file select" enhancement (HarbourMasters#3053)
Browse files Browse the repository at this point in the history
* Initial attempt

* Fix rendering for most items

* Fixed icon sizes and reorganized icons

* Fix equipment, quest & upgrade icons

* Add colors to the song icons

* Remove box, clean up code & move seed hash icons to top

* Start with counters, fix copy & erase and show spoiler log hash icons

* Add icons for upgrades

* Draw icons for counters

* Initial counter work

* Fix counter digits positioning

* Prevent crashes when over 999 deaths (save editor)

* Add greg to tracker when in a rando save

* Fix color for counter digits using the wrong buffer

* Add double defense icon

* Addressed code review

* Remove unneeded checks against 0
  • Loading branch information
Pepe20129 authored Aug 16, 2023
1 parent 6923c2d commit 8872a59
Show file tree
Hide file tree
Showing 4 changed files with 738 additions and 39 deletions.
11 changes: 11 additions & 0 deletions soh/soh/SaveManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,17 @@ void SaveManager::InitMeta(int fileNum) {
}
fileMetaInfo[fileNum].healthCapacity = gSaveContext.healthCapacity;
fileMetaInfo[fileNum].questItems = gSaveContext.inventory.questItems;
for (int i = 0; i < ARRAY_COUNT(fileMetaInfo[fileNum].inventoryItems); i++) {
fileMetaInfo[fileNum].inventoryItems[i] = gSaveContext.inventory.items[i];
}
fileMetaInfo[fileNum].equipment = gSaveContext.inventory.equipment;
fileMetaInfo[fileNum].upgrades = gSaveContext.inventory.upgrades;
fileMetaInfo[fileNum].isMagicAcquired = gSaveContext.isMagicAcquired;
fileMetaInfo[fileNum].isDoubleMagicAcquired = gSaveContext.isDoubleMagicAcquired;
fileMetaInfo[fileNum].rupees = gSaveContext.rupees;
fileMetaInfo[fileNum].gsTokens = gSaveContext.inventory.gsTokens;
fileMetaInfo[fileNum].isDoubleDefenseAcquired = gSaveContext.isDoubleDefenseAcquired;
fileMetaInfo[fileNum].gregFound = Flags_GetRandomizerInf(RAND_INF_GREG_FOUND);
fileMetaInfo[fileNum].defense = gSaveContext.inventory.defenseHearts;
fileMetaInfo[fileNum].health = gSaveContext.health;

Expand Down
10 changes: 10 additions & 0 deletions soh/soh/SaveManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ typedef struct {
s16 buildVersionMajor;
s16 buildVersionMinor;
s16 buildVersionPatch;

u8 inventoryItems[24];
u16 equipment;
u32 upgrades;
u8 isMagicAcquired;
u8 isDoubleMagicAcquired;
s16 rupees;
s16 gsTokens;
u8 isDoubleDefenseAcquired;
u8 gregFound;
} SaveFileMetaInfo;

#ifdef __cplusplus
Expand Down
2 changes: 2 additions & 0 deletions soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ void DrawEnhancementsMenu() {
"This might affect other decal effects\n");
UIWidgets::PaddedEnhancementSliderInt("Text Spacing: %d", "##TEXTSPACING", "gTextSpacing", 4, 6, "", 6, true, true, true);
UIWidgets::Tooltip("Space between text characters (useful for HD font textures)");
UIWidgets::PaddedEnhancementCheckbox("More info in file select", "gFileSelectMoreInfo", true, false);
UIWidgets::Tooltip("Shows what items you have collected in the file select screen, like in N64 randomizer");
ImGui::EndMenu();
}

Expand Down
Loading

0 comments on commit 8872a59

Please sign in to comment.