Fix RBA gauntlet colors to match console (#6359)
Also fix tracker to show golden gauntlets while wearing glitched gauntlets, & don't crash save editor
This commit is contained in:
@@ -1204,7 +1204,9 @@ void DrawUpgrade(const std::string& categoryName, int32_t categoryId, const std:
|
|||||||
ImGui::PushID(categoryName.c_str());
|
ImGui::PushID(categoryName.c_str());
|
||||||
PushStyleCombobox(THEME_COLOR);
|
PushStyleCombobox(THEME_COLOR);
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
if (ImGui::BeginCombo("##upgrade", names[CUR_UPG_VALUE(categoryId)].c_str())) {
|
auto value = (size_t)CUR_UPG_VALUE(categoryId);
|
||||||
|
auto name = value < names.size() ? names[value].c_str() : "Glitched";
|
||||||
|
if (ImGui::BeginCombo("##upgrade", name)) {
|
||||||
for (size_t i = 0; i < names.size(); i++) {
|
for (size_t i = 0; i < names.size(); i++) {
|
||||||
if (ImGui::Selectable(names[i].c_str())) {
|
if (ImGui::Selectable(names[i].c_str())) {
|
||||||
Inventory_ChangeUpgrade(categoryId, i);
|
Inventory_ChangeUpgrade(categoryId, i);
|
||||||
@@ -1225,7 +1227,8 @@ void DrawUpgradeIcon(const std::string& categoryName, int32_t categoryId, const
|
|||||||
ImGui::PushID(categoryName.c_str());
|
ImGui::PushID(categoryName.c_str());
|
||||||
|
|
||||||
PushStyleButton(Colors::DarkGray);
|
PushStyleButton(Colors::DarkGray);
|
||||||
uint8_t item = items[CUR_UPG_VALUE(categoryId)];
|
auto value = (size_t)CUR_UPG_VALUE(categoryId);
|
||||||
|
uint8_t item = value < items.size() ? items[value] : ITEM_NONE;
|
||||||
if (item != ITEM_NONE) {
|
if (item != ITEM_NONE) {
|
||||||
const ItemMapEntry& slotEntry = itemMapping[item];
|
const ItemMapEntry& slotEntry = itemMapping[item];
|
||||||
if (ImGui::ImageButton(slotEntry.name.c_str(),
|
if (ImGui::ImageButton(slotEntry.name.c_str(),
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ void DrawItem(ItemTrackerItem item) {
|
|||||||
case ITEM_BRACELET:
|
case ITEM_BRACELET:
|
||||||
case ITEM_GAUNTLETS_SILVER:
|
case ITEM_GAUNTLETS_SILVER:
|
||||||
case ITEM_GAUNTLETS_GOLD:
|
case ITEM_GAUNTLETS_GOLD:
|
||||||
actualItemId = CUR_UPG_VALUE(UPG_STRENGTH) == 3 ? ITEM_GAUNTLETS_GOLD
|
actualItemId = CUR_UPG_VALUE(UPG_STRENGTH) >= 3 ? ITEM_GAUNTLETS_GOLD
|
||||||
: CUR_UPG_VALUE(UPG_STRENGTH) == 2 ? ITEM_GAUNTLETS_SILVER
|
: CUR_UPG_VALUE(UPG_STRENGTH) == 2 ? ITEM_GAUNTLETS_SILVER
|
||||||
: ITEM_BRACELET;
|
: ITEM_BRACELET;
|
||||||
hasItem = CUR_UPG_VALUE(UPG_STRENGTH) > 0;
|
hasItem = CUR_UPG_VALUE(UPG_STRENGTH) > 0;
|
||||||
|
|||||||
@@ -1019,6 +1019,11 @@ Color_RGB8 sTunicColors[] = {
|
|||||||
Color_RGB8 sGauntletColors[] = {
|
Color_RGB8 sGauntletColors[] = {
|
||||||
{ 255, 255, 255 },
|
{ 255, 255, 255 },
|
||||||
{ 254, 207, 15 },
|
{ 254, 207, 15 },
|
||||||
|
// #region SOH [RBA] values matching OOB reads on N64
|
||||||
|
{ 0, 0, 6 },
|
||||||
|
{ 2, 89, 24 },
|
||||||
|
{ 6, 2, 90 },
|
||||||
|
{ 96, 6, 2 },
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* sBootDListGroups[][2] = {
|
Gfx* sBootDListGroups[][2] = {
|
||||||
@@ -1098,13 +1103,11 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
|
|||||||
color = &sGauntletColors[strengthUpgrade - 2];
|
color = &sGauntletColors[strengthUpgrade - 2];
|
||||||
if (strengthUpgrade == PLAYER_STR_SILVER_G &&
|
if (strengthUpgrade == PLAYER_STR_SILVER_G &&
|
||||||
CVarGetInteger(CVAR_COSMETIC("Gloves.SilverGauntlets.Changed"), 0)) {
|
CVarGetInteger(CVAR_COSMETIC("Gloves.SilverGauntlets.Changed"), 0)) {
|
||||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.SilverGauntlets.Value"),
|
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.SilverGauntlets.Value"), *color);
|
||||||
sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
|
||||||
color = &sTemp;
|
color = &sTemp;
|
||||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G &&
|
} else if (strengthUpgrade == PLAYER_STR_GOLD_G &&
|
||||||
CVarGetInteger(CVAR_COSMETIC("Gloves.GoldenGauntlets.Changed"), 0)) {
|
CVarGetInteger(CVAR_COSMETIC("Gloves.GoldenGauntlets.Changed"), 0)) {
|
||||||
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.GoldenGauntlets.Value"),
|
sTemp = CVarGetColor24(CVAR_COSMETIC("Gloves.GoldenGauntlets.Value"), *color);
|
||||||
sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
|
||||||
color = &sTemp;
|
color = &sTemp;
|
||||||
}
|
}
|
||||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user