Cosmetics Changes (#4275)
* Clean CosmeticsEditor.h * Add CosmeticsEditor_GetDefaultValue * Add message text cosmetics * Format cleanup * Remove dependency on 3drando random functions * Fix rainbow for every cosmetic * Add "Rainbow All" & "Un-Rainbow All" * Add HookshotChain cosmetic * Add Nayru's cosmetics * Add Farore's cosmetics * Add Din's cosmetics * Add Title card cosmetics * Update CosmeticsEditor.cpp * Add Copyright text cosmetic
This commit is contained in:
@@ -1081,14 +1081,11 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
|
||||
}
|
||||
|
||||
void TitleCard_Update(PlayState* play, TitleCardContext* titleCtx) {
|
||||
const Color_RGB8 TitleCard_Colors_ori = {255,255,255};
|
||||
Color_RGB8 TitleCard_Colors = {255,255,255};
|
||||
if (titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Boss.Changed"), 1) == 2) {
|
||||
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Boss.Value"), TitleCard_Colors_ori);
|
||||
} else if (!titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Map.Changed"), 1) == 2) {
|
||||
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Map.Value"), TitleCard_Colors_ori);
|
||||
} else {
|
||||
TitleCard_Colors = TitleCard_Colors_ori;
|
||||
Color_RGB8 TitleCard_Colors = { 255, 255, 255 };
|
||||
if (titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Boss.Changed"), 0) == 1) {
|
||||
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Boss.Value"), TitleCard_Colors);
|
||||
} else if (!titleCtx->isBossCard && CVarGetInteger(CVAR_COSMETIC("HUD.TitleCard.Map.Changed"), 0) == 1) {
|
||||
TitleCard_Colors = CVarGetColor24(CVAR_COSMETIC("HUD.TitleCard.Map.Value"), TitleCard_Colors);
|
||||
}
|
||||
|
||||
if (DECR(titleCtx->delayTimer) == 0) {
|
||||
@@ -2345,8 +2342,14 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
||||
} else if (D_8015BC18 > 0.0f) {
|
||||
static Vec3f effectVel = { 0.0f, -0.05f, 0.0f };
|
||||
static Vec3f effectAccel = { 0.0f, -0.025f, 0.0f };
|
||||
static Color_RGBA8 effectPrimCol = { 255, 255, 255, 0 };
|
||||
static Color_RGBA8 effectEnvCol = { 100, 200, 0, 0 };
|
||||
Color_RGBA8 effectPrimCol = { 255, 255, 255, 0 };
|
||||
Color_RGBA8 effectEnvCol = { 100, 200, 0, 0 };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Magic.FaroresSecondary.Changed"), 0)) {
|
||||
effectEnvCol = CVarGetColor(CVAR_COSMETIC("Magic.FaroresSecondary.Value"), effectEnvCol);
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Magic.FaroresPrimary.Changed"), 0)) {
|
||||
effectPrimCol = CVarGetColor(CVAR_COSMETIC("Magic.FaroresPrimary.Value"), effectPrimCol);
|
||||
}
|
||||
Vec3f* curPos = &gSaveContext.respawn[RESPAWN_MODE_TOP].pos;
|
||||
Vec3f* nextPos = &gSaveContext.respawn[RESPAWN_MODE_DOWN].pos;
|
||||
f32 prevNum = D_8015BC18;
|
||||
@@ -2441,8 +2444,16 @@ void Actor_DrawFaroresWindPointer(PlayState* play) {
|
||||
Matrix_Push();
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 200, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 255);
|
||||
Color_RGB8 Spell_env = { 100, 200, 0 };
|
||||
Color_RGB8 Spell_col = { 255, 255, 200 };
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Magic.FaroresSecondary.Changed"), 0)) {
|
||||
Spell_env = CVarGetColor24(CVAR_COSMETIC("Magic.FaroresSecondary.Value"), Spell_env);
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Magic.FaroresPrimary.Changed"), 0)) {
|
||||
Spell_col = CVarGetColor24(CVAR_COSMETIC("Magic.FaroresPrimary.Value"), Spell_col);
|
||||
}
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, Spell_col.r, Spell_col.g, Spell_col.b, alpha);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, Spell_env.r, Spell_env.g, Spell_env.b, 255);
|
||||
|
||||
Matrix_RotateZ(((play->gameplayFrames * 1500) & 0xFFFF) * M_PI / 32768.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "textures/parameter_static/parameter_static.h"
|
||||
#include "textures/message_static/message_static.h"
|
||||
#include "textures/message_texture_static/message_texture_static.h"
|
||||
#include "soh/Enhancements/cosmetics/CosmeticsEditor.h"
|
||||
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
@@ -367,6 +368,80 @@ void Message_FindCreditsMessage(PlayState* play, u16 textId) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma region [SoH] Cosmetics
|
||||
|
||||
#define MESSAGE_COSMETICS_HANDLE_COLOR(id) \
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Message." id ".Changed"), 0)) { \
|
||||
Color_RGBA8 color = CVarGetColor(CVAR_COSMETIC("Message." id ".Value"), CosmeticsEditor_GetDefaultValue("Message." id)); \
|
||||
msgCtx->textColorR = color.r; \
|
||||
msgCtx->textColorG = color.g; \
|
||||
msgCtx->textColorB = color.b; \
|
||||
}
|
||||
|
||||
void Cosmetics_MaybeSetTextColor(MessageContext* msgCtx, u16 colorParameter) {
|
||||
switch (colorParameter) {
|
||||
case MSGCOL_RED:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Red.Wooden")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Red.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_ADJUSTABLE:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Adjustable.Wooden")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Adjustable.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_BLUE:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Blue.Wooden")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Blue.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_LIGHTBLUE:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("LightBlue.Wooden")
|
||||
} else if (msgCtx->textBoxType == TEXTBOX_TYPE_NONE_NO_SHADOW) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("LightBlue.NoneNoShadow")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("LightBlue.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_PURPLE:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Purple.Wooden")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Purple.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_YELLOW:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_WOODEN) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Yellow.Wooden")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Yellow.Normal")
|
||||
}
|
||||
break;
|
||||
case MSGCOL_BLACK:
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Black")
|
||||
break;
|
||||
case MSGCOL_DEFAULT:
|
||||
default:
|
||||
if (msgCtx->textBoxType == TEXTBOX_TYPE_NONE_NO_SHADOW) {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Default.NoneNoShadow")
|
||||
} else {
|
||||
MESSAGE_COSMETICS_HANDLE_COLOR("Default.Normal")
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#undef MESSAGE_COSMETICS_HANDLE_COLOR
|
||||
|
||||
#pragma endregion
|
||||
|
||||
void Message_SetTextColor(MessageContext* msgCtx, u16 colorParameter) {
|
||||
switch (colorParameter) {
|
||||
case MSGCOL_RED:
|
||||
@@ -451,6 +526,7 @@ void Message_SetTextColor(MessageContext* msgCtx, u16 colorParameter) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
Cosmetics_MaybeSetTextColor(msgCtx, colorParameter);
|
||||
}
|
||||
|
||||
void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
||||
@@ -853,6 +929,8 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
||||
msgCtx->textColorR = msgCtx->textColorG = msgCtx->textColorB = 255;
|
||||
}
|
||||
|
||||
Cosmetics_MaybeSetTextColor(msgCtx, MSGCOL_DEFAULT);
|
||||
|
||||
msgCtx->unk_E3D0 = 0;
|
||||
charTexIdx = 0;
|
||||
|
||||
|
||||
@@ -3388,6 +3388,9 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
||||
|
||||
default:
|
||||
gSaveContext.magicState = MAGIC_STATE_IDLE;
|
||||
if (CVarGetInteger(CVAR_COSMETIC("Consumable.MagicBorder.Changed"), 0)) {
|
||||
sMagicBorder = CVarGetColor24(CVAR_COSMETIC("Consumable.MagicBorder.Value"), sMagicBorder_ori);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3617,8 +3620,8 @@ void Interface_DrawEnemyHealthBar(TargetContext* targetCtx, PlayState* play) {
|
||||
s32 healthbar_offsetY = CVarGetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar.PosY"), 0);
|
||||
s8 anchorType = CVarGetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar.PosType"), ENEMYHEALTH_ANCHOR_ACTOR);
|
||||
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar..Changed"), 0)) {
|
||||
healthbar_red = CVarGetColor(CVAR_COSMETIC("HUD.EnemyHealthBar..Value"), healthbar_red);
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.EnemyHealthBar.Changed"), 0)) {
|
||||
healthbar_red = CVarGetColor(CVAR_COSMETIC("HUD.EnemyHealthBar.Value"), healthbar_red);
|
||||
}
|
||||
if (CVarGetInteger(CVAR_COSMETIC("HUD.EnemyHealthBorder.Changed"), 0)) {
|
||||
healthbar_border = CVarGetColor(CVAR_COSMETIC("HUD.EnemyHealthBorder.Value"), healthbar_border);
|
||||
|
||||
Reference in New Issue
Block a user