From f8ab8547a4abf9e3abde79d5a46f5ede1cb2c1c1 Mon Sep 17 00:00:00 2001 From: Nessy Date: Fri, 17 Apr 2026 22:31:54 +0100 Subject: [PATCH 1/3] Add cosmetic option for Ganon/dorf's blood colour --- code/oot.ld | 2 ++ code/src/effects.c | 7 +++++++ code/src/effects.h | 1 + code/src/main.c | 2 ++ shared/s_settings.h | 8 ++++++++ source/settings.cpp | 18 ++++++++++++++++++ 6 files changed, 38 insertions(+) diff --git a/code/oot.ld b/code/oot.ld index 4b93838b..07a4c262 100644 --- a/code/oot.ld +++ b/code/oot.ld @@ -851,6 +851,8 @@ SECTIONS gRandFloat = 0x50C0C8 + _LD_OFF; NaviColorsArray = 0x50C998 + _LD_OFF; gActorOverlayTable = 0x50CD84 + _LD_OFF; + gGanondorfBlood = 0x514F78 + _LD_OFF; + gGanonBlood = 0x515194 + _LD_OFF; EnChanger_LoserGetItemIds = 0x521774 + _LD_OFF; VanillaScrubTable = 0x522384 + _LD_OFF; EnGirlA_ShopItemEntries = 0x524F50 + _LD_OFF; diff --git a/code/src/effects.c b/code/src/effects.c index 6d73c50a..fa239120 100644 --- a/code/src/effects.c +++ b/code/src/effects.c @@ -3,6 +3,13 @@ #include "colors.h" #include "objects.h" +void initGanonBloodColors(void) { + typedef struct { Color_RGBA8 primary; Color_RGBA8 environ; } BloodCol; + extern BloodCol gGanondorfBlood, gGanonBlood; + Color_RGBA8 col = gSettingsContext.ganonBloodColor; + gGanondorfBlood = gGanonBlood = (BloodCol){ col, col }; +} + // This function is called when a new effect element tries to spawn but there's no space left. // The vanilla game simply fails to spawn the new element, but with the randomizer extended duration setting, // it is best to clear the oldest element to make space instead. diff --git a/code/src/effects.h b/code/src/effects.h index 8832b29d..e824514d 100644 --- a/code/src/effects.h +++ b/code/src/effects.h @@ -3,6 +3,7 @@ #include "z3D/z3D.h" +void initGanonBloodColors(void); void EffectSs_ClearAllWithMissingObject(void); #endif //_EFFECTS_H_ diff --git a/code/src/main.c b/code/src/main.c index 02657a6b..bdf17279 100644 --- a/code/src/main.c +++ b/code/src/main.c @@ -3,6 +3,7 @@ #include "actor.h" #include "input.h" #include "models.h" +#include "effects.h" #include "entrance.h" #include "settings.h" #include "title_screen.h" @@ -39,6 +40,7 @@ void Randomizer_Init() { IceTrap_Init(); extDataInit(); irrstInit(); + initGanonBloodColors(); s64 output = 0; svcGetSystemInfo(&output, 0x20000, 0); diff --git a/shared/s_settings.h b/shared/s_settings.h index b9595944..d4993608 100644 --- a/shared/s_settings.h +++ b/shared/s_settings.h @@ -490,6 +490,13 @@ typedef enum TrailDuration { TRAILDURATION_LIGHTSABER, } TrailDuration; +typedef enum BloodColor { + BLOODCOLOR_VANILLA, + BLOODCOLOR_ORIGINAL, + BLOODCOLOR_RANDOM, + BLOODCOLOR_CUSTOM, +} BloodColor; + typedef enum MirrorWorld { MIRRORWORLD_OFF, MIRRORWORLD_ON, @@ -713,6 +720,7 @@ typedef struct SettingsContext { u8 rainbowChuTrailInnerColor; u8 rainbowChuTrailOuterColor; u8 bombchuTrailDuration; + Color_RGBA8 ganonBloodColor; u8 coloredKeys; u8 coloredBossKeys; diff --git a/source/settings.cpp b/source/settings.cpp index 57d402a1..08608656 100644 --- a/source/settings.cpp +++ b/source/settings.cpp @@ -1268,6 +1268,7 @@ Option BoomerangTrailDuration = Option::U8 (2, "Boomerang (Duration)", tra Option BombchuTrailInnerColor = Option::U8 (2, "Bombchu (Inner Color)", weaponTrailInnerOptionNames, {RANDOM_CHOICE_DESC, RANDOM_COLOR_DESC, CUSTOM_COLOR_DESC, "Select the color for the center of the\nbombchu trail."}, OptionCategory::Cosmetic, 5); // Red Option BombchuTrailOuterColor = Option::U8 (2, "Bombchu (Outer Color)", weaponTrailOuterOptionNames, {RANDOM_CHOICE_DESC, RANDOM_COLOR_DESC, CUSTOM_COLOR_DESC, "Select the color for the sides of the\nbombchu trail."}, OptionCategory::Cosmetic, SAME_AS_INNER_TRAIL); Option BombchuTrailDuration = Option::U8 (2, "Bombchu (Duration)", chuTrailDurationOptionNames, {"Select the duration for bombchu trails."}, OptionCategory::Cosmetic, 2); // Vanilla +Option GanonBloodColor = Option::U8 ("Ganon/dorf Blood Color", {"Vanilla Green", "Original Red", std::string(RANDOM_COLOR_STR), std::string(CUSTOM_COLOR_STR),}, {"Select the color of Ganondorf and Ganon's blood."}, OptionCategory::Cosmetic); std::string finalChildTunicColor = ChildTunicColor.GetSelectedOptionText(); std::string finalKokiriTunicColor = KokiriTunicColor.GetSelectedOptionText(); std::string finalGoronTunicColor = GoronTunicColor.GetSelectedOptionText(); @@ -1288,6 +1289,7 @@ Color_RGBA8 finalBoomerangColor = {0}; u8 boomerangTrailColorMode = 0; std::string finalChuTrailInnerColor = BombchuTrailInnerColor.GetSelectedOptionText(); std::string finalChuTrailOuterColor = BombchuTrailOuterColor.GetSelectedOptionText(); +Color_RGBA8 finalGanonBloodColor = { 0, 120, 0, 255 }; Option ColoredKeys = Option::Bool("Colored Small Keys", {"Off", "On"}, {coloredKeysDesc}, OptionCategory::Cosmetic); Option ColoredBossKeys = Option::Bool("Colored Boss Keys", {"Off", "On"}, {coloredBossKeysDesc}, OptionCategory::Cosmetic); @@ -1322,6 +1324,7 @@ std::vector