diff --git a/libultraship/libultraship/ImGuiImpl.cpp b/libultraship/libultraship/ImGuiImpl.cpp
index a01defd3b..5e9b404d9 100644
--- a/libultraship/libultraship/ImGuiImpl.cpp
+++ b/libultraship/libultraship/ImGuiImpl.cpp
@@ -65,40 +65,22 @@ namespace SohImGui {
GameOverlay* overlay = new GameOverlay;
bool p_open = false;
bool needs_save = false;
- ImVec4 hearts_colors;
- ImVec4 hearts_dd_colors;
- ImVec4 a_btn_colors;
- ImVec4 b_btn_colors;
- ImVec4 c_btn_colors;
- ImVec4 start_btn_colors;
- ImVec4 magic_border_colors;
- ImVec4 magic_remaining_colors;
- ImVec4 magic_use_colors;
- ImVec4 minimap_colors;
- ImVec4 rupee_colors;
- ImVec4 smolekey_colors;
- ImVec4 fileselect_colors;
- ImVec4 fileselect_text_colors;
- ImVec4 kokiri_col;
- ImVec4 goron_col;
- ImVec4 zora_col;
- ImVec4 navi_idle_i_col;
- ImVec4 navi_idle_o_col;
- ImVec4 navi_npc_i_col;
- ImVec4 navi_npc_o_col;
- ImVec4 navi_enemy_i_col;
- ImVec4 navi_enemy_o_col;
- ImVec4 navi_prop_i_col;
- ImVec4 navi_prop_o_col;
const char* RainbowColorCvarList[] = {
//This is the list of possible CVars that has rainbow effect.
- "gTunic_Kokiri_","gTunic_Goron_","gTunic_Zora_",
- "gCCHeartsPrim","gDDCCHeartsPrim",
- "gCCABtnPrim","gCCBBtnPrim","gCCCBtnPrim","gCCStartBtnPrim",
- "gCCMagicBorderPrim","gCCMagicPrim","gCCMagicUsePrim",
- "gCCMinimapPrim","gCCRupeePrim","gCCKeysPrim",
- "gCCFileChoosePrim", "gCCFileChooseTextPrim"
+ "gTunic_Kokiri_", "gTunic_Goron_", "gTunic_Zora_",
+ "gCCHeartsPrim", "gDDCCHeartsPrim", "gCCDDHeartsPrim",
+ "gCCABtnPrim", "gCCBBtnPrim", "gCCCBtnPrim", "gCCStartBtnPrim",
+ "gCCCUBtnPrim", "gCCCLBtnPrim", "gCCCRBtnPrim", "gCCCDBtnPrim", "gCCDpadPrim",
+ "gCCMagicBorderNormPrim", "gCCMagicBorderPrim", "gCCMagicPrim", "gCCMagicUsePrim",
+ "gCCMinimapPrim", "gCCMinimapDGNPrim", "gCCMinimapCPPrim", "gCCMinimapLEPrim",
+ "gCCRupeePrim", "gCCKeysPrim", "gDog1Col", "gDog2Col", "gCCVSOAPrim",
+ "gKeese1_Ef_Prim","gKeese2_Ef_Prim","gKeese1_Ef_Env","gKeese2_Ef_Env",
+ "gDF_Col", "gDF_Env",
+ "gNL_Diamond_Col", "gNL_Diamond_Env", "gNL_Orb_Col", "gNL_Orb_Env",
+ "gTrailCol", "gCharged1Col", "gCharged1ColEnv", "gCharged2Col", "gCharged2ColEnv",
+ "gCCFileChoosePrim", "gCCFileChooseTextPrim", "gCCEquipmentsPrim", "gCCItemsPrim",
+ "gCCMapsPrim", "gCCQuestsPrim", "gCCSavePrim", "gCCGameoverPrim",
};
const char* filters[3] = {
@@ -652,7 +634,8 @@ namespace SohImGui {
}
void EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow, bool has_alpha, bool TitleSameLine) {
- std::string Cvar_Red = cvarName;
+ //This will be moved to external cosmetics ed
+ std::string Cvar_Red = cvarName;
Cvar_Red += "R";
std::string Cvar_Green = cvarName;
Cvar_Green += "G";
@@ -689,21 +672,17 @@ namespace SohImGui {
}
//ImGui::SameLine(); // Removing that one to gain some width spacing on the HUD editor
- ImGui::NewLine();
ImGui::PushItemWidth(-FLT_MIN);
ResetColor(cvarName, &ColorRGBA, default_colors, has_alpha);
ImGui::SameLine();
RandomizeColor(cvarName, &ColorRGBA);
if (allow_rainbow) {
-
- if (ImGui::GetWindowSize().x > 560) {
+ if (ImGui::GetContentRegionAvail().x > 185) {
ImGui::SameLine();
}
- else {
- ImGui::NewLine();
- }
RainbowColor(cvarName, &ColorRGBA);
}
+ ImGui::NewLine();
ImGui::PopItemWidth();
}
@@ -1198,23 +1177,6 @@ namespace SohImGui {
ImGui::EndMenu();
}
- if (ImGui::BeginMenu("Cosmetics")) {
- EnhancementCheckbox("Cosmetics editor", "gCosmeticEditor");
- Tooltip("Edit Navi and Link's Tunics color.");
- EnhancementCheckbox("HUD Margins editor", "gUseMargins");
- EnhancementRadioButton("N64 interface", "gHudColors", 0);
- Tooltip("Change interface color to N64 style.");
- EnhancementRadioButton("GameCube interface", "gHudColors", 1);
- Tooltip("Change interface color to GameCube style.");
- EnhancementRadioButton("Custom interface", "gHudColors", 2);
- Tooltip("Change interface color to your own made style.");
- if (CVar_GetS32("gHudColors", 1) == 2) {
- EnhancementCheckbox("Interface editor", "gColorsEditor");
- Tooltip("Edit the colors used for your own interface");
- }
- ImGui::EndMenu();
- }
-
if (ImGui::BeginMenu("Cheats"))
{
if (ImGui::BeginMenu("Infinite...")) {
@@ -1271,167 +1233,6 @@ namespace SohImGui {
ImGui::EndMenu();
}
- bool Margins_isOpen = CVar_GetS32("gUseMargins", 0);
- bool Cosmetics_isOpen = CVar_GetS32("gCosmeticEditor", 0);
- bool Interface_isOpen = CVar_GetS32("gColorsEditor", 0);
-
- if (Margins_isOpen) {
- if (!Margins_isOpen) {
- CVar_SetS32("gHUDMargins", 0);
- return;
- }
- ImGui::SetNextWindowSize(ImVec2(520, 600), ImGuiCond_FirstUseEver);
- ImGui::Begin("Margins Editor", nullptr, ImGuiWindowFlags_NoFocusOnAppearing);
- if (ImGui::BeginTabBar("Margins Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
- if (ImGui::BeginTabItem("Interface margins")) {
- EnhancementCheckbox("Use margins", "gHUDMargins");
- Tooltip("Enable/Disable custom margins. \nIf disabled you will have original margins");
- EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", -20, 20, "");
- EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, 25, "");
- EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", -25, 25, "");
- EnhancementSliderInt("Bottom: %dx", "##UIMARGINB", "gHUDMargin_B", -20, 20, "");
- ImGui::EndTabItem();
- }
- ImGui::EndTabBar();
- }
- ImGui::End();
- }
- if (Cosmetics_isOpen) {
- if (!Cosmetics_isOpen) {
- CVar_SetS32("gCosmeticEditor", 0);
- return;
- }
- ImGui::SetNextWindowSize(ImVec2(500, 627), ImGuiCond_FirstUseEver);
- ImGui::Begin("Cosmetics Editor", nullptr, ImGuiWindowFlags_NoFocusOnAppearing);
- if (ImGui::BeginTabBar("Cosmetics Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
- if (ImGui::BeginTabItem("Navi")) {
- EnhancementCheckbox("Custom colors for Navi", "gUseNaviCol");
- Tooltip("Enable/Disable custom Navi's colors. \nIf disabled you will have original colors for Navi.\nColors are refreshed when Navi goes back in your pockets.");
- EnhancementColor("Navi Idle Inner", "gNavi_Idle_Inner_", navi_idle_i_col, ImVec4(255, 255, 255, 255), false);
- Tooltip("Inner color for Navi (idle flying around)");
- EnhancementColor("Navi Idle Outer", "gNavi_Idle_Outer_", navi_idle_o_col, ImVec4(0, 0, 255, 255), false);
- Tooltip("Outer color for Navi (idle flying around)");
- ImGui::Separator();
- EnhancementColor("Navi NPC Inner", "gNavi_NPC_Inner_", navi_npc_i_col, ImVec4(150, 150, 255, 255), false);
- Tooltip("Inner color for Navi (when Navi fly around NPCs)");
- EnhancementColor("Navi NPC Outer", "gNavi_NPC_Outer_", navi_npc_o_col, ImVec4(150, 150, 255, 255), false);
- Tooltip("Outer color for Navi (when Navi fly around NPCs)");
- ImGui::Separator();
- EnhancementColor("Navi Enemy Inner", "gNavi_Enemy_Inner_", navi_enemy_i_col, ImVec4(255, 255, 0, 255), false);
- Tooltip("Inner color for Navi (when Navi fly around Enemies or Bosses)");
- EnhancementColor("Navi Enemy Outer", "gNavi_Enemy_Outer_", navi_enemy_o_col, ImVec4(220, 155, 0, 255), false);
- Tooltip("Outer color for Navi (when Navi fly around Enemies or Bosses)");
- ImGui::Separator();
- EnhancementColor("Navi Prop Inner", "gNavi_Prop_Inner_", navi_prop_i_col, ImVec4(0, 255, 0, 255), false);
- Tooltip("Inner color for Navi (when Navi fly around props (signs etc))");
- EnhancementColor("Navi Prop Outer", "gNavi_Prop_Outer_", navi_prop_o_col, ImVec4(0, 255, 0, 255), false);
- Tooltip("Outer color for Navi (when Navi fly around props (signs etc))");
- ImGui::EndTabItem();
- }
- if (ImGui::BeginTabItem("Tunics")) {
- EnhancementCheckbox("Custom colors on tunics", "gUseTunicsCol");
- Tooltip("Enable/Disable custom Link's tunics colors. \nIf disabled you will have original colors for Link's tunics.");
- EnhancementColor("Kokiri Tunic", "gTunic_Kokiri_", kokiri_col, ImVec4(30, 105, 27, 255));
- ImGui::Separator();
- EnhancementColor("Goron Tunic", "gTunic_Goron_", goron_col, ImVec4(100, 20, 0, 255));
- ImGui::Separator();
- EnhancementColor("Zora Tunic", "gTunic_Zora_", zora_col, ImVec4(0, 60, 100, 255));
- ImGui::EndTabItem();
- }
- ImGui::EndTabBar();
- }
- ImGui::End();
- }
- if (Interface_isOpen) {
- if (!Interface_isOpen) {
- CVar_SetS32("gColorsEditor", 0);
- return;
- }
- ImGui::SetNextWindowSize(ImVec2(215, 627), ImGuiCond_FirstUseEver);
- ImGui::Begin("Interface Editor", nullptr, ImGuiWindowFlags_NoFocusOnAppearing);
- if (ImGui::BeginTabBar("Interface Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
- if (ImGui::BeginTabItem("HUD")) {
- if (ImGui::BeginTable("tableInterfaceEditor", 3, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
- ImGui::TableSetupColumn("Hearts", ImGuiTableColumnFlags_WidthStretch, 200.0f);
- ImGui::TableSetupColumn("Magic Bar", ImGuiTableColumnFlags_WidthStretch, 200.0f);
- ImGui::TableSetupColumn("Buttons", ImGuiTableColumnFlags_WidthStretch, 200.0f);
- ImGui::TableHeadersRow();
- ImGui::TableNextRow();
- ImGui::TableNextColumn();
- // COLUMN 1.1 - HEARTS
- ImGui::PushItemWidth(-FLT_MIN);
- EnhancementColor("Hearts inner", "gCCHeartsPrim", hearts_colors, ImVec4(255, 70, 50, 255));
- Tooltip("Hearts inner color (red in original)\nAffect both Normal Hearts and the ones in Double Defense");
- ImGui::Separator();
- EnhancementColor("Hearts double def", "gDDCCHeartsPrim", hearts_dd_colors, ImVec4(255, 255, 255, 255));
- Tooltip("Hearts outline color (white in original)\nAffect Double Defense outline only.");
- ImGui::PopItemWidth();
- ImGui::Separator();
- if (ImGui::BeginTable("tableMisc", 1, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
- ImGui::TableSetupColumn("Misc", ImGuiTableColumnFlags_WidthStretch, 600.0f);
- ImGui::TableHeadersRow();
- ImGui::TableNextRow();
- ImGui::TableNextColumn();
- // COLUMN 1.2 - MISC
- ImGui::PushItemWidth(-FLT_MIN);
- EnhancementColor("Minimap color", "gCCMinimapPrim", minimap_colors, ImVec4(0, 255, 255, 255));
- Tooltip("Affect the Dungeon and Overworld minimaps.");
- ImGui::Separator();
- EnhancementColor("Rupee icon color", "gCCRupeePrim", rupee_colors, ImVec4(120, 120, 120, 255));
- Tooltip("Affect the Rupee icon on interface\nGreen by default.");
- ImGui::Separator();
- EnhancementColor("Small Keys icon color", "gCCKeysPrim", smolekey_colors, ImVec4(200, 230, 255, 255));
- Tooltip("Affect the Small keys icon on interface\nGray by default.");
- ImGui::PopItemWidth();
- ImGui::EndTable();
- }
- ImGui::TableNextColumn();
- // COLUMN 2 - MAGIC BAR
- ImGui::PushItemWidth(-FLT_MIN);
- EnhancementColor("Magic bar borders", "gCCMagicBorderPrim", magic_border_colors, ImVec4(255, 255, 255, 255));
- Tooltip("Affect the border of the magic bar when being used\nWhite flash in original game.");
- ImGui::Separator();
- EnhancementColor("Magic bar main color", "gCCMagicPrim", magic_remaining_colors, ImVec4(0, 200, 0, 255));
- Tooltip("Affect the magic bar color\nGreen in original game.");
- ImGui::Separator();
- EnhancementColor("Magic bar being used", "gCCMagicUsePrim", magic_use_colors, ImVec4(250, 250, 0, 255));
- Tooltip("Affect the magic bar when being used\nYellow in original game.");
- ImGui::Separator();
- ImGui::PopItemWidth();
- ImGui::TableNextColumn();
- // COLUMN 3 - BUTTON
- ImGui::PushItemWidth(-FLT_MIN);
- EnhancementColor("A Buttons", "gCCABtnPrim", a_btn_colors, ImVec4(90, 90, 255, 255));
- Tooltip("A Buttons colors (Green in original GameCube)\nAffect A buttons colors on interface, in shops, messages boxes, ocarina notes and inventory cursors.");
- ImGui::Separator();
- EnhancementColor("B Buttons", "gCCBBtnPrim", b_btn_colors, ImVec4(0, 150, 0, 255));
- Tooltip("B Button colors (Red in original GameCube)\nAffect B button colors on interface");
- ImGui::Separator();
- EnhancementColor("C Buttons", "gCCCBtnPrim", c_btn_colors, ImVec4(255, 160, 0, 255));
- Tooltip("C Buttons colors (Yellowish / Oranges in originals)\nAffect C buttons colors on interface, in inventory and ocarina notes");
- ImGui::Separator();
- EnhancementColor("Start Buttons", "gCCStartBtnPrim", start_btn_colors, ImVec4(120, 120, 120, 255));
- Tooltip("Start Button colors (gray in GameCube)\nAffect Start button colors in inventory");
- ImGui::Separator();
- ImGui::PopItemWidth();
- ImGui::EndTable();
- ImGui::EndTabItem();
- }
- }
-
- if (ImGui::BeginTabItem("File Choose")) {
- EnhancementColor("File Choose color", "gCCFileChoosePrim", fileselect_colors, ImVec4(100, 150, 255, 255));
- Tooltip("Affect the File Select.");
- ImGui::Separator();
- EnhancementColor("Bottom text color", "gCCFileChooseTextPrim", fileselect_text_colors, ImVec4(0, 100, 255, 255));
- Tooltip("Affect the File Select.");
- ImGui::EndTabItem();
- }
- ImGui::EndTabBar();
- }
- ImGui::End();
- }
-
for (const auto& category : windowCategories) {
if (ImGui::BeginMenu(category.first.c_str())) {
for (const std::string& name : category.second) {
diff --git a/soh/include/z64.h b/soh/include/z64.h
index c7978aa6e..5057def3d 100644
--- a/soh/include/z64.h
+++ b/soh/include/z64.h
@@ -257,9 +257,11 @@ typedef struct {
/* 0x0A */ u8 durationTimer; // how long the title card appears for before fading
/* 0x0B */ u8 delayTimer; // how long the title card waits to appear
/* 0x0C */ s16 alpha;
- /* 0x0E */ s16 intensity;
- /* ---- */ s16 isBossCard; //To detect if that a Boss name title card.
- /* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only)
+ /* ---- */ s16 intensityR; //Splited intensity per channel to support precise recolor
+ /* ---- */ s16 intensityG;
+ /* ---- */ s16 intensityB;
+ /* ---- */ s16 isBossCard; //To detect if that a Boss name title card.
+ /* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only)
} TitleCardContext; // size = 0x10
typedef struct {
diff --git a/soh/soh.vcxproj b/soh/soh.vcxproj
index caedb3437..b7a2a32de 100644
--- a/soh/soh.vcxproj
+++ b/soh/soh.vcxproj
@@ -179,6 +179,7 @@
+
@@ -887,6 +888,7 @@
+
diff --git a/soh/soh.vcxproj.filters b/soh/soh.vcxproj.filters
index 9834248ac..08d6f332f 100644
--- a/soh/soh.vcxproj.filters
+++ b/soh/soh.vcxproj.filters
@@ -2208,6 +2208,9 @@
Source Files\soh
+
+ Header Files\include
+
@@ -3782,6 +3785,9 @@
Source Files\soh
+
+ Header Files\include
+
diff --git a/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
new file mode 100644
index 000000000..3448d25f3
--- /dev/null
+++ b/soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp
@@ -0,0 +1,1036 @@
+#include "CosmeticsEditor.h"
+#include "../../util.h"
+#include "../libultraship/ImGuiImpl.h"
+
+#include
+#include
+#include