Use textures for boss souls in item tracker (#4925)

* Use textures for boss souls in item tracker

* Fix builds
This commit is contained in:
aMannus 2025-01-21 00:12:49 +01:00 committed by GitHub
parent 5c4a6ae8c0
commit 8a5dd6323c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 13 deletions

View File

@ -77,7 +77,7 @@ std::unordered_map<RandomizerGet, std::string> ocarinaButtonNames = {
{ RG_OCARINA_C_RIGHT_BUTTON, "C-RHT" },
};
std::map<RandomizerGet, ImVec4> bossSoulMapping = {
std::map<RandomizerGet, ImVec4> bossSoulColorMapping = {
{ RG_GOHMA_SOUL, { 0.00f, 1.00f, 0.00f, 1.0f } },
{ RG_KING_DODONGO_SOUL, { 1.00f, 0.00f, 0.39f, 1.0f } },
{ RG_BARINADE_SOUL, { 0.20f, 1.00f, 1.00f, 1.0f } },
@ -339,7 +339,7 @@ ImVec4 plandomizerGetItemColor(Rando::Item randoItem) {
}
if (randoItem.GetRandomizerGet() >= RG_GOHMA_SOUL && randoItem.GetRandomizerGet() <= RG_GANON_SOUL) {
itemColor = bossSoulMapping.at(randoItem.GetRandomizerGet());
itemColor = bossSoulColorMapping.at(randoItem.GetRandomizerGet());
}
return itemColor;

View File

@ -90,17 +90,15 @@ std::vector<ItemTrackerItem> triforcePieces = {
};
std::vector<ItemTrackerItem> bossSoulItems = {
//Hack for right now, just gonna draw souls as bottles/big poes.
//Will replace with other macro once we have a custom texture
ITEM_TRACKER_ITEM_CUSTOM(RG_GOHMA_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_KING_DODONGO_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_BARINADE_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_PHANTOM_GANON_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_VOLVAGIA_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_MORPHA_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_BONGO_BONGO_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_TWINROVA_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM_CUSTOM(RG_GANON_SOUL, ITEM_BIG_POE, ITEM_BOTTLE, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_GOHMA_SOUL, 0, DrawItem),
ITEM_TRACKER_ITEM(RG_KING_DODONGO_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_BARINADE_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_PHANTOM_GANON_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_VOLVAGIA_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_MORPHA_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_BONGO_BONGO_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_TWINROVA_SOUL, 0, DrawItem ),
ITEM_TRACKER_ITEM(RG_GANON_SOUL, 0, DrawItem ),
};
std::vector<ItemTrackerItem> ocarinaButtonItems = {

View File

@ -136,6 +136,18 @@ std::map<uint32_t, ItemMapEntry> triforcePieceMapping = {
{RG_TRIFORCE_PIECE, {RG_TRIFORCE_PIECE, "RG_TRIFORCE_PIECE", "RG_TRIFORCE_PIECE_Faded", gTriforcePieceTex}}
};
std::map<uint32_t, ItemMapEntry> bossSoulMapping = {
{ RG_GOHMA_SOUL, { RG_GOHMA_SOUL, "RG_GOHMA_SOUL", "RG_GOHMA_SOUL_Faded", gBossSoulTex } },
{ RG_KING_DODONGO_SOUL, { RG_KING_DODONGO_SOUL, "RG_KING_DODONGO_SOUL", "RG_KING_DODONGO_SOUL_Faded", gBossSoulTex } },
{ RG_BARINADE_SOUL, { RG_BARINADE_SOUL, "RG_BARINADE_SOUL", "RG_BARINADE_SOUL_Faded", gBossSoulTex } },
{ RG_PHANTOM_GANON_SOUL,{ RG_PHANTOM_GANON_SOUL,"RG_PHANTOM_GANON_SOUL","RG_PHANTOM_GANON_SOUL_Faded", gBossSoulTex } },
{ RG_VOLVAGIA_SOUL, { RG_VOLVAGIA_SOUL, "RG_VOLVAGIA_SOUL", "RG_VOLVAGIA_SOUL_Faded", gBossSoulTex } },
{ RG_MORPHA_SOUL, { RG_MORPHA_SOUL, "RG_MORPHA_SOUL", "RG_MORPHA_SOUL_Faded", gBossSoulTex } },
{ RG_BONGO_BONGO_SOUL, { RG_BONGO_BONGO_SOUL, "RG_BONGO_BONGO_SOUL", "RG_BONGO_BONGO_SOUL_Faded", gBossSoulTex } },
{ RG_TWINROVA_SOUL, { RG_TWINROVA_SOUL, "RG_TWINROVA_SOUL", "RG_TWINROVA_SOUL_Faded", gBossSoulTex } },
{ RG_GANON_SOUL, { RG_GANON_SOUL, "RG_GANON_SOUL", "RG_GANON_SOUL_Faded", gBossSoulTex } },
};
std::map<uint32_t, QuestMapEntry> questMapping = {
QUEST_MAP_ENTRY(QUEST_MEDALLION_FOREST, dgQuestIconMedallionForestTex),
QUEST_MAP_ENTRY(QUEST_MEDALLION_FIRE, dgQuestIconMedallionFireTex),
@ -208,6 +220,11 @@ void RegisterImGuiItemIcons() {
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
}
for (const auto& entry : bossSoulMapping) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
}
for (const auto& entry : questMapping) {
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
Ship::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));