numbers aren't magic (#2976)
* numbers aren't magic * chest style matches contents renamed everything except the cvar itself at this point (waiting for versioned configs for that) * tracker as part of names * finish the tracker rename --------- Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "global.h"
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
|
||||
u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
|
||||
{ 0x0000, 0x7124, 0x7127, 0x7126, 0x7125, 0x7127, 0x7124, 0x7125, 0x7127 },
|
||||
@@ -66,7 +67,7 @@ u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
|
||||
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet) {
|
||||
u8 currentMask = Player_GetMask(play);
|
||||
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) && currentMask == PLAYER_MASK_BUNNY) {
|
||||
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && currentMask == PLAYER_MASK_BUNNY) {
|
||||
return 0;
|
||||
} else {
|
||||
return sReactionTextIds[reactionSet][currentMask];
|
||||
|
||||
@@ -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/cosmeticsTypes.h"
|
||||
|
||||
s16 sTextFade = false; // original name: key_off_flag ?
|
||||
|
||||
@@ -97,7 +98,7 @@ void Message_ResetOcarinaNoteState(void) {
|
||||
sOcarinaNoteCBtnEnv = (Color_RGB8){ 10, 10, 10 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
sOcarinaNoteABtnPrim = CVarGetColor24("gCosmetics.Hud_AButton.Value", sOcarinaNoteABtnPrim);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
sOcarinaNoteABtnPrim = (Color_RGB8){ 80, 255, 150 };
|
||||
}
|
||||
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
@@ -465,7 +466,7 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
||||
sIconPrimColors[0].b = (color.b / 255) * 95;
|
||||
sIconPrimColors[1] = color;
|
||||
sIconEnvColors[1] = color;
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
sIconPrimColors[0] = (Color_RGB8){ 0, 200, 80 };
|
||||
sIconPrimColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
sIconEnvColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
@@ -2017,7 +2018,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
sOcarinaNoteAPrimColors[0].b = (color.b / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[1] = color;
|
||||
sOcarinaNoteAEnvColors[1] = color;
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
sOcarinaNoteAPrimColors[0] = (Color_RGB8){ 80, 255, 150 };
|
||||
sOcarinaNoteAPrimColors[1] = (Color_RGB8){ 100, 255, 200 };
|
||||
sOcarinaNoteAEnvColors[1] = (Color_RGB8){ 50, 255, 50 };
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "soh/Enhancements/gameplaystats.h"
|
||||
#include "soh/Enhancements/boss-rush/BossRushTypes.h"
|
||||
#include "soh/Enhancements/custom-message/CustomMessageInterfaceAddon.h"
|
||||
#include "soh/Enhancements/cosmetics/cosmeticsTypes.h"
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
@@ -1127,7 +1129,7 @@ void func_80083108(PlayState* play) {
|
||||
|
||||
if (interfaceCtx->restrictions.tradeItems != 0) {
|
||||
for (i = 1; i < ARRAY_COUNT(gSaveContext.equips.buttonItems); i++) {
|
||||
if ((CVarGetInteger("gMMBunnyHood", 0) != 0)
|
||||
if ((CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA)
|
||||
&& (gSaveContext.equips.buttonItems[i] >= ITEM_MASK_KEATON)
|
||||
&& (gSaveContext.equips.buttonItems[i] <= ITEM_MASK_TRUTH)) {
|
||||
gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] = BTN_ENABLED;
|
||||
@@ -3704,7 +3706,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
Color_RGB8 bButtonColor = { 0, 150, 0 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_BButton.Changed", 0)) {
|
||||
bButtonColor = CVarGetColor24("gCosmetics.Hud_BButton.Value", bButtonColor);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
bButtonColor = (Color_RGB8){ 255, 30, 30 };
|
||||
}
|
||||
|
||||
@@ -3732,7 +3734,7 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
Color_RGB8 startButtonColor = { 200, 0, 0 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_StartButton.Changed", 0)) {
|
||||
startButtonColor = CVarGetColor24("gCosmetics.Hud_StartButton.Value", startButtonColor);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
startButtonColor = (Color_RGB8){ 120, 120, 120 };
|
||||
}
|
||||
|
||||
@@ -4828,7 +4830,7 @@ void Interface_Draw(PlayState* play) {
|
||||
Color_RGB8 aButtonColor = { 90, 90, 255 };
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
aButtonColor = CVarGetColor24("gCosmetics.Hud_AButton.Value", aButtonColor);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", COLORSCHEME_N64) == COLORSCHEME_GAMECUBE) {
|
||||
aButtonColor = (Color_RGB8){ 0, 200, 50 };
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
|
||||
#include <overlays/actors/ovl_En_Niw/z_en_niw.h>
|
||||
#include "soh/Enhancements/enhancementTypes.h"
|
||||
|
||||
#include <libultraship/libultraship.h>
|
||||
|
||||
@@ -644,7 +645,7 @@ void Play_Init(GameState* thisx) {
|
||||
|
||||
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
|
||||
// In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) || CVarGetInteger("gTimelessEquipment", 0)) {
|
||||
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA || CVarGetInteger("gTimelessEquipment", 0)) {
|
||||
gItemAgeReqs[ITEM_MASK_BUNNY] = 9;
|
||||
if(INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY)
|
||||
gSlotAgeReqs[SLOT_TRADE_CHILD] = 9;
|
||||
@@ -1177,7 +1178,7 @@ void Play_Update(PlayState* play) {
|
||||
gSaveContext.sohStats.sceneTimer++;
|
||||
gSaveContext.sohStats.roomTimer++;
|
||||
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
if (CVarGetInteger("gMMBunnyHood", BUNNY_HOOD_VANILLA) != BUNNY_HOOD_VANILLA && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD]++;
|
||||
}
|
||||
}
|
||||
@@ -2287,7 +2288,7 @@ void Play_PerformSave(PlayState* play) {
|
||||
} else {
|
||||
Save_SaveFile();
|
||||
}
|
||||
if (CVarGetInteger("gAutosave", 0)) {
|
||||
if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF) {
|
||||
Overlay_DisplayText(3.0f, "Game Saved");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user