Add GUI toggle for Ganon blood color

This commit is contained in:
Vague Rant 2022-05-24 16:48:03 +10:00
commit a4e65d0f82
5 changed files with 28 additions and 21 deletions

View file

@ -65,7 +65,7 @@ namespace SohImGui {
bool needs_save = false; bool needs_save = false;
std::vector<const char*> CustomTexts; std::vector<const char*> CustomTexts;
int SelectedLanguage = CVar_GetS32("gLanguages", 0); //Default Language to 0=English 1=German 2=French int SelectedLanguage = CVar_GetS32("gLanguages", 0); //Default Language to 0=English 1=German 2=French
int SelectedHUD = CVar_GetS32("gHudColors", 1); //Default colors to Gamecube. int SelectedHUD = CVar_GetS32("gHudColors", 1); //Default colors to GameCube.
float hearts_colors[3] = {0,0,0}; float hearts_colors[3] = {0,0,0};
float hearts_dd_colors[3] = {0,0,0}; float hearts_dd_colors[3] = {0,0,0};
float a_btn_colors[3] = {0,0,0}; float a_btn_colors[3] = {0,0,0};
@ -772,10 +772,12 @@ namespace SohImGui {
EnhancementCheckbox("HUD Margins editor", "gUseMargins"); EnhancementCheckbox("HUD Margins editor", "gUseMargins");
EnhancementRadioButton("N64 interface", "gHudColors", 0); EnhancementRadioButton("N64 interface", "gHudColors", 0);
Tooltip("Change interface color to N64 style."); Tooltip("Change interface color to N64 style.");
EnhancementRadioButton("Gamecube interface", "gHudColors", 1); EnhancementRadioButton("GameCube interface", "gHudColors", 1);
Tooltip("Change interface color to Gamecube style."); Tooltip("Change interface color to GameCube style.");
EnhancementRadioButton("Custom interface", "gHudColors", 2); EnhancementRadioButton("Custom interface", "gHudColors", 2);
Tooltip("Change interface color to your own made style."); Tooltip("Change interface color to your own made style.");
EnhancementCheckbox("Red Ganon blood", "gRedGanonBlood");
Tooltip("Restore the original red blood from NTSC 1.0/1.1. Disable for green blood.");
if (CVar_GetS32("gHudColors", 1) == 2) { if (CVar_GetS32("gHudColors", 1) == 2) {
EnhancementCheckbox("Interface editor", "gColorsEditor"); EnhancementCheckbox("Interface editor", "gColorsEditor");
Tooltip("Edit the colors used for your own interface"); Tooltip("Edit the colors used for your own interface");
@ -919,13 +921,13 @@ namespace SohImGui {
} }
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);
Tooltip("C Buttons colors (Yellowish / Oranges in originals)\nAffect C buttons colors on interface, in inventory and ocarina notes"); Tooltip("C Buttons colors (Yellowish / Oranges in originals)\nAffect C buttons colors on interface, in inventory and ocarina notes");
EnhancementColor3("Start Buttons", "gCCStartBtnPrim", start_btn_colors, false); EnhancementColor3("Start Buttons", "gCCStartBtnPrim", start_btn_colors, false);
Tooltip("Start Button colors (gray in Gamecube)\nAffect Start button colors in inventory"); Tooltip("Start Button colors (gray in GameCube)\nAffect Start button colors in inventory");
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Magic Bar")) { if (ImGui::BeginTabItem("Magic Bar")) {

View file

@ -25,6 +25,7 @@ void BootCommands_Init()
CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gDebugEnabled", 0);
CVar_RegisterS32("gPauseLiveLink", 0); CVar_RegisterS32("gPauseLiveLink", 0);
CVar_RegisterS32("gMinimalUI", 0); CVar_RegisterS32("gMinimalUI", 0);
CVar_RegisterS32("gRedGanonBlood", 0);
CVar_RegisterS32("gRumbleEnabled", 0); CVar_RegisterS32("gRumbleEnabled", 0);
CVar_RegisterS32("gUniformLR", 1); CVar_RegisterS32("gUniformLR", 1);
CVar_RegisterS32("gTwoHandedIdle", 0); CVar_RegisterS32("gTwoHandedIdle", 0);

View file

@ -1209,19 +1209,15 @@ void BossGanon_ShatterWindows(u8 windowShatterState) {
} }
void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) { void BossGanon_DeathAndTowerCutscene(BossGanon* this, GlobalContext* globalCtx) {
const bool originalBlood = CVar_GetS32("gOriginalBlood", 1); static Color_RGBA8 bloodPrimColor = { 0, 120, 0, 255 };
static Color_RGBA8 bloodEnvColor = { 0, 120, 0, 255 };
static Color_RGBA8 bloodPrimColor = { 120, 0, 0, 255 }; if(CVar_GetS32("gRedGanonBlood", 0) == 1) {
static Color_RGBA8 bloodEnvColor = { 120, 0, 0, 255 }; bloodPrimColor.r = 120;
bloodPrimColor.g = 0;
if(!originalBlood) { bloodEnvColor.r = 120;
bloodPrimColor.r = 0; bloodEnvColor.g = 0;
bloodPrimColor.g = 120;
bloodPrimColor.b = 0;
bloodEnvColor.r = 0;
bloodEnvColor.g = 120;
bloodEnvColor.b = 0;
} }
s16 i; s16 i;

View file

@ -1454,8 +1454,20 @@ void func_80901020(BossGanon2* this, GlobalContext* globalCtx) {
} }
void func_8090109C(BossGanon2* this, GlobalContext* globalCtx) { void func_8090109C(BossGanon2* this, GlobalContext* globalCtx) {
u8 i; u8 i;
static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
if(CVar_GetS32("gRedGanonBlood", 0) == 1) {
sPrimColor.r = 120;
sPrimColor.g = 0;
sEnvColor.r = 120;
sEnvColor.g = 0;
}
for (i = 0; i < 70; i++) { for (i = 0; i < 70; i++) {
Vec3f velocity; Vec3f velocity;
Vec3f accel; Vec3f accel;

View file

@ -238,10 +238,6 @@ static ColliderJntSphInit sJntSphInit2 = {
sJntSphItemsInit2, sJntSphItemsInit2,
}; };
static Color_RGBA8 sPrimColor = { 0, 120, 0, 255 };
static Color_RGBA8 sEnvColor = { 0, 120, 0, 255 };
static Vec3f D_8090702C[] = { static Vec3f D_8090702C[] = {
{ 10.0f, -10.0f, 0.0f }, { 10.0f, -10.0f, 0.0f },
{ 0.0f, 0.0f, -60.0f }, { 0.0f, 0.0f, -60.0f },