Merge branch 'develop' into hud_color_mod

This commit is contained in:
Baoulettes 2022-05-14 21:12:40 +02:00 committed by GitHub
commit 05576f1559
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 16 deletions

View file

@ -553,11 +553,12 @@ namespace SohImGui {
} }
void DrawMainMenuAndCalculateGameSize() { void DrawMainMenuAndCalculateGameSize() {
console->Update(); console->Update();
ImGuiBackendNewFrame(); ImGuiBackendNewFrame();
ImGuiWMNewFrame(); ImGuiWMNewFrame();
ImGui::NewFrame(); ImGui::NewFrame();
LoadInterfaceEditor(); LoadInterfaceEditor();
const std::shared_ptr<Window> wnd = GlobalCtx2::GetInstance()->GetWindow(); const std::shared_ptr<Window> wnd = GlobalCtx2::GetInstance()->GetWindow();
ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoBackground |
@ -651,15 +652,17 @@ namespace SohImGui {
} }
EnhancementCheckbox("Show Inputs", "gInputEnabled"); EnhancementCheckbox("Show Inputs", "gInputEnabled");
Tooltip("Shows currently pressed inputs on the bottom right of the screen");
EnhancementCheckbox("Rumble Enabled", "gRumbleEnabled"); EnhancementCheckbox("Rumble Enabled", "gRumbleEnabled");
EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false); EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false);
Tooltip("Sets the on screen size of the displayed inputs from Show Inputs");
ImGui::Separator(); ImGui::Separator();
EnhancementCheckbox("Dpad Support on Pause and File Select", "gDpadPauseName"); EnhancementCheckbox("D-pad Support on Pause and File Select", "gDpadPauseName");
EnhancementCheckbox("DPad Support in Ocarina and Text Choice", "gDpadOcarinaText"); EnhancementCheckbox("D-pad Support in Ocarina and Text Choice", "gDpadOcarinaText");
EnhancementCheckbox("DPad Support for Browsing Shop Items", "gDpadShop"); EnhancementCheckbox("D-pad Support for Browsing Shop Items", "gDpadShop");
ImGui::EndMenu(); ImGui::EndMenu();
} }
@ -667,8 +670,10 @@ namespace SohImGui {
if (ImGui::BeginMenu("Graphics")) if (ImGui::BeginMenu("Graphics"))
{ {
EnhancementSliderInt("Internal Resolution: %dx", "##IMul", "gInternalResolution", 1, 8, ""); EnhancementSliderInt("Internal Resolution: %dx", "##IMul", "gInternalResolution", 1, 8, "");
Tooltip("Increases the render resolution of the game, up to 8x your output resolution,\nas a more intensive but effective form of anti-aliasing");
gfx_current_dimensions.internal_mul = CVar_GetS32("gInternalResolution", 1); gfx_current_dimensions.internal_mul = CVar_GetS32("gInternalResolution", 1);
EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, ""); EnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "");
Tooltip("Activates anti-aliasing when above 1, up to 8x for 8 samples for every pixel");
gfx_msaa_level = CVar_GetS32("gMSAAValue", 1); gfx_msaa_level = CVar_GetS32("gMSAAValue", 1);
EXPERIMENTAL(); EXPERIMENTAL();
@ -707,30 +712,42 @@ namespace SohImGui {
EnhancementSliderInt("King Zora Speed: %dx", "##WEEPSPEED", "gMweepSpeed", 1, 5, ""); EnhancementSliderInt("King Zora Speed: %dx", "##WEEPSPEED", "gMweepSpeed", 1, 5, "");
EnhancementCheckbox("Skip Text", "gSkipText"); EnhancementCheckbox("Skip Text", "gSkipText");
Tooltip("Holding down B skips text");
EnhancementCheckbox("Minimal UI", "gMinimalUI"); EnhancementCheckbox("Minimal UI", "gMinimalUI");
Tooltip("Hides most of the UI when not needed");
EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood"); EnhancementCheckbox("MM Bunny Hood", "gMMBunnyHood");
Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask");
EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony"); EnhancementCheckbox("Visual Stone of Agony", "gVisualAgony");
Tooltip("Displays an icon and plays a sound when Stone of Agony should be activated, for those without rumble");
ImGui::Text("Graphics"); ImGui::Text("Graphics");
ImGui::Separator(); ImGui::Separator();
EnhancementCheckbox("N64 Mode", "gN64Mode"); EnhancementCheckbox("N64 Mode", "gN64Mode");
Tooltip("Sets aspect ratio to 4:3 and lowers resolution to 240p, the N64's native resolution");
EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink"); EnhancementCheckbox("Animated Link in Pause Menu", "gPauseLiveLink");
EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops"); EnhancementCheckbox("Enable 3D Dropped items", "gNewDrops");
EnhancementCheckbox("Faster Block Push", "gFasterBlockPush"); EnhancementCheckbox("Faster Block Push", "gFasterBlockPush");
EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon"); EnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon");
Tooltip("Changes the rupee in the wallet icon to match the wallet size you currently have");
EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon"); EnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon");
Tooltip("Always shows dungeon entrance icons on the minimap");
ImGui::Text("Fixes"); ImGui::Text("Fixes");
ImGui::Separator(); ImGui::Separator();
EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR"); EnhancementCheckbox("Fix L&R Pause menu", "gUniformLR");
Tooltip("Makes the L and R buttons in the pause menu the same color");
EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon"); EnhancementCheckbox("Fix Dungeon entrances", "gFixDungeonMinimapIcon");
Tooltip("Show dungeon entrances icon only when it should be");
EnhancementCheckbox("Fix Two Handed idle animations", "gTwoHandedIdle");
Tooltip("Makes two handed idle animation play, a seemingly finished animation that was disabled on accident in the original game");
EXPERIMENTAL(); EXPERIMENTAL();
EnhancementCheckbox("60 fps interpolation", "g60FPS"); EnhancementCheckbox("60 fps interpolation", "g60FPS");
EnhancementCheckbox("Disable LOD", "gDisableLOD"); EnhancementCheckbox("Disable LOD", "gDisableLOD");
Tooltip("Turns off the level of detail setting, making models always use their higher poly variants");
ImGui::EndMenu(); ImGui::EndMenu();
} }
@ -765,12 +782,19 @@ namespace SohImGui {
} }
EnhancementCheckbox("No Clip", "gNoClip"); EnhancementCheckbox("No Clip", "gNoClip");
Tooltip("Allows you to walk through walls");
EnhancementCheckbox("Climb Everything", "gClimbEverything"); EnhancementCheckbox("Climb Everything", "gClimbEverything");
Tooltip("Makes every surface in the game climbable");
EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL"); EnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL");
Tooltip("Holding L makes you float into the air");
EnhancementCheckbox("Super Tunic", "gSuperTunic"); EnhancementCheckbox("Super Tunic", "gSuperTunic");
Tooltip("Makes every tunic have the effects of every other tunic");
EnhancementCheckbox("Easy ISG", "gEzISG"); EnhancementCheckbox("Easy ISG", "gEzISG");
Tooltip("Automatically activates the Infinite Sword glitch, making you constantly swing your sword");
EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems"); EnhancementCheckbox("Unrestricted Items", "gNoRestrictItems");
Tooltip("Allows you to use all items at any age");
EnhancementCheckbox("Freeze Time", "gFreezeTime"); EnhancementCheckbox("Freeze Time", "gFreezeTime");
Tooltip("Freezes the time of day");
ImGui::EndMenu(); ImGui::EndMenu();
} }
@ -778,9 +802,12 @@ namespace SohImGui {
if (ImGui::BeginMenu("Developer Tools")) if (ImGui::BeginMenu("Developer Tools"))
{ {
EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled"); EnhancementCheckbox("OoT Debug Mode", "gDebugEnabled");
Tooltip("Enables Debug Mode, allowing you to select maps with L + R + Z, noclip with L + D-pad Right,\nand open the debug menu with L on the pause screen");
ImGui::Separator(); ImGui::Separator();
EnhancementCheckbox("Stats", "gStatsEnabled"); EnhancementCheckbox("Stats", "gStatsEnabled");
Tooltip("Shows the stats window, with your FPS and frametimes, and the OS you're playing on");
EnhancementCheckbox("Console", "gConsoleEnabled"); EnhancementCheckbox("Console", "gConsoleEnabled");
Tooltip("Enables the console window, allowing you to input commands, type help for some examples");
console->opened = CVar_GetS32("gConsoleEnabled", 0); console->opened = CVar_GetS32("gConsoleEnabled", 0);
ImGui::EndMenu(); ImGui::EndMenu();
@ -799,7 +826,7 @@ namespace SohImGui {
if (ImGui::BeginTabBar("Margins Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { if (ImGui::BeginTabBar("Margins Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
if (ImGui::BeginTabItem("Interface margins")) { if (ImGui::BeginTabItem("Interface margins")) {
EnhancementCheckbox("Use margins", "gHUDMargins"); EnhancementCheckbox("Use margins", "gHUDMargins");
Tooltip("Enable/Disable custom margins. \nIf disabled you will have original margins."); Tooltip("Enable/Disable custom margins. \nIf disabled you will have original margins");
EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", -20, 20, ""); EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", -20, 20, "");
EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, 25, ""); EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, 25, "");
EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", -25, 25, ""); EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", -25, 25, "");
@ -820,7 +847,7 @@ namespace SohImGui {
if (ImGui::BeginTabBar("Cosmetics Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) { if (ImGui::BeginTabBar("Cosmetics Editor", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
if (ImGui::BeginTabItem("Navi")) { if (ImGui::BeginTabItem("Navi")) {
EnhancementCheckbox("Custom colors for Navi", "gUseNaviCol"); 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."); 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");
EnhancementColor3("Navi Idle Inner", "gNavi_Idle_Inner_", navi_idle_i_col, false); EnhancementColor3("Navi Idle Inner", "gNavi_Idle_Inner_", navi_idle_i_col, false);
Tooltip("Inner color for Navi (idle flying around)"); Tooltip("Inner color for Navi (idle flying around)");
EnhancementColor3("Navi Idle Outer", "gNavi_Idle_Outer_", navi_idle_o_col, false); EnhancementColor3("Navi Idle Outer", "gNavi_Idle_Outer_", navi_idle_o_col, false);
@ -844,7 +871,7 @@ namespace SohImGui {
} }
if (ImGui::BeginTabItem("Tunics")) { if (ImGui::BeginTabItem("Tunics")) {
EnhancementCheckbox("Custom colors on tunics", "gUseTunicsCol"); 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."); Tooltip("Enable/Disable custom Link's tunics colors. \nIf disabled you will have original colors for Link's tunics");
EnhancementColor3("Kokiri Tunic", "gTunic_Kokiri_", kokiri_col, false); EnhancementColor3("Kokiri Tunic", "gTunic_Kokiri_", kokiri_col, false);
ImGui::Separator(); ImGui::Separator();
EnhancementColor3("Goron Tunic", "gTunic_Goron_", goron_col, false); EnhancementColor3("Goron Tunic", "gTunic_Goron_", goron_col, false);
@ -868,12 +895,12 @@ namespace SohImGui {
EnhancementColor3("Hearts inner", "gCCHeartsPrim", hearts_colors, false); EnhancementColor3("Hearts inner", "gCCHeartsPrim", hearts_colors, false);
Tooltip("Hearts inner color (red in original)\nAffect both Normal Hearts and the ones in Double Defense"); Tooltip("Hearts inner color (red in original)\nAffect both Normal Hearts and the ones in Double Defense");
EnhancementColor3("Hearts double def", "gDDCCHeartsPrim", hearts_dd_colors, false); EnhancementColor3("Hearts double def", "gDDCCHeartsPrim", hearts_dd_colors, false);
Tooltip("Hearts outline color (white in original)\nAffect Double Defense outline only."); Tooltip("Hearts outline color (white in original)\nAffect Double Defense outline only");
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Buttons")) { if (ImGui::BeginTabItem("Buttons")) {
EnhancementColor3("A Buttons", "gCCABtnPrim", a_btn_colors, false); EnhancementColor3("A Buttons", "gCCABtnPrim", a_btn_colors, false);
Tooltip("A Buttons colors (Green in original Gamecube)\nAffect A buttons colors on interface, in shops, messages boxes, ocarina notes and inventory cursors."); Tooltip("A Buttons colors (Green in original Gamecube)\nAffect A buttons colors on interface, in shops, messages boxes, ocarina notes and inventory cursors");
EnhancementColor3("B Buttons", "gCCBBtnPrim", b_btn_colors, false); EnhancementColor3("B Buttons", "gCCBBtnPrim", b_btn_colors, false);
Tooltip("B Button colors (Red in original Gamecube)\nAffect B button colors on interface"); Tooltip("B Button colors (Red in original Gamecube)\nAffect B button colors on interface");
EnhancementColor3("C Buttons", "gCCCBtnPrim", c_btn_colors, false); EnhancementColor3("C Buttons", "gCCCBtnPrim", c_btn_colors, false);
@ -884,20 +911,20 @@ namespace SohImGui {
} }
if (ImGui::BeginTabItem("Magic Bar")) { if (ImGui::BeginTabItem("Magic Bar")) {
EnhancementColor3("Magic bar borders", "gCCMagicBorderPrim", magic_border_colors, false); EnhancementColor3("Magic bar borders", "gCCMagicBorderPrim", magic_border_colors, false);
Tooltip("Affect the border of the magic bar when being used\nWhite flash in original game."); Tooltip("Affect the border of the magic bar when being used\nWhite flash in original game");
EnhancementColor3("Magic bar main color", "gCCMagicPrim", magic_remaining_colors, false); EnhancementColor3("Magic bar main color", "gCCMagicPrim", magic_remaining_colors, false);
Tooltip("Affect the magic bar color\nGreen in original game."); Tooltip("Affect the magic bar color\nGreen in original game");
EnhancementColor3("Magic bar being used", "gCCMagicUsePrim", magic_use_colors, false); EnhancementColor3("Magic bar being used", "gCCMagicUsePrim", magic_use_colors, false);
Tooltip("Affect the magic bar when being used\nYellow in original game."); Tooltip("Affect the magic bar when being used\nYellow in original game");
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Misc")) { if (ImGui::BeginTabItem("Misc")) {
EnhancementColor3("Minimap color", "gCCMinimapPrim", minimap_colors, false); EnhancementColor3("Minimap color", "gCCMinimapPrim", minimap_colors, false);
Tooltip("Affect the Dungeon and Overworld minimaps."); Tooltip("Affect the Dungeon and Overworld minimaps");
EnhancementColor3("Rupee icon color", "gCCRupeePrim", rupee_colors, false); EnhancementColor3("Rupee icon color", "gCCRupeePrim", rupee_colors, false);
Tooltip("Affect the Rupee icon on interface\nGreen by default."); Tooltip("Affect the Rupee icon on interface\nGreen by default");
EnhancementColor3("Small Keys icon color", "gCCKeysPrim", smolekey_colors, false); EnhancementColor3("Small Keys icon color", "gCCKeysPrim", smolekey_colors, false);
Tooltip("Affect the Small keys icon on interface\nGray by default."); Tooltip("Affect the Small keys icon on interface\nGray by default");
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
ImGui::EndTabBar(); ImGui::EndTabBar();

View file

@ -27,6 +27,7 @@ void BootCommands_Init()
CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gMinimalUI", 0);
CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gRumbleEnabled", 0);
CVar_RegisterS32("gUniformLR", 1); CVar_RegisterS32("gUniformLR", 1);
CVar_RegisterS32("gTwoHandedIdle", 0);
CVar_RegisterS32("gNewDrops", 0); CVar_RegisterS32("gNewDrops", 0);
CVar_RegisterS32("gVisualAgony", 0); CVar_RegisterS32("gVisualAgony", 0);
CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French CVar_RegisterS32("gLanguages", 0); //0 = English / 1 = German / 2 = French

View file

@ -6981,7 +6981,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) {
if (sp34 < 4) { if (sp34 < 4) {
if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) &&
((sp34 == 3) || Player_GetSwordHeld(this)))) { ((sp34 == 3) || Player_GetSwordHeld(this)))) {
if ((sp34 == 0) && Player_HoldsTwoHandedWeapon(this)) { if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this) && CVar_GetS32("gTwoHandedIdle", 1) == 1) {
sp34 = 4; sp34 = 4;
} }
sp38 = sp34 + 9; sp38 = sp34 + 9;