|
|
|
@ -8,8 +8,6 @@
|
|
|
|
|
#include <random>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
#include <libultraship/libultra/types.h>
|
|
|
|
|
#include "soh/Enhancements/randomizer/3drando/random.hpp"
|
|
|
|
|
#include <libultraship/libultraship.h>
|
|
|
|
|
|
|
|
|
|
#include "soh/UIWidgets.hpp"
|
|
|
|
@ -17,10 +15,9 @@
|
|
|
|
|
#include "soh/ResourceManagerHelpers.h"
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
#include <z64.h>
|
|
|
|
|
#include "z64.h"
|
|
|
|
|
#include "macros.h"
|
|
|
|
|
#include "soh/cvar_prefixes.h"
|
|
|
|
|
extern PlayState* gPlayState;
|
|
|
|
|
#include "objects/object_link_boy/object_link_boy.h"
|
|
|
|
|
#include "objects/object_link_child/object_link_child.h"
|
|
|
|
|
#include "objects/object_gi_shield_3/object_gi_shield_3.h"
|
|
|
|
@ -50,9 +47,23 @@ extern PlayState* gPlayState;
|
|
|
|
|
#include "objects/object_gjyo_objects/object_gjyo_objects.h"
|
|
|
|
|
#include "textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
|
|
|
|
#include "objects/object_gi_rabit_mask/object_gi_rabit_mask.h"
|
|
|
|
|
#include "overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.h"
|
|
|
|
|
#include "overlays/ovl_Magic_Wind/ovl_Magic_Wind.h"
|
|
|
|
|
#include "textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
|
|
|
|
extern PlayState* gPlayState;
|
|
|
|
|
void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int index, Gfx instruction);
|
|
|
|
|
void ResourceMgr_PatchGfxCopyCommandByName(const char* path, const char* patchName, int destinationIndex, int sourceIndex);
|
|
|
|
|
void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName);
|
|
|
|
|
u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define PATCH_GFX(path, name, cvar, index, instruction) \
|
|
|
|
|
if (CVarGetInteger(cvar, 0)) { \
|
|
|
|
|
ResourceMgr_PatchGfxByName(path, name, index, instruction); \
|
|
|
|
|
} else { \
|
|
|
|
|
ResourceMgr_UnpatchGfxByName(path, name); \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// This is used for the greg bridge
|
|
|
|
|
#define dgEndGrayscaleAndEndDlistDL "__OTR__helpers/cosmetics/gEndGrayscaleAndEndDlistDL"
|
|
|
|
|
static const ALIGN_ASSET(2) char gEndGrayscaleAndEndDlistDL[] = dgEndGrayscaleAndEndDlistDL;
|
|
|
|
@ -74,7 +85,8 @@ std::map<CosmeticGroup, const char*> groupLabels = {
|
|
|
|
|
{ COSMETICS_GROUP_SPIN_ATTACK, "Spin Attack" },
|
|
|
|
|
{ COSMETICS_GROUP_TRAILS, "Trails" },
|
|
|
|
|
{ COSMETICS_GROUP_NAVI, "Navi" },
|
|
|
|
|
{ COSMETICS_GROUP_IVAN, "Ivan" }
|
|
|
|
|
{ COSMETICS_GROUP_IVAN, "Ivan" },
|
|
|
|
|
{ COSMETICS_GROUP_MESSAGE, "Message" },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
@ -184,11 +196,13 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
COSMETIC_OPTION("MirrorShield.Emblem", "Emblem", COSMETICS_GROUP_MIRRORSHIELD, ImVec4(205, 225, 255, 255), false, true, true),
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("Swords.KokiriBlade", "Kokiri Sword Blade", COSMETICS_GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
// COSMETIC_OPTION("Swords.KokiriHilt", "Kokiri Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4(160, 100, 15, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
COSMETIC_OPTION("Swords.MasterBlade", "Master Sword Blade", COSMETICS_GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
// COSMETIC_OPTION("Swords.MasterHilt", "Master Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
COSMETIC_OPTION("Swords.BiggoronBlade", "Biggoron Sword Blade", COSMETICS_GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
// COSMETIC_OPTION("Swords.BiggoronHilt", "Biggoron Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
/* Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
COSMETIC_OPTION("Swords.KokiriHilt", "Kokiri Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4(160, 100, 15, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Swords.MasterHilt", "Master Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Swords.BiggoronHilt", "Biggoron Sword Hilt", COSMETICS_GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true),
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("Gloves.GoronBracelet", "Goron Bracelet", COSMETICS_GROUP_GLOVES, ImVec4(255, 255, 170, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Gloves.SilverGauntlets", "Silver Gauntlets", COSMETICS_GROUP_GLOVES, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
@ -197,14 +211,18 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("Equipment.BoomerangBody", "Boomerang Body", COSMETICS_GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Equipment.BoomerangGem", "Boomerang Gem", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 50, 150, 255), false, true, true),
|
|
|
|
|
// COSMETIC_OPTION("Equipment.SlingshotBody", "Slingshot Body", COSMETICS_GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
/* Todo (Cosmetics): Broken, need a better way to grayscale
|
|
|
|
|
COSMETIC_OPTION("Equipment.SlingshotBody", "Slingshot Body", COSMETICS_GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, true),
|
|
|
|
|
*/
|
|
|
|
|
COSMETIC_OPTION("Equipment.SlingshotString", "Slingshot String", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Equipment.HammerHead", "Hammer Head", COSMETICS_GROUP_EQUIPMENT, ImVec4(155, 192, 201, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Equipment.HammerHandle", "Hammer Handle", COSMETICS_GROUP_EQUIPMENT, ImVec4(110, 60, 0, 255), false, true, true),
|
|
|
|
|
// COSMETIC_OPTION("Equipment.HookshotChain", "Hookshot Chain", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, true), // Todo (Cosmetics): Implement
|
|
|
|
|
// COSMETIC_OPTION("Equipment.HookshotTip", "Hookshot Tip", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, false), // Todo (Cosmetics): Implement
|
|
|
|
|
COSMETIC_OPTION("HookshotReticle.Target", "Hookshotable Reticle", COSMETICS_GROUP_EQUIPMENT, ImVec4( 0, 255, 0, 255), false, false, false),
|
|
|
|
|
COSMETIC_OPTION("HookshotReticle.NonTarget", "Non-Hookshotable Reticle", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 0, 0, 255), false, false, false),
|
|
|
|
|
COSMETIC_OPTION("Equipment.HookshotChain", "Hookshot Chain", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
/* Todo (Cosmetics): Implement
|
|
|
|
|
COSMETIC_OPTION("Equipment.HookshotTip", "Hookshot Tip", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
*/
|
|
|
|
|
COSMETIC_OPTION("HookshotReticle.Target", "Hookshotable Reticle", COSMETICS_GROUP_EQUIPMENT, ImVec4( 0, 255, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("HookshotReticle.NonTarget", "Non-Hookshotable Reticle", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 0, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Equipment.BowTips", "Bow Tips", COSMETICS_GROUP_EQUIPMENT, ImVec4(200, 0, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Equipment.BowString", "Bow String", COSMETICS_GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Equipment.BowBody", "Bow Body", COSMETICS_GROUP_EQUIPMENT, ImVec4(140, 90, 10, 255), false, true, false),
|
|
|
|
@ -220,8 +238,8 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
COSMETIC_OPTION("Consumable.Magic", "Magic", COSMETICS_GROUP_CONSUMABLE, ImVec4( 0, 200, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Consumable.MagicActive", "Magic Active", COSMETICS_GROUP_CONSUMABLE, ImVec4(250, 250, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable_MagicInfinite", "Infinite Magic", COSMETICS_GROUP_CONSUMABLE, ImVec4( 0, 0, 200, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.MagicBorder", "Magic Border", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 255, 255, 255), false, false, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.MagicBorderActive", "Magic Border Active", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 255, 255, 255), false, false, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.MagicBorder", "Magic Border", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.MagicBorderActive", "Magic Border Active", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.GreenRupee", "Green Rupee", COSMETICS_GROUP_CONSUMABLE, ImVec4( 50, 255, 50, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.BlueRupee", "Blue Rupee", COSMETICS_GROUP_CONSUMABLE, ImVec4( 50, 50, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Consumable.RedRupee", "Red Rupee", COSMETICS_GROUP_CONSUMABLE, ImVec4(255, 50, 50, 255), false, true, true),
|
|
|
|
@ -244,10 +262,32 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
COSMETIC_OPTION("HUD.MinimapPosition", "Minimap Position", COSMETICS_GROUP_HUD, ImVec4(200, 255, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("HUD.MinimapEntrance", "Minimap Entrance", COSMETICS_GROUP_HUD, ImVec4(200, 0, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("HUD.EnemyHealthBar", "Enemy Health Bar", COSMETICS_GROUP_HUD, ImVec4(255, 0, 0, 255), true, true, false),
|
|
|
|
|
COSMETIC_OPTION("HUD.EnemyHealthBorder", "Enemy Health Border", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, false, true),
|
|
|
|
|
COSMETIC_OPTION("HUD.EnemyHealthBorder", "Enemy Health Border", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, true, true),
|
|
|
|
|
COSMETIC_OPTION("HUD.NameTagActorText", "Nametag Text", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), true, true, false),
|
|
|
|
|
COSMETIC_OPTION("HUD.NameTagActorBackground", "Nametag Background", COSMETICS_GROUP_HUD, ImVec4(0, 0, 0, 80), true, false, true),
|
|
|
|
|
// Todo (Cosmetics): re-implement title card colors
|
|
|
|
|
COSMETIC_OPTION("HUD.NameTagActorBackground", "Nametag Background", COSMETICS_GROUP_HUD, ImVec4( 0, 0, 0, 80), true, true, true),
|
|
|
|
|
COSMETIC_OPTION("HUD.TitleCard.Map", "Map Title Card", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("HUD.TitleCard.Boss", "Boss Title Card", COSMETICS_GROUP_HUD, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
|
|
|
|
|
#define MESSAGE_COSMETIC_OPTION(id, label, r, g, b) COSMETIC_OPTION("Message." id, label, COSMETICS_GROUP_MESSAGE, ImVec4(r, g, b, 255), false, true, true)
|
|
|
|
|
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Default.Normal", "Message Default Color", 255, 255, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Default.NoneNoShadow", "Message Default (None No Shadow) Color", 0, 0, 0),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Red.Normal", "Message Red Color", 255, 60, 60),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Red.Wooden", "Message Red (Wooden) Color", 255, 120, 0),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Adjustable.Normal", "Message Adjustable Color", 70, 255, 80),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Adjustable.Wooden", "Message Adjustable (Wooden) Color", 70, 255, 80),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Blue.Normal", "Message Blue Color", 80, 90, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Blue.Wooden", "Message Blue (Wooden) Color", 80, 110, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("LightBlue.Normal", "Message Light Blue Color", 100, 180, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("LightBlue.Wooden", "Message Light Blue (Wooden) Color", 90, 180, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("LightBlue.LightBlue.NoneNoShadow", "Message Light Blue (None No Shadow) Color", 80, 150, 180),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Purple.Normal", "Message Purple Color", 255, 150, 180),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Purple.Wooden", "Message Purple (Wooden) Color", 210, 100, 255),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Yellow.Normal", "Message Yellow Color", 255, 255, 50),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Yellow.Wooden", "Message Yellow (Wooden) Color", 255, 255, 30),
|
|
|
|
|
MESSAGE_COSMETIC_OPTION("Black", "Message Black Color", 0, 0, 0),
|
|
|
|
|
|
|
|
|
|
#undef MESSAGE_COSMETIC_OPTION
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("Kaleido.ItemSelA", "Item Select Color", COSMETICS_GROUP_KALEIDO, ImVec4( 10, 50, 80, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Kaleido.ItemSelB", "Item Select Color B", COSMETICS_GROUP_KALEIDO, ImVec4( 70, 100, 130, 255), false, true, true),
|
|
|
|
@ -287,8 +327,12 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
COSMETIC_OPTION("Title.N64LogoBlue", "N64 Blue", COSMETICS_GROUP_TITLE, ImVec4( 0, 50, 150, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Title.N64LogoGreen", "N64 Green", COSMETICS_GROUP_TITLE, ImVec4( 50, 100, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Title.N64LogoYellow", "N64 Yellow", COSMETICS_GROUP_TITLE, ImVec4(200, 150, 0, 255), false, true, true),
|
|
|
|
|
// COSMETIC_OPTION("Title.FirePrimary", "Title Fire Primary", COSMETICS_GROUP_TITLE, ImVec4(255, 255, 170, 255), false, true, false), // Todo (Cosmetics): Kinda complicated
|
|
|
|
|
// COSMETIC_OPTION("Title.FireSecondary", "Title Fire Secondary", COSMETICS_GROUP_TITLE, ImVec4(255, 100, 0, 255), false, true, true), // Todo (Cosmetics): Kinda complicated
|
|
|
|
|
|
|
|
|
|
/* Todo (Cosmetics): Kinda complicated
|
|
|
|
|
COSMETIC_OPTION("Title.FirePrimary", "Title Fire Primary", COSMETICS_GROUP_TITLE, ImVec4(255, 255, 170, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Title.FireSecondary", "Title Fire Secondary", COSMETICS_GROUP_TITLE, ImVec4(255, 100, 0, 255), false, true, true),
|
|
|
|
|
*/
|
|
|
|
|
COSMETIC_OPTION("Title.Copyright", "Copyright Text", COSMETICS_GROUP_TITLE, ImVec4(255, 255, 255, 255), true, true, false),
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("Arrows.NormalPrimary", "Normal Primary", COSMETICS_GROUP_ARROWS, ImVec4( 0, 150, 0, 0), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Arrows.NormalSecondary", "Normal Secondary", COSMETICS_GROUP_ARROWS, ImVec4(255, 255, 170, 255), false, true, true),
|
|
|
|
@ -299,12 +343,12 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
COSMETIC_OPTION("Arrows.LightPrimary", "Light Primary", COSMETICS_GROUP_ARROWS, ImVec4(255, 255, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Arrows.LightSecondary", "Light Secondary", COSMETICS_GROUP_ARROWS, ImVec4(255, 255, 170, 0), false, true, true),
|
|
|
|
|
|
|
|
|
|
// COSMETIC_OPTION("Magic.DinsPrimary", "Din's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
// COSMETIC_OPTION("Magic.DinsSecondary", "Din's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
// COSMETIC_OPTION("Magic.FaroresPrimary", "Farore's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false), // Todo (Cosmetics): Implement
|
|
|
|
|
// COSMETIC_OPTION("Magic.FaroresSecondary", "Farore's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true), // Todo (Cosmetics): Implement
|
|
|
|
|
// COSMETIC_OPTION("Magic.NayrusPrimary", "Nayru's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, false),
|
|
|
|
|
// COSMETIC_OPTION("Magic.NayrusSecondary", "Nayru's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Magic.DinsPrimary", "Din's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 200, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Magic.DinsSecondary", "Din's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(255, 0, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Magic.FaroresPrimary", "Farore's Primary", COSMETICS_GROUP_MAGIC, ImVec4(255, 255, 0, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Magic.FaroresSecondary", "Farore's Secondary", COSMETICS_GROUP_MAGIC, ImVec4(100, 200, 0, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("Magic.NayrusPrimary", "Nayru's Primary", COSMETICS_GROUP_MAGIC, ImVec4(170, 255, 255, 255), false, true, false),
|
|
|
|
|
COSMETIC_OPTION("Magic.NayrusSecondary", "Nayru's Secondary", COSMETICS_GROUP_MAGIC, ImVec4( 0, 100, 255, 255), false, true, true),
|
|
|
|
|
|
|
|
|
|
COSMETIC_OPTION("SpinAttack.Level1Primary", "Level 1 Primary", COSMETICS_GROUP_SPIN_ATTACK, ImVec4(170, 255, 255, 255), false, true, true),
|
|
|
|
|
COSMETIC_OPTION("SpinAttack.Level1Secondary", "Level 1 Secondary", COSMETICS_GROUP_SPIN_ATTACK, ImVec4( 0, 100, 255, 255), false, true, false),
|
|
|
|
@ -352,15 +396,38 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const char* MarginCvarList[] {
|
|
|
|
|
CVAR_COSMETIC("HUD.Hearts"), CVAR_COSMETIC("HUD.HeartsCount"), CVAR_COSMETIC("HUD.MagicBar"), CVAR_COSMETIC("HUD.VisualSoA"), CVAR_COSMETIC("HUD.BButton"), CVAR_COSMETIC("HUD.AButton"), CVAR_COSMETIC("HUD.StartButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.CUpButton"), CVAR_COSMETIC("HUD.CDownButton"), CVAR_COSMETIC("HUD.CLeftButton"), CVAR_COSMETIC("HUD.CRightButton"), CVAR_COSMETIC("HUD.Dpad"), CVAR_COSMETIC("HUD.Minimap"),
|
|
|
|
|
CVAR_COSMETIC("HUD.SmallKey"), CVAR_COSMETIC("HUD.Rupees"), CVAR_COSMETIC("HUD.Carrots"), CVAR_COSMETIC("HUD.Timers"), CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"), CVAR_COSMETIC("HUD.TitleCard.Boss"), CVAR_COSMETIC("HUD.IGT")
|
|
|
|
|
CVAR_COSMETIC("HUD.Hearts"),
|
|
|
|
|
CVAR_COSMETIC("HUD.HeartsCount"),
|
|
|
|
|
CVAR_COSMETIC("HUD.MagicBar"),
|
|
|
|
|
CVAR_COSMETIC("HUD.VisualSoA"),
|
|
|
|
|
CVAR_COSMETIC("HUD.BButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.AButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.StartButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.CUpButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.CDownButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.CLeftButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.CRightButton"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Dpad"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Minimap"),
|
|
|
|
|
CVAR_COSMETIC("HUD.SmallKey"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Rupees"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Carrots"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Timers"),
|
|
|
|
|
CVAR_COSMETIC("HUD.ArcheryScore"),
|
|
|
|
|
CVAR_COSMETIC("HUD.TitleCard.Map"),
|
|
|
|
|
CVAR_COSMETIC("HUD.TitleCard.Boss"),
|
|
|
|
|
CVAR_COSMETIC("HUD.IGT")
|
|
|
|
|
};
|
|
|
|
|
static const char* MarginCvarNonAnchor[]{ CVAR_COSMETIC("HUD.Carrots"), CVAR_COSMETIC("HUD.Timers"), CVAR_COSMETIC("HUD.ArcheryScore"), CVAR_COSMETIC("HUD.TitleCard.Map"),CVAR_COSMETIC("HUD.TitleCard.Boss") };
|
|
|
|
|
|
|
|
|
|
ImVec4 GetRandomValue(int MaximumPossible){
|
|
|
|
|
ImVec4 NewColor;
|
|
|
|
|
unsigned long range = 255 - 0;
|
|
|
|
|
static const char* MarginCvarNonAnchor[] {
|
|
|
|
|
CVAR_COSMETIC("HUD.Carrots"),
|
|
|
|
|
CVAR_COSMETIC("HUD.Timers"),
|
|
|
|
|
CVAR_COSMETIC("HUD.ArcheryScore"),
|
|
|
|
|
CVAR_COSMETIC("HUD.TitleCard.Map"),
|
|
|
|
|
CVAR_COSMETIC("HUD.TitleCard.Boss")
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ImVec4 GetRandomValue() {
|
|
|
|
|
#if !defined(__SWITCH__) && !defined(__WIIU__)
|
|
|
|
|
std::random_device rd;
|
|
|
|
|
std::mt19937 rng(rd());
|
|
|
|
@ -370,6 +437,7 @@ ImVec4 GetRandomValue(int MaximumPossible){
|
|
|
|
|
#endif
|
|
|
|
|
std::uniform_int_distribution<int> dist(0, 255 - 1);
|
|
|
|
|
|
|
|
|
|
ImVec4 NewColor;
|
|
|
|
|
NewColor.x = (float)(dist(rng)) / 255;
|
|
|
|
|
NewColor.y = (float)(dist(rng)) / 255;
|
|
|
|
|
NewColor.z = (float)(dist(rng)) / 255;
|
|
|
|
@ -387,21 +455,19 @@ void SetMarginAll(const char* ButtonName, bool SetActivated) {
|
|
|
|
|
for (int i = 0; i < arrayLengthNonMargin; i++) {
|
|
|
|
|
if ((strcmp(cvarName, MarginCvarNonAnchor[i]) == 0) && (CVarGetInteger(cvarPosType.c_str(), 0) == 0)) { //Our element is both in original position and do not have anchor by default so we skip it.
|
|
|
|
|
CVarSetInteger(cvarNameMargins.c_str(), false); //force set off
|
|
|
|
|
}
|
|
|
|
|
else if ((strcmp(cvarName, MarginCvarNonAnchor[i]) == 0) && (CVarGetInteger(cvarPosType.c_str(), 0) != 0)) { //Our element is not in original position regarless it has no anchor by default since player made it anchored we can toggle margins
|
|
|
|
|
} else if ((strcmp(cvarName, MarginCvarNonAnchor[i]) == 0) && (CVarGetInteger(cvarPosType.c_str(), 0) != 0)) { //Our element is not in original position regarless it has no anchor by default since player made it anchored we can toggle margins
|
|
|
|
|
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
|
|
|
|
}
|
|
|
|
|
else if (strcmp(cvarName, MarginCvarNonAnchor[i]) != 0) { //Our elements has an anchor by default so regarless of it's position right now that okay to toggle margins.
|
|
|
|
|
} else if (strcmp(cvarName, MarginCvarNonAnchor[i]) != 0) { //Our elements has an anchor by default so regarless of it's position right now that okay to toggle margins.
|
|
|
|
|
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else { //Since the user requested to turn all margin off no need to do any check there.
|
|
|
|
|
} else { //Since the user requested to turn all margin off no need to do any check there.
|
|
|
|
|
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResetPositionAll() {
|
|
|
|
|
if (ImGui::Button("Reset all positions")) {
|
|
|
|
|
for (auto cvarName : MarginCvarList) {
|
|
|
|
@ -448,7 +514,9 @@ void CosmeticsUpdateTick() {
|
|
|
|
|
}
|
|
|
|
|
ApplyOrResetCustomGfxPatches(false);
|
|
|
|
|
hue++;
|
|
|
|
|
if (hue >= (360 * rainbowSpeed)) hue = 0;
|
|
|
|
|
if (hue >= (360 * rainbowSpeed)) {
|
|
|
|
|
hue = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -461,6 +529,22 @@ void CosmeticsUpdateTick() {
|
|
|
|
|
5. GFX Command: The GFX command you want to insert
|
|
|
|
|
*/
|
|
|
|
|
void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
static CosmeticOption& magicFaroresPrimary = cosmeticOptions.at("Magic.FaroresPrimary");
|
|
|
|
|
if (manualChange || CVarGetInteger(magicFaroresPrimary.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {magicFaroresPrimary.defaultColor.x, magicFaroresPrimary.defaultColor.y, magicFaroresPrimary.defaultColor.z, magicFaroresPrimary.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(magicFaroresPrimary.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(sInnerCylinderDL, "Magic_FaroresPrimary1", magicFaroresPrimary.changedCvar, 24, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(sOuterCylinderDL, "Magic_FaroresPrimary2", magicFaroresPrimary.changedCvar, 24, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CosmeticOption& magicFaroresSecondary = cosmeticOptions.at("Magic.FaroresSecondary");
|
|
|
|
|
if (manualChange || CVarGetInteger(magicFaroresSecondary.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {magicFaroresSecondary.defaultColor.x, magicFaroresSecondary.defaultColor.y, magicFaroresSecondary.defaultColor.z, magicFaroresSecondary.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(magicFaroresSecondary.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(sInnerCylinderDL, "Magic_FaroresSecondary1", magicFaroresSecondary.changedCvar, 25, gsDPSetEnvColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(sOuterCylinderDL, "Magic_FaroresSecondary2", magicFaroresSecondary.changedCvar, 25, gsDPSetEnvColor(color.r, color.g, color.b, 255));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CosmeticOption& linkGoronTunic = cosmeticOptions.at("Link.GoronTunic");
|
|
|
|
|
if (manualChange || CVarGetInteger(linkGoronTunic.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {linkGoronTunic.defaultColor.x, linkGoronTunic.defaultColor.y, linkGoronTunic.defaultColor.z, linkGoronTunic.defaultColor.w};
|
|
|
|
@ -632,47 +716,49 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriBlade3", swordsKokiriBlade.changedCvar, 5, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriBlade4", swordsKokiriBlade.changedCvar, 6, gsDPSetEnvColor(color.r / 4, color.g / 4, color.b / 4, 255));
|
|
|
|
|
}
|
|
|
|
|
// static CosmeticOption& swordsKokiriHilt = cosmeticOptions.at("Swords.KokiriHilt");
|
|
|
|
|
// if (manualChange || CVarGetInteger(swordsKokiriHilt.rainbowCvar, 0)) {
|
|
|
|
|
// static Color_RGBA8 defaultColor = {swordsKokiriHilt.defaultColor.x, swordsKokiriHilt.defaultColor.y, swordsKokiriHilt.defaultColor.z, swordsKokiriHilt.defaultColor.w};
|
|
|
|
|
// Color_RGBA8 color = CVarGetColor(swordsKokiriHilt.cvar, defaultColor);
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt1", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt2", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt3", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt4", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt5", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt6", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt7", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt8", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt9", swordsKokiriHilt.changedCvar, 64, gsDPSetPrimColor(0, 0, MAX(color.r - 50, 0), MAX(color.g - 50, 0), MAX(color.b - 50, 0), 255));
|
|
|
|
|
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt10", swordsKokiriHilt.changedCvar, 66, gsDPSetEnvColor(MAX(color.r - 50, 0) / 3, MAX(color.g - 50, 0) / 3, MAX(color.b - 50, 0) / 3, 255));
|
|
|
|
|
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt11", swordsKokiriHilt.changedCvar, 162, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt12", swordsKokiriHilt.changedCvar, 164, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
/*
|
|
|
|
|
static CosmeticOption& swordsKokiriHilt = cosmeticOptions.at("Swords.KokiriHilt");
|
|
|
|
|
if (manualChange || CVarGetInteger(swordsKokiriHilt.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {swordsKokiriHilt.defaultColor.x, swordsKokiriHilt.defaultColor.y, swordsKokiriHilt.defaultColor.z, swordsKokiriHilt.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(swordsKokiriHilt.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt1", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt2", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt3", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt4", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt5", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt6", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt7", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt8", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt9", swordsKokiriHilt.changedCvar, 64, gsDPSetPrimColor(0, 0, MAX(color.r - 50, 0), MAX(color.g - 50, 0), MAX(color.b - 50, 0), 255));
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt10", swordsKokiriHilt.changedCvar, 66, gsDPSetEnvColor(MAX(color.r - 50, 0) / 3, MAX(color.g - 50, 0) / 3, MAX(color.b - 50, 0) / 3, 255));
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt11", swordsKokiriHilt.changedCvar, 162, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt12", swordsKokiriHilt.changedCvar, 164, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
|
|
|
|
|
// if (manualChange) {
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt13", swordsKokiriHilt.changedCvar, 108, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt14", swordsKokiriHilt.changedCvar, 134, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt15", swordsKokiriHilt.changedCvar, 106, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt16", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt17", swordsKokiriHilt.changedCvar, 100, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt18", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt19", swordsKokiriHilt.changedCvar, 128, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt20", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt21", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt22", swordsKokiriHilt.changedCvar, 120, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt23", swordsKokiriHilt.changedCvar, 166, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt24", swordsKokiriHilt.changedCvar, 192, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt25", swordsKokiriHilt.changedCvar, 194, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt26", swordsKokiriHilt.changedCvar, 156, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt27", swordsKokiriHilt.changedCvar, 176, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt28", swordsKokiriHilt.changedCvar, 178, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt29", swordsKokiriHilt.changedCvar, 162, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt30", swordsKokiriHilt.changedCvar, 188, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt31", swordsKokiriHilt.changedCvar, 190, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt32", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt33", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (manualChange) {
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt13", swordsKokiriHilt.changedCvar, 108, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt14", swordsKokiriHilt.changedCvar, 134, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt15", swordsKokiriHilt.changedCvar, 106, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt16", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt17", swordsKokiriHilt.changedCvar, 100, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt18", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt19", swordsKokiriHilt.changedCvar, 128, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt20", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt21", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt22", swordsKokiriHilt.changedCvar, 120, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt23", swordsKokiriHilt.changedCvar, 166, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt24", swordsKokiriHilt.changedCvar, 192, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt25", swordsKokiriHilt.changedCvar, 194, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt26", swordsKokiriHilt.changedCvar, 156, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt27", swordsKokiriHilt.changedCvar, 176, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt28", swordsKokiriHilt.changedCvar, 178, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt29", swordsKokiriHilt.changedCvar, 162, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt30", swordsKokiriHilt.changedCvar, 188, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt31", swordsKokiriHilt.changedCvar, 190, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt32", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt33", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
static CosmeticOption& swordsMasterBlade = cosmeticOptions.at("Swords.MasterBlade");
|
|
|
|
|
if (manualChange || CVarGetInteger(swordsMasterBlade.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {swordsMasterBlade.defaultColor.x, swordsMasterBlade.defaultColor.y, swordsMasterBlade.defaultColor.z, swordsMasterBlade.defaultColor.w};
|
|
|
|
@ -684,53 +770,55 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterBlade5", swordsMasterBlade.changedCvar, 13, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterBlade6", swordsMasterBlade.changedCvar, 14, gsDPSetEnvColor(color.r / 2, color.g / 2, color.b / 2, 255));
|
|
|
|
|
}
|
|
|
|
|
// static CosmeticOption& swordsMasterHilt = cosmeticOptions.at("Swords.MasterHilt");
|
|
|
|
|
// if (manualChange || CVarGetInteger(swordsMasterHilt.rainbowCvar, 0)) {
|
|
|
|
|
// static Color_RGBA8 defaultColor = {swordsMasterHilt.defaultColor.x, swordsMasterHilt.defaultColor.y, swordsMasterHilt.defaultColor.z, swordsMasterHilt.defaultColor.w};
|
|
|
|
|
// Color_RGBA8 color = CVarGetColor(swordsMasterHilt.cvar, defaultColor);
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt1", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt2", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt3", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt4", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt5", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt6", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt7", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt8", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt9", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt10", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
/*
|
|
|
|
|
static CosmeticOption& swordsMasterHilt = cosmeticOptions.at("Swords.MasterHilt");
|
|
|
|
|
if (manualChange || CVarGetInteger(swordsMasterHilt.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {swordsMasterHilt.defaultColor.x, swordsMasterHilt.defaultColor.y, swordsMasterHilt.defaultColor.z, swordsMasterHilt.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(swordsMasterHilt.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt1", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt2", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt3", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt4", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt5", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt6", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt7", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt8", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt9", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt10", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
|
|
|
|
|
// if (manualChange) {
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt11", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt12", swordsMasterHilt.changedCvar, 64, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt13", swordsMasterHilt.changedCvar, 106, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt14", swordsMasterHilt.changedCvar, 120, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt15", swordsMasterHilt.changedCvar, 104, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt16", swordsMasterHilt.changedCvar, 182, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt17", swordsMasterHilt.changedCvar, 184, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt18", swordsMasterHilt.changedCvar, 80, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt19", swordsMasterHilt.changedCvar, 94, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt20", swordsMasterHilt.changedCvar, 162, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt21", swordsMasterHilt.changedCvar, 180, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt22", swordsMasterHilt.changedCvar, 154, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt23", swordsMasterHilt.changedCvar, 232, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt24", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt25", swordsMasterHilt.changedCvar, 130, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt26", swordsMasterHilt.changedCvar, 172, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt27", swordsMasterHilt.changedCvar, 186, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt28", swordsMasterHilt.changedCvar, 220, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt29", swordsMasterHilt.changedCvar, 298, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt30", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt31", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt32", swordsMasterHilt.changedCvar, 86, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt33", swordsMasterHilt.changedCvar, 208, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt34", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt35", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt36", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt37", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt38", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt39", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (manualChange) {
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt11", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt12", swordsMasterHilt.changedCvar, 64, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt13", swordsMasterHilt.changedCvar, 106, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt14", swordsMasterHilt.changedCvar, 120, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt15", swordsMasterHilt.changedCvar, 104, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt16", swordsMasterHilt.changedCvar, 182, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt17", swordsMasterHilt.changedCvar, 184, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt18", swordsMasterHilt.changedCvar, 80, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt19", swordsMasterHilt.changedCvar, 94, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt20", swordsMasterHilt.changedCvar, 162, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt21", swordsMasterHilt.changedCvar, 180, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt22", swordsMasterHilt.changedCvar, 154, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt23", swordsMasterHilt.changedCvar, 232, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt24", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt25", swordsMasterHilt.changedCvar, 130, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt26", swordsMasterHilt.changedCvar, 172, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt27", swordsMasterHilt.changedCvar, 186, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt28", swordsMasterHilt.changedCvar, 220, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt29", swordsMasterHilt.changedCvar, 298, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt30", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt31", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt32", swordsMasterHilt.changedCvar, 86, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt33", swordsMasterHilt.changedCvar, 208, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt34", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt35", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt36", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt37", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt38", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gGanonMasterSwordDL, "Swords_MasterHilt39", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
static CosmeticOption& swordsBiggoronBlade = cosmeticOptions.at("Swords.BiggoronBlade");
|
|
|
|
|
if (manualChange || CVarGetInteger(swordsBiggoronBlade.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {swordsBiggoronBlade.defaultColor.x, swordsBiggoronBlade.defaultColor.y, swordsBiggoronBlade.defaultColor.z, swordsBiggoronBlade.defaultColor.w};
|
|
|
|
@ -740,26 +828,27 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronBlade3", swordsBiggoronBlade.changedCvar, 5, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronBlade4", swordsBiggoronBlade.changedCvar, 6, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
}
|
|
|
|
|
// static CosmeticOption& swordsBiggoronHilt = cosmeticOptions.at("Swords.BiggoronHilt");
|
|
|
|
|
// if (manualChange || CVarGetInteger(swordsBiggoronHilt.rainbowCvar, 0)) {
|
|
|
|
|
// static Color_RGBA8 defaultColor = {swordsBiggoronHilt.defaultColor.x, swordsBiggoronHilt.defaultColor.y, swordsBiggoronHilt.defaultColor.z, swordsBiggoronHilt.defaultColor.w};
|
|
|
|
|
// Color_RGBA8 color = CVarGetColor(swordsBiggoronHilt.cvar, defaultColor);
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt1", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt2", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt3", swordsBiggoronHilt.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt4", swordsBiggoronHilt.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt5", swordsBiggoronHilt.changedCvar, 154, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt6", swordsBiggoronHilt.changedCvar, 156, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
|
|
|
|
|
// if (manualChange) {
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt7", swordsBiggoronHilt.changedCvar, 278, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt8", swordsBiggoronHilt.changedCvar, 332, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt9", swordsBiggoronHilt.changedCvar, 334, gsSPEndDisplayList());
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt10", swordsBiggoronHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt11", swordsBiggoronHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
/*
|
|
|
|
|
static CosmeticOption& swordsBiggoronHilt = cosmeticOptions.at("Swords.BiggoronHilt");
|
|
|
|
|
if (manualChange || CVarGetInteger(swordsBiggoronHilt.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {swordsBiggoronHilt.defaultColor.x, swordsBiggoronHilt.defaultColor.y, swordsBiggoronHilt.defaultColor.z, swordsBiggoronHilt.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(swordsBiggoronHilt.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt1", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt2", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt3", swordsBiggoronHilt.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt4", swordsBiggoronHilt.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt5", swordsBiggoronHilt.changedCvar, 154, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt6", swordsBiggoronHilt.changedCvar, 156, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
|
|
|
|
|
if (manualChange) {
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt7", swordsBiggoronHilt.changedCvar, 278, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt8", swordsBiggoronHilt.changedCvar, 332, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt9", swordsBiggoronHilt.changedCvar, 334, gsSPEndDisplayList());
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt10", swordsBiggoronHilt.changedCvar, 38, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt11", swordsBiggoronHilt.changedCvar, 118, gsSPGrayscale(false));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
static CosmeticOption& glovesGoronBracelet = cosmeticOptions.at("Gloves.GoronBracelet");
|
|
|
|
|
if (manualChange || CVarGetInteger(glovesGoronBracelet.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {glovesGoronBracelet.defaultColor.x, glovesGoronBracelet.defaultColor.y, glovesGoronBracelet.defaultColor.z, glovesGoronBracelet.defaultColor.w};
|
|
|
|
@ -820,31 +909,32 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
// There appears to be no gem rendered on the far LOD variant, not sure if this is an SOH bug or what.
|
|
|
|
|
// PATCH_GFX(gLinkChildLeftFistAndBoomerangFarDL, "Equipment_BoomerangGem5", equipmentBoomerangGem.changedCvar, 32, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
static CosmeticOption& equipmentSlingshotBody = cosmeticOptions.at("Equipment.SlingshotBody");
|
|
|
|
|
if (manualChange || CVarGetInteger(equipmentSlingshotBody.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {equipmentSlingshotBody.defaultColor.x, equipmentSlingshotBody.defaultColor.y, equipmentSlingshotBody.defaultColor.z, equipmentSlingshotBody.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(equipmentSlingshotBody.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody1", equipmentSlingshotBody.changedCvar, 10, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody2", equipmentSlingshotBody.changedCvar, 12, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody3", equipmentSlingshotBody.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody4", equipmentSlingshotBody.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody5", equipmentSlingshotBody.changedCvar, 128, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
|
|
|
|
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody6", equipmentSlingshotBody.changedCvar, 130, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody7", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody8", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody9", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
|
|
|
|
|
// static CosmeticOption& equipmentSlingshotBody = cosmeticOptions.at("Equipment.SlingshotBody");
|
|
|
|
|
// if (manualChange || CVarGetInteger(equipmentSlingshotBody.rainbowCvar, 0)) {
|
|
|
|
|
// static Color_RGBA8 defaultColor = {equipmentSlingshotBody.defaultColor.x, equipmentSlingshotBody.defaultColor.y, equipmentSlingshotBody.defaultColor.z, equipmentSlingshotBody.defaultColor.w};
|
|
|
|
|
// Color_RGBA8 color = CVarGetColor(equipmentSlingshotBody.cvar, defaultColor);
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody1", equipmentSlingshotBody.changedCvar, 10, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody2", equipmentSlingshotBody.changedCvar, 12, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody3", equipmentSlingshotBody.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody4", equipmentSlingshotBody.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody5", equipmentSlingshotBody.changedCvar, 128, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
|
|
|
|
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody6", equipmentSlingshotBody.changedCvar, 130, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody7", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody8", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody9", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
|
|
|
|
|
// if (manualChange) {
|
|
|
|
|
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody10",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody11",equipmentSlingshotBody.changedCvar, 74, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody12",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody13",equipmentSlingshotBody.changedCvar, 66, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody14",equipmentSlingshotBody.changedCvar, 96, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody15",equipmentSlingshotBody.changedCvar, 136, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody16",equipmentSlingshotBody.changedCvar, 138, gsSPEndDisplayList());
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (manualChange) {
|
|
|
|
|
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody10",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody11",equipmentSlingshotBody.changedCvar, 74, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody12",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody13",equipmentSlingshotBody.changedCvar, 66, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody14",equipmentSlingshotBody.changedCvar, 96, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody15",equipmentSlingshotBody.changedCvar, 136, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody16",equipmentSlingshotBody.changedCvar, 138, gsSPEndDisplayList());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
static CosmeticOption& equipmentSlingshotString = cosmeticOptions.at("Equipment.SlingshotString");
|
|
|
|
|
if (manualChange || CVarGetInteger(equipmentSlingshotString.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {equipmentSlingshotString.defaultColor.x, equipmentSlingshotString.defaultColor.y, equipmentSlingshotString.defaultColor.z, equipmentSlingshotString.defaultColor.w};
|
|
|
|
@ -914,6 +1004,13 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
PATCH_GFX(gLinkAdultLeftHandHoldingHammerFarDL, "Equipment_HammerHandle6", equipmentHammerHandle.changedCvar, 18, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CosmeticOption& equipmentHookshotChain = cosmeticOptions.at("Equipment.HookshotChain");
|
|
|
|
|
if (manualChange || CVarGetInteger(equipmentHookshotChain.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {equipmentHookshotChain.defaultColor.x, equipmentHookshotChain.defaultColor.y, equipmentHookshotChain.defaultColor.z, equipmentHookshotChain.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(equipmentHookshotChain.cvar, defaultColor);
|
|
|
|
|
PATCH_GFX(gLinkAdultHookshotChainDL, "Equipment_HookshotChain1", equipmentHookshotChain.changedCvar, 17, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static CosmeticOption& equipmentChuFace = cosmeticOptions.at("Equipment.ChuFace");
|
|
|
|
|
if (manualChange || CVarGetInteger(equipmentChuFace.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {equipmentChuFace.defaultColor.x, equipmentChuFace.defaultColor.y, equipmentChuFace.defaultColor.z, equipmentChuFace.defaultColor.w};
|
|
|
|
@ -1019,10 +1116,12 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
if (manualChange || CVarGetInteger(consumableHearts.rainbowCvar, 0)) {
|
|
|
|
|
static Color_RGBA8 defaultColor = {consumableHearts.defaultColor.x, consumableHearts.defaultColor.y, consumableHearts.defaultColor.z, consumableHearts.defaultColor.w};
|
|
|
|
|
Color_RGBA8 color = CVarGetColor(consumableHearts.cvar, defaultColor);
|
|
|
|
|
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts1", consumableHearts.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts2", consumableHearts.changedCvar, 26, gsSPGrayscale(true));
|
|
|
|
|
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts3", consumableHearts.changedCvar, 72, gsSPGrayscale(false));
|
|
|
|
|
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts4", consumableHearts.changedCvar, 74, gsSPEndDisplayList());
|
|
|
|
|
/*
|
|
|
|
|
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts1", consumableHearts.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts2", consumableHearts.changedCvar, 26, gsSPGrayscale(true));
|
|
|
|
|
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts3", consumableHearts.changedCvar, 72, gsSPGrayscale(false));
|
|
|
|
|
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts4", consumableHearts.changedCvar, 74, gsSPEndDisplayList());
|
|
|
|
|
*/
|
|
|
|
|
PATCH_GFX(gGiHeartPieceDL, "Consumable_Hearts5", consumableHearts.changedCvar, 2, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
|
PATCH_GFX(gGiHeartPieceDL, "Consumable_Hearts6", consumableHearts.changedCvar, 6, gsDPSetEnvColor(color.r / 2, color.g / 2, color.b / 2, 255));
|
|
|
|
|
PATCH_GFX(gGiHeartContainerDL, "Consumable_Hearts7", consumableHearts.changedCvar, 2, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
|
|
|
@ -1119,6 +1218,15 @@ void ApplyOrResetCustomGfxPatches(bool manualChange) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extern "C" Color_RGBA8 CosmeticsEditor_GetDefaultValue(const char* id) {
|
|
|
|
|
return Color_RGBA8 {
|
|
|
|
|
(uint8_t)(cosmeticOptions[id].defaultColor.x * 255.0f),
|
|
|
|
|
(uint8_t)(cosmeticOptions[id].defaultColor.y * 255.0f),
|
|
|
|
|
(uint8_t)(cosmeticOptions[id].defaultColor.z * 255.0f),
|
|
|
|
|
(uint8_t)(cosmeticOptions[id].defaultColor.w * 255.0f)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Table_InitHeader(bool has_header = true) {
|
|
|
|
|
if (has_header) {
|
|
|
|
|
ImGui::TableHeadersRow();
|
|
|
|
@ -1129,12 +1237,14 @@ void Table_InitHeader(bool has_header = true) {
|
|
|
|
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 2);
|
|
|
|
|
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x-60);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawUseMarginsSlider(const std::string ElementName, const std::string CvarName){
|
|
|
|
|
std::string CvarLabel = CvarName + ".UseMargins";
|
|
|
|
|
std::string Label = ElementName + " use margins";
|
|
|
|
|
UIWidgets::EnhancementCheckbox(Label.c_str(), CvarLabel.c_str());
|
|
|
|
|
UIWidgets::Tooltip("Using this allow you move the element with General margins sliders");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawPositionsRadioBoxes(const std::string CvarName, bool NoAnchorEnabled = true){
|
|
|
|
|
std::string CvarLabel = CvarName + ".PosType";
|
|
|
|
|
UIWidgets::EnhancementRadioButton("Original position", CvarLabel.c_str(), 0);
|
|
|
|
@ -1150,6 +1260,7 @@ void DrawPositionsRadioBoxes(const std::string CvarName, bool NoAnchorEnabled =
|
|
|
|
|
UIWidgets::EnhancementRadioButton("Hidden", CvarLabel.c_str(), 4);
|
|
|
|
|
UIWidgets::Tooltip("This will make your elements hidden");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawPositionSlider(const std::string CvarName, int MinY, int MaxY, int MinX, int MaxX){
|
|
|
|
|
std::string PosXCvar = CvarName + ".PosX";
|
|
|
|
|
std::string PosYCvar = CvarName + ".PosY";
|
|
|
|
@ -1160,12 +1271,14 @@ void DrawPositionSlider(const std::string CvarName, int MinY, int MaxY, int MinX
|
|
|
|
|
UIWidgets::EnhancementSliderInt("Left <-> Right : %d", InvisibleLabelX.c_str(), PosXCvar.c_str(), MinX, MaxX, "", 0);
|
|
|
|
|
UIWidgets::Tooltip("This slider is used to move Left and Right your elements.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawScaleSlider(const std::string CvarName,float DefaultValue){
|
|
|
|
|
std::string InvisibleLabel = "##"+CvarName;
|
|
|
|
|
std::string CvarLabel = CvarName + ".Scale";
|
|
|
|
|
//Disabled for now. feature not done and several fixes needed to be merged.
|
|
|
|
|
//UIWidgets::EnhancementSliderFloat("Scale : %dx", InvisibleLabel.c_str(), CvarLabel.c_str(), 0.1f, 3.0f,"",DefaultValue,true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Draw_Table_Dropdown(const char* Header_Title, const char* Table_ID, const char* Column_Title, const char* Slider_Title, const char* Slider_ID, int MinY, int MaxY, int MinX, int MaxX, float Default_Value) {
|
|
|
|
|
if (ImGui::CollapsingHeader(Header_Title)) {
|
|
|
|
|
if (ImGui::BeginTable(Table_ID, 1, FlagsTable)) {
|
|
|
|
@ -1180,6 +1293,7 @@ void Draw_Table_Dropdown(const char* Header_Title, const char* Table_ID, const c
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void C_Button_Dropdown(const char* Header_Title, const char* Table_ID, const char* Column_Title, const char* Slider_Title, const char* Slider_ID, const char* Int_Type, float Slider_Scale_Value) {
|
|
|
|
|
if (ImGui::CollapsingHeader(Header_Title)) {
|
|
|
|
|
if (ImGui::BeginTable(Table_ID, 1, FlagsTable)) {
|
|
|
|
@ -1216,6 +1330,7 @@ void C_Button_Dropdown(const char* Header_Title, const char* Table_ID, const cha
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Draw_Placements(){
|
|
|
|
|
if (ImGui::BeginTable("tableMargins", 1, FlagsTable)) {
|
|
|
|
|
ImGui::TableSetupColumn("General margins settings", FlagsCell, TablesCellsWidth);
|
|
|
|
@ -1344,6 +1459,7 @@ void Draw_Placements(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Reset_Option_Single(const char* Button_Title, const char* name) {
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
if (ImGui::Button(Button_Title)) {
|
|
|
|
@ -1351,6 +1467,7 @@ void Reset_Option_Single(const char* Button_Title, const char* name) {
|
|
|
|
|
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Reset_Option_Double(const char* Button_Title, const char* name) {
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
if (ImGui::Button(Button_Title)) {
|
|
|
|
@ -1359,6 +1476,7 @@ void Reset_Option_Double(const char* Button_Title, const char* name) {
|
|
|
|
|
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DrawSillyTab() {
|
|
|
|
|
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
|
|
|
|
if (CVarGetInteger(CVAR_GENERAL("LetItSnow"), 0)) {
|
|
|
|
@ -1527,10 +1645,11 @@ void ApplySideEffects(CosmeticOption& cosmeticOption) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RandomizeColor(CosmeticOption& cosmeticOption) {
|
|
|
|
|
ImVec4 randomColor = GetRandomValue();
|
|
|
|
|
Color_RGBA8 newColor;
|
|
|
|
|
newColor.r = Random(0, 255);
|
|
|
|
|
newColor.g = Random(0, 255);
|
|
|
|
|
newColor.b = Random(0, 255);
|
|
|
|
|
newColor.r = randomColor.x * 255;
|
|
|
|
|
newColor.g = randomColor.y * 255;
|
|
|
|
|
newColor.b = randomColor.z * 255;
|
|
|
|
|
newColor.a = 255;
|
|
|
|
|
// For alpha supported options, retain the last set alpha instead of overwriting
|
|
|
|
|
if (cosmeticOption.supportsAlpha) {
|
|
|
|
@ -1543,8 +1662,8 @@ void RandomizeColor(CosmeticOption& cosmeticOption) {
|
|
|
|
|
cosmeticOption.currentColor.w = newColor.a / 255.0;
|
|
|
|
|
|
|
|
|
|
CVarSetColor(cosmeticOption.cvar, newColor);
|
|
|
|
|
CVarSetInteger((cosmeticOption.rainbowCvar), 0);
|
|
|
|
|
CVarSetInteger((cosmeticOption.changedCvar), 1);
|
|
|
|
|
CVarSetInteger(cosmeticOption.rainbowCvar, 0);
|
|
|
|
|
CVarSetInteger(cosmeticOption.changedCvar, 1);
|
|
|
|
|
ApplySideEffects(cosmeticOption);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1631,7 +1750,8 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) {
|
|
|
|
|
}
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
ImGui::Text("%s", cosmeticOption.label.c_str());
|
|
|
|
|
ImGui::SameLine((ImGui::CalcTextSize("Mirror Shield Mirror").x * 1.0f) + 60.0f);
|
|
|
|
|
//the longest option name
|
|
|
|
|
ImGui::SameLine((ImGui::CalcTextSize("Message Light Blue (None No Shadow) Color").x * 1.0f) + 60.0f);
|
|
|
|
|
if (ImGui::Button(("Random##" + cosmeticOption.label).c_str())) {
|
|
|
|
|
RandomizeColor(cosmeticOption);
|
|
|
|
|
ApplyOrResetCustomGfxPatches();
|
|
|
|
@ -1667,7 +1787,8 @@ void DrawCosmeticRow(CosmeticOption& cosmeticOption) {
|
|
|
|
|
void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) {
|
|
|
|
|
std::string label = groupLabels.at(cosmeticGroup);
|
|
|
|
|
ImGui::Text("%s", label.c_str());
|
|
|
|
|
ImGui::SameLine((ImGui::CalcTextSize("Mirror Shield Mirror").x * 1.0f) + 60.0f);
|
|
|
|
|
// the longest option name
|
|
|
|
|
ImGui::SameLine((ImGui::CalcTextSize("Message Light Blue (None No Shadow) Color").x * 1.0f) + 60.0f);
|
|
|
|
|
if (ImGui::Button(("Random##" + label).c_str())) {
|
|
|
|
|
for (auto& [id, cosmeticOption] : cosmeticOptions) {
|
|
|
|
|
if (cosmeticOption.group == cosmeticGroup && (!cosmeticOption.advancedOption || CVarGetInteger(CVAR_COSMETIC("AdvancedMode"), 0)) && !CVarGetInteger(cosmeticOption.lockedCvar, 0)) {
|
|
|
|
@ -1764,6 +1885,36 @@ void CosmeticsEditorWindow::DrawElement() {
|
|
|
|
|
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ImGui::Button("Rainbow All", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
|
|
|
|
for (auto& [id, cosmeticOption] : cosmeticOptions) {
|
|
|
|
|
if (
|
|
|
|
|
!CVarGetInteger(cosmeticOption.lockedCvar, 0) &&
|
|
|
|
|
(
|
|
|
|
|
!cosmeticOption.advancedOption ||
|
|
|
|
|
CVarGetInteger(CVAR_COSMETIC("AdvancedMode"), 0)
|
|
|
|
|
)
|
|
|
|
|
) {
|
|
|
|
|
CVarSetInteger(cosmeticOption.rainbowCvar, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
|
|
|
|
}
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
if (ImGui::Button("Un-Rainbow All", ImVec2(ImGui::GetContentRegionAvail().x, 30.0f))) {
|
|
|
|
|
for (auto& [id, cosmeticOption] : cosmeticOptions) {
|
|
|
|
|
if (
|
|
|
|
|
!CVarGetInteger(cosmeticOption.lockedCvar, 0) &&
|
|
|
|
|
(
|
|
|
|
|
!cosmeticOption.advancedOption ||
|
|
|
|
|
CVarGetInteger(CVAR_COSMETIC("AdvancedMode"), 0)
|
|
|
|
|
)
|
|
|
|
|
) {
|
|
|
|
|
CVarSetInteger(cosmeticOption.rainbowCvar, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ImGui::BeginTabBar("CosmeticsContextTabBar", ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)) {
|
|
|
|
|
if (ImGui::BeginTabItem("Link & Items")) {
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_LINK);
|
|
|
|
@ -1775,7 +1926,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
|
}
|
|
|
|
|
if (ImGui::BeginTabItem("Effects")) {
|
|
|
|
|
// DrawCosmeticGroup(COSMETICS_GROUP_MAGIC); // Cosmetics TODO: Implement magic effect colors
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_MAGIC);
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_ARROWS);
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_SPIN_ATTACK);
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_TRAILS);
|
|
|
|
@ -1816,6 +1967,11 @@ void CosmeticsEditorWindow::DrawElement() {
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_KALEIDO);
|
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ImGui::BeginTabItem("Message")) {
|
|
|
|
|
DrawCosmeticGroup(COSMETICS_GROUP_MESSAGE);
|
|
|
|
|
ImGui::EndTabItem();
|
|
|
|
|
}
|
|
|
|
|
ImGui::EndTabBar();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|