Add silver/golden gauntlets to Cosmetics Editor (#1683)

* Add golden gauntlets to Cosmetics Editor

* Removed extra space

* Fixed comment

* Changed comment again (helps if you save the file before committing)
This commit is contained in:
aMannus 2022-10-03 11:15:19 +02:00 committed by GitHub
parent 6bdca84b90
commit db2e6164cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 2 deletions

View File

@ -12,6 +12,7 @@
const char* RainbowColorCvarList[] = {
//This is the list of possible CVars that has rainbow effect.
"gTunic_Kokiri", "gTunic_Goron", "gTunic_Zora",
"gGauntlets_Silver", "gGauntlets_Golden",
"gFireArrowCol", "gIceArrowCol",
"gNormalArrowCol", "gNormalArrowColEnv",
"gFireArrowColEnv", "gIceArrowColEnv", "gLightArrowColEnv",
@ -353,6 +354,7 @@ void DrawRandomizeResetButton(const std::string Identifier, CosmeticsColorSectio
CVar_SetS32("gUseKeeseCol", 1);
CVar_SetS32("gUseDogsCol", 1);
CVar_SetS32("gUseTunicsCol", 1);
CVar_SetS32("gUseGauntletsCol", 1);
CVar_SetS32("gUseArrowsCol", 1);
CVar_SetS32("gUseSpellsCol", 1);
CVar_SetS32("gUseChargedCol", 1);
@ -423,6 +425,21 @@ void Draw_ItemsSkills(){
DrawColorSection(Tunics_Section, SECTION_SIZE(Tunics_Section));
ImGui::EndTable();
}
UIWidgets::EnhancementCheckbox("Custom gauntlets color", "gUseGauntletsCol");
UIWidgets::Tooltip(
"Enable/Disable custom Link's gauntlets colors\nIf disabled you will have original colors for Link's gauntlets.");
if (CVar_GetS32("gUseGauntletsCol", 0)) {
DrawRandomizeResetButton("Link's gauntlets", Gauntlets_Section, SECTION_SIZE(Gauntlets_Section));
};
if (CVar_GetS32("gUseGauntletsCol", 0) && ImGui::BeginTable("tableGauntlets", 2, FlagsTable)) {
ImGui::TableSetupColumn("Silver Gauntlets", FlagsCell, TablesCellsWidth / 2);
ImGui::TableSetupColumn("Gold Gauntlets", FlagsCell, TablesCellsWidth / 2);
Table_InitHeader();
DrawColorSection(Gauntlets_Section, SECTION_SIZE(Gauntlets_Section));
ImGui::EndTable();
}
UIWidgets::EnhancementCheckbox("Custom arrows colors", "gUseArrowsCol");
if (CVar_GetS32("gUseArrowsCol",0)) {
DrawRandomizeResetButton("elemental arrows", Arrows_section, SECTION_SIZE(Arrows_section));

View File

@ -37,6 +37,7 @@ static ImVec4 cp_minimap_colors; static ImVec4 le_minimap_colors;
static ImVec4 rupee_colors; static ImVec4 smolekey_colors; static ImVec4 magic_bordern_colors;
static ImVec4 fileselect_colors; static ImVec4 fileselect_text_colors;
static ImVec4 kokiri_col; static ImVec4 goron_col; static ImVec4 zora_col;
static ImVec4 silvergaunts_col; static ImVec4 goldengaunts_col;
static ImVec4 navi_idle_i_col; static ImVec4 navi_idle_o_col;
static ImVec4 navi_npc_i_col; static ImVec4 navi_npc_o_col;
static ImVec4 navi_enemy_i_col; static ImVec4 navi_enemy_o_col;
@ -86,11 +87,15 @@ static CosmeticsColorIndividual Keese2_env = { "Ice Secondary color", "Affects t
static CosmeticsColorIndividual DogN1 = { "Dog white", "Affects the colors of the white dog", "gDog1Col", doggo1col, ImVec4(255,255,200,255), true, false, true };
static CosmeticsColorIndividual DogN2 = { "Dog brown", "Affects the colors of the brown dog", "gDog2Col", doggo2col, ImVec4(150,100,50,255), true, false, true };
//Tunics colors
//Tunic colors
static CosmeticsColorIndividual KokiriTunic = { "Kokiri Tunic", "Affects Kokiri Tunic color", "gTunic_Kokiri", kokiri_col, ImVec4(30, 105, 27, 255), true, false, true };
static CosmeticsColorIndividual GoronTunic = { "Goron Tunic", "Affects Goron Tunic color", "gTunic_Goron", goron_col, ImVec4(100, 20, 0, 255), true, false, true };
static CosmeticsColorIndividual ZoraTunic = { "Zora Tunic", "Affects Zora Tunic color", "gTunic_Zora", zora_col, ImVec4(0, 60, 100, 255), true, false, true };
//Gauntlet colors
static CosmeticsColorIndividual SilverGauntlets = { "Silver Gauntlets", "Affects Silver Gauntlets color", "gGauntlets_Silver", silvergaunts_col, ImVec4(255, 255, 255, 255), true, false, true };
static CosmeticsColorIndividual GoldenGauntlets = { "Golden Gauntlets", "Affects Golden Gauntlets color", "gGauntlets_Golden", goldengaunts_col, ImVec4(254, 207, 15, 255), true, false, true };
//Arrows (Fire -> Ice -> Light)
static CosmeticsColorIndividual Normal_Arrow_Prim = { "Normal Arrows (primary)", "Affects Primary color", "gNormalArrowCol", normalarrow_col, ImVec4(255, 255, 170, 255), true, false, false };
static CosmeticsColorIndividual Normal_Arrow_Env = { "Normal Arrows (Secondary)", "Affects Secondary color", "gNormalArrowColEnv", normalarrow_colenv, ImVec4(0, 150, 0, 0), true, false, false };
@ -208,6 +213,10 @@ static CosmeticsColorSection Tunics_Section[] = {
{ &GoronTunic, true, false },
{ &ZoraTunic, true, false }
};
static CosmeticsColorSection Gauntlets_Section[] = {
{ &SilverGauntlets, false, false },
{ &GoldenGauntlets, true, false },
};
static CosmeticsColorSection Arrows_section[] = {
{ &Normal_Arrow_Prim, false, false },
{ &Normal_Arrow_Env, true, false },
@ -343,6 +352,8 @@ static CosmeticsColorSection Everything_Section[] = {
{ &KokiriTunic, false, false },
{ &GoronTunic, true, false },
{ &ZoraTunic, true, false },
{ &SilverGauntlets, true, false },
{ &GoldenGauntlets, true, false },
{ &Normal_Arrow_Prim, false, false },
{ &Normal_Arrow_Env, true, false },
{ &Fire_Arrow_Prim, false, true },

View File

@ -784,7 +784,14 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
if (strengthUpgrade >= 2) { // silver or gold gauntlets
gDPPipeSync(POLY_OPA_DISP++);
color = &sGauntletColors[strengthUpgrade - 2];
if (!CVar_GetS32("gUseGauntletsCol", 0)) {
color = &sGauntletColors[strengthUpgrade - 2];
} else if (strengthUpgrade == PLAYER_STR_SILVER_G) {
*color = CVar_GetRGB("gGauntlets_Silver", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
} else if (strengthUpgrade == PLAYER_STR_GOLD_G) {
*color = CVar_GetRGB("gGauntlets_Golden", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
}
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultLeftGauntletPlate1DL);