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..931eff9f 100644 --- a/code/src/effects.c +++ b/code/src/effects.c @@ -3,6 +3,17 @@ #include "colors.h" #include "objects.h" +void Effects_Init(void) { + // Blood effect color for Ganondorf and Ganon defeat cutscenes + 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..6164a68c 100644 --- a/code/src/effects.h +++ b/code/src/effects.h @@ -3,6 +3,7 @@ #include "z3D/z3D.h" +void Effects_Init(void); void EffectSs_ClearAllWithMissingObject(void); #endif //_EFFECTS_H_ diff --git a/code/src/main.c b/code/src/main.c index 02657a6b..65573466 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(); + Effects_Init(); s64 output = 0; svcGetSystemInfo(&output, 0x20000, 0); diff --git a/shared/s_settings.h b/shared/s_settings.h index b9595944..0ed6a78f 100644 --- a/shared/s_settings.h +++ b/shared/s_settings.h @@ -713,6 +713,7 @@ typedef struct SettingsContext { u8 rainbowChuTrailInnerColor; u8 rainbowChuTrailOuterColor; u8 bombchuTrailDuration; + Color_RGBA8 ganonBloodColor; u8 coloredKeys; u8 coloredBossKeys; diff --git a/source/cosmetics.cpp b/source/cosmetics.cpp index 631e00c0..a040bf23 100644 --- a/source/cosmetics.cpp +++ b/source/cosmetics.cpp @@ -144,6 +144,22 @@ const std::array weaponTrailColors = { "FF69B4", // Pink "FF0000", // Rainbow (starts at red) }; +const std::array ganonBloodColors = { + "007800", // Vanilla Green + "780000", // Original Red + "FFFFFF", // White + "000000", // Black + "FF0000", // Red + "00FF00", // Green + "0000FF", // Blue + "FFFF00", // Yellow + "00FFFF", // Cyan + "FF00FF", // Magenta + "FFA500", // Orange + "FFD700", // Gold + "800080", // Purple + "FF69B4", // Pink +}; // Generate random hex color std::string RandomColor() { diff --git a/source/cosmetics.hpp b/source/cosmetics.hpp index 4a73d991..4b0dc6b3 100644 --- a/source/cosmetics.hpp +++ b/source/cosmetics.hpp @@ -28,6 +28,7 @@ extern const std::array tunicColors; extern const std::array naviInnerColors; extern const std::array naviOuterColors; extern const std::array weaponTrailColors; +extern const std::array ganonBloodColors; bool ValidHexString(std::string_view hexStr); Color_RGBAf HexStrToColorRGBAf(const std::string& hexStr); diff --git a/source/settings.cpp b/source/settings.cpp index 57d402a1..a753e8c4 100644 --- a/source/settings.cpp +++ b/source/settings.cpp @@ -1235,6 +1235,26 @@ static std::vector chuTrailDurationOptionNames = { "Hero's Path", }; +static std::vector ganonBloodOptionNames = { + std::string(RANDOM_CHOICE_STR), + std::string(RANDOM_COLOR_STR), + std::string(CUSTOM_COLOR_STR), + "Vanilla Green", + "Original Red", + "White", + "Black", + "Red", + "Green", + "Blue", + "Yellow", + "Cyan", + "Magenta", + "Orange", + "Gold", + "Purple", + "Pink", +}; + static std::vector cosmeticDescriptions = { RANDOM_CHOICE_DESC, RANDOM_COLOR_DESC, @@ -1268,6 +1288,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", ganonBloodOptionNames, {RANDOM_CHOICE_DESC, RANDOM_COLOR_DESC, CUSTOM_COLOR_DESC, "Select the color of Ganondorf and Ganon's blood."}, OptionCategory::Cosmetic, 3); // Vanilla Green std::string finalChildTunicColor = ChildTunicColor.GetSelectedOptionText(); std::string finalKokiriTunicColor = KokiriTunicColor.GetSelectedOptionText(); std::string finalGoronTunicColor = GoronTunicColor.GetSelectedOptionText(); @@ -1288,6 +1309,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 +1344,7 @@ std::vector