mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 13:00:11 -07:00
refactor: use LUS 1.0 RC
Co-authored-by: kenix3 <kenixwhisperwind@gmail.com> Co-authored-by: David Chavez <david@dcvz.io> Co-authored-by: KiritoDv <kiritodev01@gmail.com> Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
parent
ab104623a7
commit
ba13e6b2c4
863 changed files with 9227 additions and 4416 deletions
|
@ -1,5 +1,5 @@
|
|||
#include <math.h>
|
||||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
#define ROUND(num) floorf((num) * 100) / 100;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
void AudioHeap_InitSampleCaches(u32 persistentSize, u32 temporarySize);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "soh/Enhancements/sfx-editor/SfxEditor.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include <Cvar.h>
|
||||
#include <libultraship/bridge.h>
|
||||
|
||||
extern bool gUseLegacySD;
|
||||
|
||||
|
@ -94,7 +94,7 @@ void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
|
|||
vel = 0.0f > vel ? 0.0f : vel;
|
||||
vel = 1.0f < vel ? 1.0f : vel;
|
||||
|
||||
float master_vol = CVar_GetFloat("gGameMasterVolume", 1.0f);
|
||||
float master_vol = CVarGetFloat("gGameMasterVolume", 1.0f);
|
||||
sub->targetVolLeft = (s32)((vel * volLeft) * (0x1000 - 0.001f)) * master_vol;
|
||||
sub->targetVolRight = (s32)((vel * volRight) * (0x1000 - 0.001f)) * master_vol;
|
||||
|
||||
|
@ -120,7 +120,7 @@ void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput)
|
|||
} else {
|
||||
noteSubEu->bitField1.hasTwoParts = true;
|
||||
if (3.99996f < resamplingRateInput) {
|
||||
if (CVar_GetS32("gExperimentalOctaveDrop", 0)) {
|
||||
if (CVarGetInteger("gExperimentalOctaveDrop", 0)) {
|
||||
resamplingRate = resamplingRateInput * 0.25;
|
||||
} else {
|
||||
resamplingRate = 1.99998f;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
extern char* sequenceMap[MAX_SEQUENCES];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
SoundParams sEnemyBankParams[] = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
#include <mixer.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
// TODO: can these macros be shared between files? code_800F9280 seems to use
|
||||
|
@ -1258,11 +1258,11 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem);
|
|||
// Function originally not called, so repurposing for control mapping
|
||||
void Audio_OcaUpdateBtnMap(bool customControls, bool dpad, bool rStick) {
|
||||
if (customControls) {
|
||||
sOcarinaD5BtnMap = CVar_GetS32("gOcarinaD5BtnMap", BTN_CUP);
|
||||
sOcarinaB4BtnMap = CVar_GetS32("gOcarinaB4BtnMap", BTN_CLEFT);
|
||||
sOcarinaA4BtnMap = CVar_GetS32("gOcarinaA4BtnMap", BTN_CRIGHT);
|
||||
sOcarinaF4BtnMap = CVar_GetS32("gOcarinaF4BtnMap", BTN_CDOWN);
|
||||
sOcarinaD4BtnMap = CVar_GetS32("gOcarinaD4BtnMap", BTN_A);
|
||||
sOcarinaD5BtnMap = CVarGetInteger("gOcarinaD5BtnMap", BTN_CUP);
|
||||
sOcarinaB4BtnMap = CVarGetInteger("gOcarinaB4BtnMap", BTN_CLEFT);
|
||||
sOcarinaA4BtnMap = CVarGetInteger("gOcarinaA4BtnMap", BTN_CRIGHT);
|
||||
sOcarinaF4BtnMap = CVarGetInteger("gOcarinaF4BtnMap", BTN_CDOWN);
|
||||
sOcarinaD4BtnMap = CVarGetInteger("gOcarinaD4BtnMap", BTN_A);
|
||||
} else {
|
||||
sOcarinaD5BtnMap = BTN_CUP;
|
||||
sOcarinaB4BtnMap = BTN_CLEFT;
|
||||
|
@ -1539,8 +1539,8 @@ void func_800ED200(void) {
|
|||
u8 k;
|
||||
|
||||
u32 disableSongBtnMap;
|
||||
if (CVar_GetS32("gCustomOcarinaControls", 0)) {
|
||||
disableSongBtnMap = CVar_GetS32("gOcarinaDisableBtnMap", BTN_L);
|
||||
if (CVarGetInteger("gCustomOcarinaControls", 0)) {
|
||||
disableSongBtnMap = CVarGetInteger("gOcarinaDisableBtnMap", BTN_L);
|
||||
} else {
|
||||
disableSongBtnMap = BTN_L;
|
||||
}
|
||||
|
@ -1601,13 +1601,13 @@ void func_800ED200(void) {
|
|||
|
||||
void func_800ED458(s32 arg0) {
|
||||
u32 phi_v1_2;
|
||||
bool customControls = CVar_GetS32("gCustomOcarinaControls", 0);
|
||||
bool dpad = CVar_GetS32("gDpadOcarina", 0);
|
||||
bool rStick = CVar_GetS32("gRStickOcarina", 0);
|
||||
bool customControls = CVarGetInteger("gCustomOcarinaControls", 0);
|
||||
bool dpad = CVarGetInteger("gDpadOcarina", 0);
|
||||
bool rStick = CVarGetInteger("gRStickOcarina", 0);
|
||||
|
||||
if (D_80130F3C != 0 && sOcarinaDropInputTimer != 0) {
|
||||
sOcarinaDropInputTimer--;
|
||||
if (!CVar_GetS32("gDpadNoDropOcarinaInput", 0)) {
|
||||
if (!CVarGetInteger("gDpadNoDropOcarinaInput", 0)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1649,7 +1649,7 @@ void func_800ED458(s32 arg0) {
|
|||
|
||||
u32 noteSharpBtnMap;
|
||||
if (customControls) {
|
||||
noteSharpBtnMap = CVar_GetS32("gOcarinaSharpBtnMap", BTN_R);
|
||||
noteSharpBtnMap = CVarGetInteger("gOcarinaSharpBtnMap", BTN_R);
|
||||
} else {
|
||||
noteSharpBtnMap = BTN_R;
|
||||
}
|
||||
|
@ -1660,7 +1660,7 @@ void func_800ED458(s32 arg0) {
|
|||
|
||||
u32 noteFlatBtnMap;
|
||||
if (customControls) {
|
||||
noteFlatBtnMap = CVar_GetS32("gOcarinaFlatBtnMap", BTN_Z);
|
||||
noteFlatBtnMap = CVarGetInteger("gOcarinaFlatBtnMap", BTN_Z);
|
||||
} else {
|
||||
noteFlatBtnMap = BTN_Z;
|
||||
}
|
||||
|
@ -3987,7 +3987,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
|||
temp1 = NA_BGM_SMALL_ITEM_GET | 0x900;
|
||||
}
|
||||
// If the setting is toggled on and we get special quest items (longer fanfares):
|
||||
if (CVar_GetS32("gRandoQuestItemFanfares", 0) != 0) {
|
||||
if (CVarGetInteger("gRandoQuestItemFanfares", 0) != 0) {
|
||||
// If we get a medallion, play the "get a medallion" fanfare
|
||||
if ((itemId >= ITEM_MEDALLION_FOREST) && (itemId <= ITEM_MEDALLION_LIGHT)) {
|
||||
temp1 = NA_BGM_MEDALLION_GET | 0x900;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
#include <ultra64/abi.h>
|
||||
#include <mixer.h>
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
static PlayState* sPlayState;
|
||||
|
|
|
@ -161,7 +161,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
sLastButtonPressed = gameState->input[0].press.button | gameState->input[0].cur.button;
|
||||
if (R_DISABLE_INPUT_DISPLAY == 0 && CVar_GetS32("gDebugEnabled", 0)) {
|
||||
if (R_DISABLE_INPUT_DISPLAY == 0 && CVarGetInteger("gDebugEnabled", 0)) {
|
||||
GameState_DrawInputDisplay(sLastButtonPressed, &newDList);
|
||||
}
|
||||
|
||||
|
@ -333,21 +333,21 @@ void GameState_Update(GameState* gameState) {
|
|||
// -----------------------
|
||||
|
||||
// Inf Money
|
||||
if (CVar_GetS32("gInfiniteMoney", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteMoney", 0) != 0) {
|
||||
if (gSaveContext.rupees < CUR_CAPACITY(UPG_WALLET)) {
|
||||
gSaveContext.rupees = CUR_CAPACITY(UPG_WALLET);
|
||||
}
|
||||
}
|
||||
|
||||
// Inf Health
|
||||
if (CVar_GetS32("gInfiniteHealth", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteHealth", 0) != 0) {
|
||||
if (gSaveContext.health < gSaveContext.healthCapacity) {
|
||||
gSaveContext.health = gSaveContext.healthCapacity;
|
||||
}
|
||||
}
|
||||
|
||||
// Inf Ammo
|
||||
if (CVar_GetS32("gInfiniteAmmo", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteAmmo", 0) != 0) {
|
||||
// Deku Sticks
|
||||
if (AMMO(ITEM_STICK) < CUR_CAPACITY(UPG_STICKS)) {
|
||||
AMMO(ITEM_STICK) = CUR_CAPACITY(UPG_STICKS);
|
||||
|
@ -380,19 +380,19 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
|
||||
// Inf Magic
|
||||
if (CVar_GetS32("gInfiniteMagic", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteMagic", 0) != 0) {
|
||||
if (gSaveContext.isMagicAcquired && gSaveContext.magic != (gSaveContext.isDoubleMagicAcquired + 1) * 0x30) {
|
||||
gSaveContext.magic = (gSaveContext.isDoubleMagicAcquired + 1) * 0x30;
|
||||
}
|
||||
}
|
||||
|
||||
// Inf Nayru's Love Timer
|
||||
if (CVar_GetS32("gInfiniteNayru", 0) != 0) {
|
||||
if (CVarGetInteger("gInfiniteNayru", 0) != 0) {
|
||||
gSaveContext.nayrusLoveTimer = 0x44B;
|
||||
}
|
||||
|
||||
// Moon Jump On L
|
||||
if (CVar_GetS32("gMoonJumpOnL", 0) != 0) {
|
||||
if (CVarGetInteger("gMoonJumpOnL", 0) != 0) {
|
||||
if (gPlayState) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
|
||||
|
@ -403,7 +403,7 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
|
||||
// Permanent infinite sword glitch (ISG)
|
||||
if (CVar_GetS32("gEzISG", 0) != 0) {
|
||||
if (CVarGetInteger("gEzISG", 0) != 0) {
|
||||
if (gPlayState) {
|
||||
Player* player = GET_PLAYER(gPlayState);
|
||||
player->swordState = 1;
|
||||
|
@ -411,7 +411,7 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
|
||||
// Unrestricted Items
|
||||
if (CVar_GetS32("gNoRestrictItems", 0) != 0) {
|
||||
if (CVarGetInteger("gNoRestrictItems", 0) != 0) {
|
||||
if (gPlayState) {
|
||||
u8 sunsBackup = gPlayState->interfaceCtx.restrictions.sunsSong;
|
||||
memset(&gPlayState->interfaceCtx.restrictions, 0, sizeof(gPlayState->interfaceCtx.restrictions));
|
||||
|
@ -420,20 +420,20 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
|
||||
// Freeze Time
|
||||
if (CVar_GetS32("gFreezeTime", 0) != 0) {
|
||||
if (CVar_GetS32("gPrevTime", -1) == -1) {
|
||||
CVar_SetS32("gPrevTime", gSaveContext.dayTime);
|
||||
if (CVarGetInteger("gFreezeTime", 0) != 0) {
|
||||
if (CVarGetInteger("gPrevTime", -1) == -1) {
|
||||
CVarSetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
}
|
||||
|
||||
int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime);
|
||||
int32_t prevTime = CVarGetInteger("gPrevTime", gSaveContext.dayTime);
|
||||
gSaveContext.dayTime = prevTime;
|
||||
} else {
|
||||
CVar_SetS32("gPrevTime", -1);
|
||||
CVarSetInteger("gPrevTime", -1);
|
||||
}
|
||||
|
||||
//Switches Link's age and respawns him at the last entrance he entered.
|
||||
if (CVar_GetS32("gSwitchAge", 0) != 0) {
|
||||
CVar_SetS32("gSwitchAge", 0);
|
||||
if (CVarGetInteger("gSwitchAge", 0) != 0) {
|
||||
CVarSetInteger("gSwitchAge", 0);
|
||||
if (gPlayState) {
|
||||
playerPos = GET_PLAYER(gPlayState)->actor.world.pos;
|
||||
playerYaw = GET_PLAYER(gPlayState)->actor.shape.rot.y;
|
||||
|
@ -458,7 +458,7 @@ void GameState_Update(GameState* gameState) {
|
|||
}
|
||||
}
|
||||
|
||||
gSaveContext.language = CVar_GetS32("gLanguages", LANGUAGE_ENG);
|
||||
gSaveContext.language = CVarGetInteger("gLanguages", LANGUAGE_ENG);
|
||||
|
||||
gameState->frames++;
|
||||
}
|
||||
|
|
|
@ -395,7 +395,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
|
|||
sGraphUpdateTime = time;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gDebugEnabled", 0))
|
||||
if (CVarGetInteger("gDebugEnabled", 0))
|
||||
{
|
||||
if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) &&
|
||||
CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) {
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
#include <soh/Enhancements/bootcommands.h>
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
#include <CrashHandler.h>
|
||||
#include <libultraship/bridge.h>
|
||||
#include "soh/CrashHandlerExp.h"
|
||||
|
||||
|
||||
|
@ -45,10 +49,10 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmd
|
|||
int main(int argc, char** argv)
|
||||
#endif
|
||||
{
|
||||
CrashHandler_Init(CrashHandler_PrintSohData);
|
||||
|
||||
GameConsole_Init();
|
||||
InitOTR();
|
||||
// TODO: Was moved to below InitOTR because it requires window to be setup. But will be late to catch crashes.
|
||||
CrashHandlerRegisterCallback(CrashHandler_PrintSohData);
|
||||
BootCommands_Init();
|
||||
|
||||
Main(0);
|
||||
|
|
|
@ -309,7 +309,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
|||
}
|
||||
|
||||
OTRControllerCallback(&controllerCallback);
|
||||
if (CVar_GetS32("gPauseBufferBlockInputFrame", 0)) {
|
||||
if (CVarGetInteger("gPauseBufferBlockInputFrame", 0)) {
|
||||
Controller_BlockGameInput();
|
||||
} else {
|
||||
Controller_UnblockGameInput();
|
||||
|
|
|
@ -6,7 +6,7 @@ s32 sShrinkWindowVal = 0;
|
|||
s32 sShrinkWindowCurrentVal = 0;
|
||||
|
||||
void ShrinkWindow_SetVal(s32 value) {
|
||||
if (CVar_GetS32("gDisableBlackBars", 0)) {
|
||||
if (CVarGetInteger("gDisableBlackBars", 0)) {
|
||||
sShrinkWindowVal = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ u32 ShrinkWindow_GetVal(void) {
|
|||
}
|
||||
|
||||
void ShrinkWindow_SetCurrentVal(s32 currentVal) {
|
||||
if (CVar_GetS32("gDisableBlackBars", 0)) {
|
||||
if (CVarGetInteger("gDisableBlackBars", 0)) {
|
||||
sShrinkWindowCurrentVal = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -347,50 +347,50 @@ void func_8002BE98(TargetContext* targetCtx, s32 actorCategory, PlayState* play)
|
|||
}
|
||||
|
||||
void func_8002BF60(TargetContext* targetCtx, Actor* actor, s32 actorCategory, PlayState* play) {
|
||||
if (CVar_GetS32("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = CVar_GetRGBA("gCosmetics.Navi_IdlePrimary.Value", defaultIdlePrimaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_IdlePrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = CVarGetColor("gCosmetics.Navi_IdlePrimary.Value", defaultIdlePrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PLAYER].inner = defaultIdlePrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_IdleSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = CVar_GetRGBA("gCosmetics.Navi_IdleSecondary.Value", defaultIdleSecondaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_IdleSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = CVarGetColor("gCosmetics.Navi_IdleSecondary.Value", defaultIdleSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PLAYER].outer = defaultIdleSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = CVar_GetRGBA("gCosmetics.Navi_NPCPrimary.Value", defaultNPCPrimaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_NPCPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = CVarGetColor("gCosmetics.Navi_NPCPrimary.Value", defaultNPCPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].inner = defaultNPCPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_NPCSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = CVar_GetRGBA("gCosmetics.Navi_NPCSecondary.Value", defaultNPCSecondaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_NPCSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = CVarGetColor("gCosmetics.Navi_NPCSecondary.Value", defaultNPCSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_NPC].outer = defaultNPCSecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = CVar_GetRGBA("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = CVar_GetRGBA("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_EnemyPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = CVarGetColor("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = CVarGetColor("gCosmetics.Navi_EnemyPrimary.Value", defaultEnemyPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].inner = defaultEnemyPrimaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].inner = defaultEnemyPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_EnemySecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = CVar_GetRGBA("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = CVar_GetRGBA("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_EnemySecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = CVarGetColor("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = CVarGetColor("gCosmetics.Navi_EnemySecondary.Value", defaultEnemySecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_ENEMY].outer = defaultEnemySecondaryColor;
|
||||
sNaviColorList[ACTORCAT_BOSS].outer = defaultEnemySecondaryColor;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = CVar_GetRGBA("gCosmetics.Navi_PropsPrimary.Value", defaultPropsPrimaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_PropsPrimary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = CVarGetColor("gCosmetics.Navi_PropsPrimary.Value", defaultPropsPrimaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].inner = defaultPropsPrimaryColor;
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Navi_PropsSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = CVar_GetRGBA("gCosmetics.Navi_PropsSecondary.Value", defaultPropsSecondaryColor);
|
||||
if (CVarGetInteger("gCosmetics.Navi_PropsSecondary.Changed", 0)) {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = CVarGetColor("gCosmetics.Navi_PropsSecondary.Value", defaultPropsSecondaryColor);
|
||||
} else {
|
||||
sNaviColorList[ACTORCAT_PROP].outer = defaultPropsSecondaryColor;
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ void TitleCard_InitBossName(PlayState* play, TitleCardContext* titleCtx, void* t
|
|||
u8 height, s16 hasTranslation) {
|
||||
|
||||
if (ResourceMgr_OTRSigCheck(texture))
|
||||
texture = ResourceMgr_LoadTexByName(texture);
|
||||
texture = GetResourceDataByName(texture, false);
|
||||
|
||||
titleCtx->texture = texture;
|
||||
titleCtx->isBossCard = true;
|
||||
|
@ -1019,7 +1019,7 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
|
|||
texture = newName;
|
||||
}
|
||||
|
||||
titleCtx->texture = ResourceMgr_LoadTexByName(texture);
|
||||
titleCtx->texture = GetResourceDataByName(texture, false);
|
||||
|
||||
//titleCtx->texture = texture;
|
||||
titleCtx->isBossCard = false;
|
||||
|
@ -1035,10 +1035,10 @@ 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 && CVar_GetS32("gHudColors", 1) == 2) {//Bosses cards.
|
||||
TitleCard_Colors = CVar_GetRGB("gCCTC_B_U_Prim", TitleCard_Colors_ori);
|
||||
} else if (!titleCtx->isBossCard && CVar_GetS32("gHudColors", 1) == 2) {
|
||||
TitleCard_Colors = CVar_GetRGB("gCCTC_OW_U_Prim", TitleCard_Colors_ori);
|
||||
if (titleCtx->isBossCard && CVarGetInteger("gHudColors", 1) == 2) {//Bosses cards.
|
||||
TitleCard_Colors = CVarGetColor24("gCCTC_B_U_Prim", TitleCard_Colors_ori);
|
||||
} else if (!titleCtx->isBossCard && CVarGetInteger("gHudColors", 1) == 2) {
|
||||
TitleCard_Colors = CVarGetColor24("gCCTC_OW_U_Prim", TitleCard_Colors_ori);
|
||||
} else {
|
||||
TitleCard_Colors = TitleCard_Colors_ori;
|
||||
}
|
||||
|
@ -1073,20 +1073,20 @@ void TitleCard_Draw(PlayState* play, TitleCardContext* titleCtx) {
|
|||
if (titleCtx->alpha != 0) {
|
||||
width = titleCtx->width;
|
||||
height = titleCtx->height;
|
||||
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosX", 0) : CVar_GetS32("gTCMPosX", 0));
|
||||
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosY", 0) : CVar_GetS32("gTCMPosY", 0));
|
||||
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosType", 0) : CVar_GetS32("gTCMPosType", 0));
|
||||
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVar_GetS32("gTCBUseMargins", 0) : CVar_GetS32("gTCMUseMargins", 0));
|
||||
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosX", 0) : CVarGetInteger("gTCMPosX", 0));
|
||||
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosY", 0) : CVarGetInteger("gTCMPosY", 0));
|
||||
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVarGetInteger("gTCBPosType", 0) : CVarGetInteger("gTCMPosType", 0));
|
||||
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVarGetInteger("gTCBUseMargins", 0) : CVarGetInteger("gTCMUseMargins", 0));
|
||||
s16 TitleCard_MarginX = 0;
|
||||
s16 TitleCard_PosX = titleCtx->x;
|
||||
s16 TitleCard_PosY = titleCtx->y;
|
||||
if (TitleCard_PosType_Checker != 0) {
|
||||
TitleCard_PosY = TitleCard_PosY_Modifier;
|
||||
if (TitleCard_PosType_Checker == 1) {//Anchor Left
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVar_GetS32("gHUDMargin_L", 0)*-1;};
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger("gHUDMargin_L", 0)*-1;};
|
||||
TitleCard_PosX = OTRGetDimensionFromLeftEdge(TitleCard_PosX_Modifier+TitleCard_MarginX)-11;
|
||||
} else if (TitleCard_PosType_Checker == 2) {//Anchor Right
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVar_GetS32("gHUDMargin_R", 0);};
|
||||
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVarGetInteger("gHUDMargin_R", 0);};
|
||||
TitleCard_PosX = OTRGetDimensionFromRightEdge(TitleCard_PosX_Modifier+TitleCard_MarginX);
|
||||
} else if (TitleCard_PosType_Checker == 3) {//Anchor None
|
||||
TitleCard_PosX = TitleCard_PosX_Modifier;
|
||||
|
@ -1212,7 +1212,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
|
|||
actor->uncullZoneForward = 1000.0f;
|
||||
actor->uncullZoneScale = 350.0f;
|
||||
actor->uncullZoneDownward = 700.0f;
|
||||
if (CVar_GetS32("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
|
||||
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
|
||||
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
|
||||
&& (play->sceneNum != SCENE_DDAN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
|
||||
|
@ -2855,7 +2855,7 @@ s32 func_800314B0(PlayState* play, Actor* actor) {
|
|||
s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
|
||||
f32 var;
|
||||
|
||||
if (CVar_GetS32("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) != 0 && actor->id != ACTOR_EN_TORCH2 && actor->id != ACTOR_EN_BLKOBJ // Extra check for Dark Link and his room
|
||||
&& actor->id != ACTOR_EN_HORSE // Check for Epona, else if we call her she will spawn at the other side of the map + we can hear her during the title screen sequence
|
||||
&& actor->id != ACTOR_EN_HORSE_GANON && actor->id != ACTOR_EN_HORSE_ZELDA // check for Zelda's and Ganondorf's horses that will always be scene during cinematic whith camera paning
|
||||
&& (play->sceneNum != SCENE_DDAN && actor->id != ACTOR_EN_ZF)) { // Check for DC and Lizalfos for the case where the miniboss music would still play under certains conditions and changing room
|
||||
|
@ -3160,7 +3160,7 @@ int gMapLoading = 0;
|
|||
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
|
||||
s16 rotX, s16 rotY, s16 rotZ, s16 params, s16 canRandomize) {
|
||||
|
||||
uint8_t tryRandomizeEnemy = CVar_GetS32("gRandomizedEnemies", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
|
||||
uint8_t tryRandomizeEnemy = CVarGetInteger("gRandomizedEnemies", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2 && canRandomize;
|
||||
|
||||
if (tryRandomizeEnemy) {
|
||||
if (!GetRandomizedEnemy(play, &actorId, &posX, &posY, &posZ, &rotX, &rotY, &rotZ, ¶ms)) {
|
||||
|
@ -3252,7 +3252,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 pos
|
|||
|
||||
objBankIndex = Object_GetIndex(&play->objectCtx, actorInit->objectId);
|
||||
|
||||
if (objBankIndex < 0 && (!gMapLoading || CVar_GetS32("gRandomizedEnemies", 0))) {
|
||||
if (objBankIndex < 0 && (!gMapLoading || CVarGetInteger("gRandomizedEnemies", 0))) {
|
||||
objBankIndex = 0;
|
||||
}
|
||||
|
||||
|
@ -3331,7 +3331,7 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
|
|||
// Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
|
||||
// Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
|
||||
// Enemy Rando is on so they still work properly even without assigning a parent.
|
||||
if (CVar_GetS32("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
|
||||
return spawnedActor;
|
||||
}
|
||||
|
||||
|
|
|
@ -1898,7 +1898,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
|
|||
s32 bgId2;
|
||||
f32 nx, ny, nz; // unit normal of polygon
|
||||
|
||||
if (CVar_GetS32("gNoClip", 0) != 0) {
|
||||
if (CVarGetInteger("gNoClip", 0) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4021,7 +4021,7 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
|||
* SurfaceType Get Wall Flags
|
||||
*/
|
||||
s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
if (CVar_GetS32("gClimbEverything", 0) != 0) {
|
||||
if (CVarGetInteger("gClimbEverything", 0) != 0) {
|
||||
return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)];
|
||||
} else {
|
||||
return D_80119D90[func_80041D94(colCtx, poly, bgId)];
|
||||
|
@ -4118,7 +4118,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId)
|
|||
* SurfaceType Is Hookshot Surface
|
||||
*/
|
||||
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
return CVar_GetS32("gHookshotEverything", 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
|
||||
return CVarGetInteger("gHookshotEverything", 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
#include "vt.h"
|
||||
|
||||
|
@ -1239,7 +1239,7 @@ f32 Camera_LERPClampDist(Camera* camera, f32 dist, f32 min, f32 max) {
|
|||
|
||||
camera->rUpdateRateInv = Camera_LERPCeilF(rUpdateRateInvTarget, camera->rUpdateRateInv, PCT(OREG(25)), 0.1f);
|
||||
return Camera_LERPCeilF(distTarget, camera->dist, 1.0f / camera->rUpdateRateInv,
|
||||
CVar_GetS32("gFixCameraDrift", 0) ? 0.0f : 0.2f);
|
||||
CVarGetInteger("gFixCameraDrift", 0) ? 0.0f : 0.2f);
|
||||
}
|
||||
|
||||
f32 Camera_ClampDist(Camera* camera, f32 dist, f32 minDist, f32 maxDist, s16 timer) {
|
||||
|
@ -1262,7 +1262,7 @@ f32 Camera_ClampDist(Camera* camera, f32 dist, f32 minDist, f32 maxDist, s16 tim
|
|||
|
||||
camera->rUpdateRateInv = Camera_LERPCeilF(rUpdateRateInvTarget, camera->rUpdateRateInv, PCT(OREG(25)), 0.1f);
|
||||
return Camera_LERPCeilF(distTarget, camera->dist, 1.0f / camera->rUpdateRateInv,
|
||||
CVar_GetS32("gFixCameraDrift", 0) ? 0.0f : 0.2f);
|
||||
CVarGetInteger("gFixCameraDrift", 0) ? 0.0f : 0.2f);
|
||||
}
|
||||
|
||||
s16 Camera_CalcDefaultPitch(Camera* camera, s16 arg1, s16 arg2, s16 arg3) {
|
||||
|
@ -1485,11 +1485,11 @@ s32 Camera_Free(Camera* camera) {
|
|||
|
||||
camera->animState = 0;
|
||||
|
||||
f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f * (CVar_GetFloat("gThirdPersonCameraSensitivity", 1.0f));
|
||||
f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f * (CVar_GetFloat("gThirdPersonCameraSensitivity", 1.0f));
|
||||
f32 newCamX = -D_8015BD7C->state.input[0].cur.right_stick_x * 10.0f * (CVarGetFloat("gThirdPersonCameraSensitivity", 1.0f));
|
||||
f32 newCamY = D_8015BD7C->state.input[0].cur.right_stick_y * 10.0f * (CVarGetFloat("gThirdPersonCameraSensitivity", 1.0f));
|
||||
|
||||
camera->play->camX += newCamX * (CVar_GetS32("gInvertXAxis", 0) ? -1 : 1);
|
||||
camera->play->camY += newCamY * (CVar_GetS32("gInvertYAxis", 1) ? 1 : -1);
|
||||
camera->play->camX += newCamX * (CVarGetInteger("gInvertXAxis", 0) ? -1 : 1);
|
||||
camera->play->camY += newCamY * (CVarGetInteger("gInvertYAxis", 1) ? 1 : -1);
|
||||
|
||||
if (camera->play->camY > 0x32A4) {
|
||||
camera->play->camY = 0x32A4;
|
||||
|
@ -1498,8 +1498,8 @@ s32 Camera_Free(Camera* camera) {
|
|||
camera->play->camY = -0x228C;
|
||||
}
|
||||
|
||||
f32 distTarget = CVar_GetS32("gFreeCameraDistMax", para1->distTarget);
|
||||
f32 speedScaler = CVar_GetS32("gFreeCameraTransitionSpeed", 25);
|
||||
f32 distTarget = CVarGetInteger("gFreeCameraDistMax", para1->distTarget);
|
||||
f32 speedScaler = CVarGetInteger("gFreeCameraTransitionSpeed", 25);
|
||||
f32 distDiff = ABS(distTarget - camera->dist);
|
||||
if (distDiff > 0)
|
||||
camera->dist = Camera_LERPCeilF(distTarget, camera->dist, speedScaler / (distDiff + speedScaler), 0.0f);
|
||||
|
@ -1523,7 +1523,7 @@ s32 Camera_Free(Camera* camera) {
|
|||
}
|
||||
|
||||
s32 Camera_Normal1(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1704,7 +1704,7 @@ s32 Camera_Normal1(Camera* camera) {
|
|||
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeAdjustment);
|
||||
if ((camera->status == CAM_STAT_ACTIVE) && (!(norm1->interfaceFlags & 0x10))) {
|
||||
anim->swingYawTarget = BINANG_ROT180(camera->playerPosRot.rot.y);
|
||||
if (!CVar_GetS32("gFixCameraSwing", 0)) {
|
||||
if (!CVarGetInteger("gFixCameraSwing", 0)) {
|
||||
if (anim->startSwingTimer > 0) {
|
||||
func_80046E20(camera, &eyeAdjustment, norm1->distMin, norm1->unk_0C, &sp98, &anim->swing);
|
||||
} else {
|
||||
|
@ -1743,7 +1743,7 @@ s32 Camera_Normal1(Camera* camera) {
|
|||
}
|
||||
|
||||
// crit wiggle
|
||||
if(!CVar_GetS32("gDisableCritWiggle",0)) {
|
||||
if(!CVarGetInteger("gDisableCritWiggle",0)) {
|
||||
if (gSaveContext.health <= 16 && ((camera->play->state.frames % 256) == 0)) {
|
||||
wiggleAdj = Rand_ZeroOne() * 10000.0f;
|
||||
camera->inputDir.y = wiggleAdj + camera->inputDir.y;
|
||||
|
@ -1764,7 +1764,7 @@ s32 Camera_Normal1(Camera* camera) {
|
|||
}
|
||||
|
||||
s32 Camera_Normal2(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1935,7 +1935,7 @@ s32 Camera_Normal2(Camera* camera) {
|
|||
|
||||
// riding epona
|
||||
s32 Camera_Normal3(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -2301,7 +2301,7 @@ s32 Camera_Parallel0(Camera* camera) {
|
|||
* Generic jump, jumping off ledges
|
||||
*/
|
||||
s32 Camera_Jump1(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -2451,7 +2451,7 @@ s32 Camera_Jump1(Camera* camera) {
|
|||
|
||||
// Climbing ladders/vines
|
||||
s32 Camera_Jump2(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -2638,7 +2638,7 @@ s32 Camera_Jump2(Camera* camera) {
|
|||
|
||||
// swimming
|
||||
s32 Camera_Jump3(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -3100,7 +3100,7 @@ s32 Camera_Battle3(Camera* camera) {
|
|||
* setting value.
|
||||
*/
|
||||
s32 Camera_Battle4(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -4635,7 +4635,7 @@ s32 Camera_Data4(Camera* camera) {
|
|||
* Hanging off of a ledge
|
||||
*/
|
||||
s32 Camera_Unique1(Camera* camera) {
|
||||
if (CVar_GetS32("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && SetCameraManual(camera) == 1) {
|
||||
Camera_Free(camera);
|
||||
return 1;
|
||||
}
|
||||
|
@ -4722,7 +4722,7 @@ s32 Camera_Unique1(Camera* camera) {
|
|||
anim->timer--;
|
||||
}
|
||||
|
||||
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f, CVar_GetS32("gFixHangingLedgeSwingRate", 0) ? 0xA : 0x2710);
|
||||
sp8C.yaw = Camera_LERPFloorS(anim->yawTarget, eyeNextAtOffset.yaw, 0.5f, CVarGetInteger("gFixHangingLedgeSwingRate", 0) ? 0xA : 0x2710);
|
||||
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &sp8C);
|
||||
*eye = *eyeNext;
|
||||
Camera_BGCheck(camera, at, eye);
|
||||
|
@ -7615,7 +7615,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
}
|
||||
|
||||
// enable/disable debug cam
|
||||
if (CVar_GetS32("gDebugCamera", 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
if (CVarGetInteger("gDebugCamera", 0) && CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
|
||||
gDbgCamEnabled ^= 1;
|
||||
if (gDbgCamEnabled) {
|
||||
DbgCamera_Enable(&D_8015BD80, camera);
|
||||
|
@ -7697,7 +7697,7 @@ Vec3s Camera_Update(Camera* camera) {
|
|||
BINANG_TO_DEGF(camera->camDir.x), camera->camDir.y, BINANG_TO_DEGF(camera->camDir.y));
|
||||
}
|
||||
|
||||
if (camera->timer != -1 && CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_DRIGHT) && CVar_GetS32("gDebugCamera", 0)) {
|
||||
if (camera->timer != -1 && CHECK_BTN_ALL(D_8015BD7C->state.input[0].press.button, BTN_DRIGHT) && CVarGetInteger("gDebugCamera", 0)) {
|
||||
camera->timer = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -8,7 +8,7 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
|
||||
gSaveContext.natureAmbienceId = NATURE_ID_DISABLED;
|
||||
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
|
||||
gSaveContext.nextCutsceneIndex = CVar_GetS32("gBetaQuestWorld", 0xFFEF);
|
||||
gSaveContext.nextCutsceneIndex = CVarGetInteger("gBetaQuestWorld", 0xFFEF);
|
||||
gSaveContext.cutsceneTrigger = 0;
|
||||
gSaveContext.chamberCutsceneNum = 0;
|
||||
gSaveContext.nextDayTime = 0xFFFF;
|
||||
|
|
|
@ -48,11 +48,11 @@ void func_801109B0(PlayState* play) {
|
|||
|
||||
ASSERT(interfaceCtx->doActionSegment != NULL);
|
||||
|
||||
uint32_t attackDoActionTexSize = ResourceMgr_LoadTexSizeByName(gAttackDoActionENGTex);
|
||||
memcpy(interfaceCtx->doActionSegment, ResourceMgr_LoadTexByName(gAttackDoActionENGTex), attackDoActionTexSize);
|
||||
memcpy(interfaceCtx->doActionSegment + (attackDoActionTexSize / 2), ResourceMgr_LoadTexByName(gCheckDoActionENGTex), attackDoActionTexSize);
|
||||
uint32_t attackDoActionTexSize = GetResourceTexSizeByName(gAttackDoActionENGTex, false);
|
||||
memcpy(interfaceCtx->doActionSegment, GetResourceDataByName(gAttackDoActionENGTex, false), attackDoActionTexSize);
|
||||
memcpy(interfaceCtx->doActionSegment + (attackDoActionTexSize / 2), GetResourceDataByName(gCheckDoActionENGTex, false), attackDoActionTexSize);
|
||||
|
||||
memcpy(interfaceCtx->doActionSegment + attackDoActionTexSize, ResourceMgr_LoadTexByName(gReturnDoActionENGTex), ResourceMgr_LoadTexSizeByName(gReturnDoActionENGTex));
|
||||
memcpy(interfaceCtx->doActionSegment + attackDoActionTexSize, GetResourceDataByName(gReturnDoActionENGTex, false), GetResourceTexSizeByName(gReturnDoActionENGTex, false));
|
||||
|
||||
interfaceCtx->iconItemSegment = GAMESTATE_ALLOC_MC(
|
||||
&play->state, 0x1000 * ARRAY_COUNT(gSaveContext.equips.buttonItems));
|
||||
|
@ -431,7 +431,7 @@ void func_80111070(void) {
|
|||
WREG(28) = 0;
|
||||
R_OW_MINIMAP_X = 238;
|
||||
R_OW_MINIMAP_Y = 164;
|
||||
R_MINIMAP_DISABLED = CVar_GetS32("gMinimalUI", 0);
|
||||
R_MINIMAP_DISABLED = CVarGetInteger("gMinimalUI", 0);
|
||||
WREG(32) = 122;
|
||||
WREG(33) = 60;
|
||||
WREG(35) = 0;
|
||||
|
|
|
@ -109,7 +109,7 @@ void func_8006390C(Input* input) {
|
|||
InputCombo* input_combo;
|
||||
s32 i;
|
||||
|
||||
if (!CVar_GetS32("gDebugEnabled", 0))
|
||||
if (!CVarGetInteger("gDebugEnabled", 0))
|
||||
return;
|
||||
|
||||
regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE;
|
||||
|
@ -192,7 +192,7 @@ void func_80063C04(GfxPrint* printer) {
|
|||
s32 pad;
|
||||
char name[3];
|
||||
|
||||
if (!CVar_GetS32("gDebugEnabled", 0))
|
||||
if (!CVarGetInteger("gDebugEnabled", 0))
|
||||
return;
|
||||
|
||||
// set up register name string
|
||||
|
@ -219,7 +219,7 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
|
|||
GfxPrint printer;
|
||||
Gfx* tempRet;
|
||||
|
||||
if (!CVar_GetS32("gDebugEnabled", 0))
|
||||
if (!CVarGetInteger("gDebugEnabled", 0))
|
||||
return;
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
|
|
@ -499,7 +499,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
// cmd->base == 33: Zelda escaping with impa cutscene
|
||||
bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
|
||||
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && CVar_GetS32("gDebugEnabled", 0));
|
||||
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
|
||||
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (play->sceneNum != SCENE_SPOT00) &&
|
||||
(csCtx->frames > 20) &&
|
||||
|
@ -512,9 +512,9 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
}
|
||||
|
||||
bool playCutscene = false;
|
||||
if (!CVar_GetS32("gCreditsFix", 1) && (cmd->startFrame == csCtx->frames)) {
|
||||
if (!CVarGetInteger("gCreditsFix", 1) && (cmd->startFrame == csCtx->frames)) {
|
||||
playCutscene = true;
|
||||
} else if (CVar_GetS32("gCreditsFix", 1)) {
|
||||
} else if (CVarGetInteger("gCreditsFix", 1)) {
|
||||
u16 delay = 0;
|
||||
|
||||
// HACK: Align visual timing with audio during credits sequence
|
||||
|
@ -1637,7 +1637,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc
|
|||
return;
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gDebugEnabled", 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
if (CVarGetInteger("gDebugEnabled", 0) && CHECK_BTN_ALL(play->state.input[0].press.button, BTN_DRIGHT)) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -757,13 +757,13 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
|
|||
1 * -(play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", (Color_RGB8) { 255, 70, 50 });
|
||||
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", (Color_RGB8) { 255, 70, 50 });
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
}
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
gSPGrayscale(POLY_XLU_DISP++, false);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
|
|
|
@ -206,14 +206,14 @@ s32 EffectBlure_Update(void* thisx) {
|
|||
|
||||
switch (this->trailType) { //there HAS to be a better way to do this.
|
||||
case 2:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Boomerang.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Boomerang.Value", (Color_RGBA8){ 255, 255, 100, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_Boomerang.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_Boomerang.Value", (Color_RGBA8){ 255, 255, 100, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Bombchu.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Bombchu.Value", (Color_RGBA8){ 250, 0, 0, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_Bombchu.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_Bombchu.Value", (Color_RGBA8){ 250, 0, 0, 255 });
|
||||
this->p1StartColor.r = color.r;
|
||||
this->p2StartColor.r = color.r * 0.8f;
|
||||
this->p1EndColor.r = color.r * 0.6f;
|
||||
|
@ -229,32 +229,32 @@ s32 EffectBlure_Update(void* thisx) {
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if (CVar_GetS32("gCosmetics.Trails_KokiriSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_KokiriSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_KokiriSword.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_KokiriSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (CVar_GetS32("gCosmetics.Trails_MasterSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_MasterSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_MasterSword.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_MasterSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (CVar_GetS32("gCosmetics.Trails_BiggoronSword.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_BiggoronSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_BiggoronSword.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_BiggoronSword.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Stick.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Stick.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_Stick.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_Stick.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (CVar_GetS32("gCosmetics.Trails_Hammer.Changed", 0)) {
|
||||
color = CVar_GetRGBA("gCosmetics.Trails_Hammer.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Trails_Hammer.Changed", 0)) {
|
||||
color = CVarGetColor("gCosmetics.Trails_Hammer.Value", (Color_RGBA8){ 255, 255, 255, 255 });
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
|
@ -280,8 +280,8 @@ s32 EffectBlure_Update(void* thisx) {
|
|||
|
||||
// Don't override boomerang and bombchu trail durations
|
||||
if (this->trailType != 2 && this->trailType != 3) {
|
||||
if (CVar_GetS32("gCosmetics.Trails_Duration.Changed", 0)) {
|
||||
this->elemDuration = CVar_GetS32("gCosmetics.Trails_Duration.Value", 4);
|
||||
if (CVarGetInteger("gCosmetics.Trails_Duration.Changed", 0)) {
|
||||
this->elemDuration = CVarGetInteger("gCosmetics.Trails_Duration.Value", 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
|
|||
void EnItem00_SetObjectDependency(EnItem00* this, PlayState* play, s16 objectIndex) {
|
||||
// Remove object dependency for Enemy Randomizer and Crowd Control to allow Like-likes to
|
||||
// drop equipment correctly in rooms where Like-likes normally don't spawn.
|
||||
if (CVar_GetS32("gRandomizedEnemies", 0) || CVar_GetS32("gCrowdControl", 0)) {
|
||||
if (CVarGetInteger("gRandomizedEnemies", 0) || CVarGetInteger("gCrowdControl", 0)) {
|
||||
this->actor.objBankIndex = 0;
|
||||
} else {
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, objectIndex);
|
||||
|
@ -552,7 +552,7 @@ void EnItem00_Destroy(Actor* thisx, PlayState* play) {
|
|||
|
||||
void func_8001DFC8(EnItem00* this, PlayState* play) {
|
||||
|
||||
if (!CVar_GetS32("gNewDrops", 0)){
|
||||
if (!CVarGetInteger("gNewDrops", 0)){
|
||||
if ((this->actor.params <= ITEM00_RUPEE_RED) || ((this->actor.params == ITEM00_HEART) && (this->unk_15A < 0)) ||
|
||||
(this->actor.params == ITEM00_HEART_PIECE)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
|
@ -576,7 +576,7 @@ void func_8001DFC8(EnItem00* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->actor.params == ITEM00_HEART_PIECE) {
|
||||
if (CVar_GetS32("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 20.0f + 50.0f;
|
||||
} else {
|
||||
this->actor.shape.yOffset = Math_SinS(this->actor.shape.rot.y) * 150.0f + 850.0f;
|
||||
|
@ -613,7 +613,7 @@ void func_8001E1C8(EnItem00* this, PlayState* play) {
|
|||
f32 originalVelocity;
|
||||
Vec3f effectPos;
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED && !CVar_GetS32("gNewDrops", 0)) {
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED && !CVarGetInteger("gNewDrops", 0)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
}
|
||||
|
||||
|
@ -715,9 +715,9 @@ void func_8001E5C8(EnItem00* this, PlayState* play) {
|
|||
|
||||
this->actor.world.pos = player->actor.world.pos;
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED && !CVar_GetS32("gNewDrops", 0)) {
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED && !CVarGetInteger("gNewDrops", 0)) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
} else if (this->actor.params == ITEM00_HEART && !CVar_GetS32("gNewDrops", 0)) {
|
||||
} else if (this->actor.params == ITEM00_HEART && !CVarGetInteger("gNewDrops", 0)) {
|
||||
this->actor.shape.rot.y = 0;
|
||||
}
|
||||
|
||||
|
@ -742,7 +742,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
|
||||
// OTRTODO: remove special case for bombchu when its 2D drop is implemented
|
||||
if (CVar_GetS32("gNewDrops", 0) || this->actor.params == ITEM00_BOMBCHU) { //set the rotation system on selected model only :)
|
||||
if (CVarGetInteger("gNewDrops", 0) || this->actor.params == ITEM00_BOMBCHU) { //set the rotation system on selected model only :)
|
||||
if ((this->actor.params == ITEM00_RUPEE_GREEN) || (this->actor.params == ITEM00_RUPEE_BLUE) ||
|
||||
(this->actor.params == ITEM00_RUPEE_RED) || (this->actor.params == ITEM00_ARROWS_SINGLE) ||
|
||||
(this->actor.params == ITEM00_ARROWS_SMALL) || (this->actor.params == ITEM00_ARROWS_MEDIUM) ||
|
||||
|
@ -761,7 +761,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->unk_15A > 0) {
|
||||
this->unk_15A--;
|
||||
if (CVar_GetS32("gDropsDontDie", 0) && (this->unk_154 <= 0)) {
|
||||
if (CVarGetInteger("gDropsDontDie", 0) && (this->unk_154 <= 0)) {
|
||||
this->unk_15A++;
|
||||
}
|
||||
}
|
||||
|
@ -977,7 +977,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
if (!(this->unk_156 & this->unk_158)) {
|
||||
switch (this->actor.params) {
|
||||
case ITEM00_RUPEE_GREEN:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -987,7 +987,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -997,7 +997,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_RED:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.3f);
|
||||
this->scale = 0.3f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1014,7 +1014,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_ORANGE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.45f);
|
||||
this->scale = 0.45f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1031,7 +1031,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.4f);
|
||||
this->scale = 0.4f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1048,7 +1048,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_HEART_PIECE:
|
||||
if (CVar_GetS32("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
Actor_SetScale(&this->actor, 0.5f);
|
||||
this->scale = 0.5f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1067,7 +1067,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
EnItem00_DrawHeartContainer(this, play);
|
||||
break;
|
||||
case ITEM00_HEART:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
|
||||
this->actor.shape.yOffset = 25.0f;
|
||||
this->actor.shape.shadowScale = 0.3f;
|
||||
|
@ -1104,7 +1104,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
case ITEM00_BOMBS_A:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1114,7 +1114,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_BOMBS_B:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1125,7 +1125,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
case ITEM00_BOMBS_SPECIAL:
|
||||
case ITEM00_ARROWS_SINGLE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1135,7 +1135,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1145,7 +1145,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_MEDIUM:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1155,7 +1155,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_ARROWS_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1165,7 +1165,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_NUTS:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1175,7 +1175,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_STICK:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1185,7 +1185,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1195,7 +1195,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1205,7 +1205,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_SEEDS:
|
||||
if (CVar_GetS32("gNewDrops", 0)) {
|
||||
if (CVarGetInteger("gNewDrops", 0)) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1215,7 +1215,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
case ITEM00_SMALL_KEY:
|
||||
if (CVar_GetS32("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
this->scale = 0.2f;
|
||||
this->actor.shape.yOffset = 50.0f;
|
||||
|
@ -1386,24 +1386,24 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
|
|||
u8 shouldColor = 0;
|
||||
switch (texIndex) {
|
||||
case 0:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_GreenRupee.Changed", 0);
|
||||
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GreenRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVarGetInteger("gCosmetics.Consumable_GreenRupee.Changed", 0);
|
||||
break;
|
||||
case 1:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_BlueRupee.Changed", 0);
|
||||
rupeeColor = CVarGetColor24("gCosmetics.Consumable_BlueRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVarGetInteger("gCosmetics.Consumable_BlueRupee.Changed", 0);
|
||||
break;
|
||||
case 2:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_RedRupee.Changed", 0);
|
||||
rupeeColor = CVarGetColor24("gCosmetics.Consumable_RedRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVarGetInteger("gCosmetics.Consumable_RedRupee.Changed", 0);
|
||||
break;
|
||||
case 3:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_PurpleRupee.Changed", 0);
|
||||
rupeeColor = CVarGetColor24("gCosmetics.Consumable_PurpleRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVarGetInteger("gCosmetics.Consumable_PurpleRupee.Changed", 0);
|
||||
break;
|
||||
case 4:
|
||||
rupeeColor = CVar_GetRGB("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVar_GetS32("gCosmetics.Consumable_GoldRupee.Changed", 0);
|
||||
rupeeColor = CVarGetColor24("gCosmetics.Consumable_GoldRupee.Value", (Color_RGB8){ 255, 255, 255 });
|
||||
shouldColor = CVarGetInteger("gCosmetics.Consumable_GoldRupee.Changed", 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1552,7 +1552,7 @@ s16 func_8001F404(s16 dropId) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((CVar_GetS32("gBombchuDrops", 0) ||
|
||||
if ((CVarGetInteger("gBombchuDrops", 0) ||
|
||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
|
||||
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
|
||||
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
|
||||
|
@ -1586,7 +1586,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
|
|||
|
||||
params &= 0x3FFF;
|
||||
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVar_GetS32("gNoHeartDrops", 0)) { return NULL; }
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger("gNoHeartDrops", 0)) { return NULL; }
|
||||
|
||||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
|
@ -1631,7 +1631,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
|
|||
|
||||
params &= 0x3FFF;
|
||||
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVar_GetS32("gNoHeartDrops", 0)) { return NULL; }
|
||||
if ((params & 0x00FF) == ITEM00_HEART && CVarGetInteger("gNoHeartDrops", 0)) { return NULL; }
|
||||
|
||||
if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) {
|
||||
// TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf)
|
||||
|
@ -1668,7 +1668,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||
param8000 = params & 0x8000;
|
||||
params &= 0x7FFF;
|
||||
|
||||
if (CVar_GetS32("gNoRandomDrops", 0)) { return; }
|
||||
if (CVarGetInteger("gNoRandomDrops", 0)) { return; }
|
||||
|
||||
if (fromActor != NULL) {
|
||||
if (fromActor->dropFlag) {
|
||||
|
@ -1711,11 +1711,11 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
|
||||
DEADSOUND_REPEAT_MODE_OFF, 40);
|
||||
return;
|
||||
} else if (gSaveContext.health <= 0x30 && !CVar_GetS32("gNoHeartDrops", 0)) { // 3 hearts or less
|
||||
} else if (gSaveContext.health <= 0x30 && !CVarGetInteger("gNoHeartDrops", 0)) { // 3 hearts or less
|
||||
params = 0xB * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_HEART;
|
||||
} else if (gSaveContext.health <= 0x50 && !CVar_GetS32("gNoHeartDrops", 0)) { // 5 hearts or less
|
||||
} else if (gSaveContext.health <= 0x50 && !CVarGetInteger("gNoHeartDrops", 0)) { // 5 hearts or less
|
||||
params = 0xA * 0x10;
|
||||
dropTableIndex = 0x0;
|
||||
dropId = ITEM00_HEART;
|
||||
|
@ -1748,7 +1748,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP
|
|||
}
|
||||
}
|
||||
|
||||
if (dropId != 0xFF && (!CVar_GetS32("gNoHeartDrops", 0) || dropId != ITEM00_HEART)) {
|
||||
if (dropId != 0xFF && (!CVarGetInteger("gNoHeartDrops", 0) || dropId != ITEM00_HEART)) {
|
||||
dropQuantity = sDropQuantities[params + dropTableIndex];
|
||||
while (dropQuantity > 0) {
|
||||
if (!param8000) {
|
||||
|
|
|
@ -66,7 +66,7 @@ u16 sReactionTextIds[][PLAYER_MASK_MAX] = {
|
|||
u16 Text_GetFaceReaction(PlayState* play, u32 reactionSet) {
|
||||
u8 currentMask = Player_GetMask(play);
|
||||
|
||||
if (CVar_GetS32("gMMBunnyHood", 0) && currentMask == PLAYER_MASK_BUNNY) {
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) && currentMask == PLAYER_MASK_BUNNY) {
|
||||
return 0;
|
||||
} else {
|
||||
return sReactionTextIds[reactionSet][currentMask];
|
||||
|
|
|
@ -18,21 +18,21 @@ void KaleidoSetup_Update(PlayState* play) {
|
|||
play->shootingGalleryStatus <= 1 && gSaveContext.magicState != 8 && gSaveContext.magicState != 9 &&
|
||||
(play->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(play, 0x38))) {
|
||||
|
||||
if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 2 && !CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
CVar_SetS32("gCheatEasyPauseBufferFrameAdvance", 0);
|
||||
if (CVarGetInteger("gCheatEasyPauseBufferFrameAdvance", 0) == 2 && !CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
CVarSetInteger("gCheatEasyPauseBufferFrameAdvance", 0);
|
||||
}
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
if (BREG(0)) {
|
||||
pauseCtx->debugState = 3;
|
||||
}
|
||||
} else if ((CHECK_BTN_ALL(input->press.button, BTN_START) && !CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0)) || CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) == 1) {
|
||||
} else if ((CHECK_BTN_ALL(input->press.button, BTN_START) && !CVarGetInteger("gCheatEasyPauseBufferFrameAdvance", 0)) || CVarGetInteger("gCheatEasyPauseBufferFrameAdvance", 0) == 1) {
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
||||
CVar_SetS32("gPauseTriforce", 1);
|
||||
CVarSetInteger("gPauseTriforce", 1);
|
||||
else
|
||||
CVar_SetS32("gPauseTriforce", 0);
|
||||
CVarSetInteger("gPauseTriforce", 0);
|
||||
|
||||
|
||||
WREG(16) = -175;
|
||||
|
|
|
@ -174,7 +174,7 @@ void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
|
|||
//__FILE__, __LINE__);
|
||||
|
||||
if (character < 0x8B)
|
||||
memcpy(&font->charTexBuf[codePointIndex], ResourceMgr_LoadTexByName(fntTbl[character]), FONT_CHAR_TEX_SIZE);
|
||||
memcpy(&font->charTexBuf[codePointIndex], GetResourceDataByName(fntTbl[character], false), FONT_CHAR_TEX_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,7 @@ void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
|
|||
* The different icons are given in the MessageBoxIcon enum.
|
||||
*/
|
||||
void Font_LoadMessageBoxIcon(Font* font, u16 icon) {
|
||||
memcpy(font->iconBuf, ResourceMgr_LoadTexByName(msgStaticTbl[4 + icon]), FONT_CHAR_TEX_SIZE);
|
||||
memcpy(font->iconBuf, GetResourceDataByName(msgStaticTbl[4 + icon], false), FONT_CHAR_TEX_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +218,7 @@ void Font_LoadOrderedFont(Font* font) {
|
|||
osSyncPrintf("nes_mes_buf[%d]=%d\n", codePointIndex, font->msgBuf[codePointIndex]);
|
||||
|
||||
offset = (font->msgBuf[codePointIndex] - '\x20') * FONT_CHAR_TEX_SIZE;
|
||||
memcpy(fontBuf, ResourceMgr_LoadTexByName(fntTbl[offset / FONT_CHAR_TEX_SIZE]), FONT_CHAR_TEX_SIZE);
|
||||
memcpy(fontBuf, GetResourceDataByName(fntTbl[offset / FONT_CHAR_TEX_SIZE], false), FONT_CHAR_TEX_SIZE);
|
||||
//DmaMgr_SendRequest1(fontBuf, fontStatic + offset, FONT_CHAR_TEX_SIZE, __FILE__, __LINE__);
|
||||
fontBufIndex += FONT_CHAR_TEX_SIZE / 8;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "vt.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
|
@ -1379,7 +1379,7 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
color = CLAMP_MIN(color, 0.0f);
|
||||
|
||||
scale = -15.0f * color + 25.0f;
|
||||
scale *= CVar_GetFloat("gCosmetics.Moon_Size", 1.0f);
|
||||
scale *= CVarGetFloat("gCosmetics.Moon_Size", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
temp = -y / 80.0f;
|
||||
|
@ -1391,8 +1391,8 @@ void Environment_DrawSunAndMoon(PlayState* play) {
|
|||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_LOAD);
|
||||
Gfx_SetupDL_51Opa(play->state.gfxCtx);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
if (CVar_GetS32("gCosmetics.World_Moon.Changed", 0)) {
|
||||
Color_RGB8 moonColor = CVar_GetRGB("gCosmetics.World_Moon.Value", (Color_RGB8){ 0, 0, 240 });
|
||||
if (CVarGetInteger("gCosmetics.World_Moon.Changed", 0)) {
|
||||
Color_RGB8 moonColor = CVarGetColor24("gCosmetics.World_Moon.Value", (Color_RGB8){ 0, 0, 240 });
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, moonColor.r, moonColor.g, moonColor.b, alpha);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, moonColor.r / 2, moonColor.g / 2, moonColor.b / 2, alpha);
|
||||
} else {
|
||||
|
@ -2308,9 +2308,9 @@ void Environment_PatchSandstorm(PlayState* play) {
|
|||
gsSPWideTextureRectangle(OTRGetRectDimensionFromLeftEdge(0) << 2, 0,
|
||||
OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH) << 2, 0x03C0, G_TX_RENDERTILE, 0, 0, 0x008C, -0x008C),
|
||||
};
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect0", 48, gfxPatchSandstormRect[0]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect1", 50, gfxPatchSandstormRect[1]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect2", 52, gfxPatchSandstormRect[2]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect0", 24, gfxPatchSandstormRect[0]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect1", 25, gfxPatchSandstormRect[1]);
|
||||
ResourceMgr_PatchGfxByName(gFieldSandstormDL, "gfxPatchSandstormRect2", 26, gfxPatchSandstormRect[2]);
|
||||
|
||||
previousPatchedSandstormScreenSize = ABS(OTRGetRectDimensionFromLeftEdge(0)) + ABS(OTRGetRectDimensionFromRightEdge(SCREEN_WIDTH));
|
||||
}
|
||||
|
|
|
@ -120,20 +120,20 @@ s16 sHeartsDDEnv[2][3];
|
|||
void HealthMeter_Init(PlayState* play) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVar_GetRGB("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVarGetColor24("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVar_GetRGB("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVarGetColor24("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVar_GetRGB("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVarGetColor24("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
}
|
||||
|
||||
interfaceCtx->unk_228 = 0x140;
|
||||
|
@ -176,26 +176,26 @@ void HealthMeter_Update(PlayState* play) {
|
|||
s16 gFactor;
|
||||
s16 bFactor;
|
||||
|
||||
Top_LM_Margin = CVar_GetS32("gHUDMargin_T", 0);
|
||||
Left_LM_Margin = CVar_GetS32("gHUDMargin_L", 0);
|
||||
Right_LM_Margin = CVar_GetS32("gHUDMargin_R", 0);
|
||||
Bottom_LM_Margin = CVar_GetS32("gHUDMargin_B", 0);
|
||||
Top_LM_Margin = CVarGetInteger("gHUDMargin_T", 0);
|
||||
Left_LM_Margin = CVarGetInteger("gHUDMargin_L", 0);
|
||||
Right_LM_Margin = CVarGetInteger("gHUDMargin_R", 0);
|
||||
Bottom_LM_Margin = CVarGetInteger("gHUDMargin_B", 0);
|
||||
|
||||
Color_RGB8 mainColor = {HEARTS_PRIM_R, HEARTS_PRIM_G, HEARTS_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
mainColor = CVarGetColor24("gCosmetics.Consumable_Hearts.Value", mainColor);
|
||||
}
|
||||
Color_RGB8 mainBorder = {HEARTS_ENV_R, HEARTS_ENV_G, HEARTS_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVar_GetRGB("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_HeartBorder.Changed", 0)) {
|
||||
mainBorder = CVarGetColor24("gCosmetics.Consumable_HeartBorder.Value", mainBorder);
|
||||
}
|
||||
Color_RGB8 ddColor = {HEARTS_DD_ENV_R, HEARTS_DD_ENV_G, HEARTS_DD_ENV_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVar_GetRGB("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_DDHearts.Changed", 0)) {
|
||||
ddColor = CVarGetColor24("gCosmetics.Consumable_DDHearts.Value", ddColor);
|
||||
}
|
||||
Color_RGB8 ddBorder = {HEARTS_DD_PRIM_R, HEARTS_DD_PRIM_G, HEARTS_DD_PRIM_B};
|
||||
if (CVar_GetS32("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVar_GetRGB("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
if (CVarGetInteger("gCosmetics.Consumable_DDHeartBorder.Changed", 0)) {
|
||||
ddBorder = CVarGetColor24("gCosmetics.Consumable_DDHeartBorder.Value", ddBorder);
|
||||
}
|
||||
|
||||
if (interfaceCtx->unk_200 != 0) {
|
||||
|
@ -336,20 +336,20 @@ static void* sHeartDDTextures[] = {
|
|||
|
||||
s16 getHealthMeterXOffset() {
|
||||
s16 X_Margins;
|
||||
if (CVar_GetS32("gHeartsUseMargins", 0) != 0)
|
||||
if (CVarGetInteger("gHeartsUseMargins", 0) != 0)
|
||||
X_Margins = Left_LM_Margin;
|
||||
else
|
||||
X_Margins = 0;
|
||||
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) == 1) {//Anchor Left
|
||||
return OTRGetDimensionFromLeftEdge(CVar_GetS32("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) == 1) {//Anchor Left
|
||||
return OTRGetDimensionFromLeftEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 2) {//Anchor Right
|
||||
X_Margins = Right_LM_Margin;
|
||||
return OTRGetDimensionFromRightEdge(CVar_GetS32("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 3) {//Anchor None
|
||||
return CVar_GetS32("gHeartsCountPosX", 0)+70.0f;;
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 4) {//Hidden
|
||||
return OTRGetDimensionFromRightEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 3) {//Anchor None
|
||||
return CVarGetInteger("gHeartsCountPosX", 0)+70.0f;;
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 4) {//Hidden
|
||||
return -9999;
|
||||
}
|
||||
} else {
|
||||
|
@ -359,15 +359,15 @@ s16 getHealthMeterXOffset() {
|
|||
|
||||
s16 getHealthMeterYOffset() {
|
||||
s16 Y_Margins;
|
||||
if (CVar_GetS32("gHeartsUseMargins", 0) != 0)
|
||||
if (CVarGetInteger("gHeartsUseMargins", 0) != 0)
|
||||
Y_Margins = (Top_LM_Margin*-1);
|
||||
else
|
||||
Y_Margins = 0;
|
||||
|
||||
f32 HeartsScale = 0.7f;
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
|
||||
HeartsScale = CVar_GetFloat("gHeartsCountScale", 0.7f);
|
||||
return CVar_GetS32("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
|
||||
HeartsScale = CVarGetFloat("gHeartsCountScale", 0.7f);
|
||||
return CVarGetInteger("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
|
||||
} else {
|
||||
return 0.0f+Y_Margins;
|
||||
}
|
||||
|
@ -397,8 +397,8 @@ void HealthMeter_Draw(PlayState* play) {
|
|||
u8* curBgImgLoaded = NULL;
|
||||
s32 ddHeartCountMinusOne = gSaveContext.isDoubleDefenseAcquired ? totalHeartCount - 1 : -1;
|
||||
f32 HeartsScale = 0.7f;
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
|
||||
HeartsScale = CVar_GetFloat("gHeartsCountScale", 0.7f);
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
|
||||
HeartsScale = CVarGetFloat("gHeartsCountScale", 0.7f);
|
||||
}
|
||||
static u32 epoch = 0;
|
||||
epoch++;
|
||||
|
@ -413,7 +413,7 @@ void HealthMeter_Draw(PlayState* play) {
|
|||
/*
|
||||
s16 X_Margins;
|
||||
s16 Y_Margins;
|
||||
if (CVar_GetS32("gHeartsUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gHeartsUseMargins", 0) != 0) {
|
||||
X_Margins = Left_LM_Margin;
|
||||
Y_Margins = (Top_LM_Margin*-1);
|
||||
} else {
|
||||
|
@ -422,16 +422,16 @@ void HealthMeter_Draw(PlayState* play) {
|
|||
}
|
||||
s16 PosX_original = OTRGetDimensionFromLeftEdge(0.0f)+X_Margins;
|
||||
s16 PosY_original = 0.0f+Y_Margins;
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
|
||||
offsetY = CVar_GetS32("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
|
||||
if (CVar_GetS32("gHeartsCountPosType", 0) == 1) {//Anchor Left
|
||||
offsetX = OTRGetDimensionFromLeftEdge(CVar_GetS32("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) != 0) {
|
||||
offsetY = CVarGetInteger("gHeartsCountPosY", 0)+Y_Margins+(HeartsScale*15);
|
||||
if (CVarGetInteger("gHeartsCountPosType", 0) == 1) {//Anchor Left
|
||||
offsetX = OTRGetDimensionFromLeftEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 2) {//Anchor Right
|
||||
X_Margins = Right_LM_Margin;
|
||||
offsetX = OTRGetDimensionFromRightEdge(CVar_GetS32("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 3) {//Anchor None
|
||||
offsetX = CVar_GetS32("gHeartsCountPosX", 0)+70.0f;
|
||||
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 4) {//Hidden
|
||||
offsetX = OTRGetDimensionFromRightEdge(CVarGetInteger("gHeartsCountPosX", 0)+X_Margins+70.0f);
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 3) {//Anchor None
|
||||
offsetX = CVarGetInteger("gHeartsCountPosX", 0)+70.0f;
|
||||
} else if (CVarGetInteger("gHeartsCountPosType", 0) == 4) {//Hidden
|
||||
offsetX = -9999;
|
||||
}
|
||||
} else {
|
||||
|
@ -615,7 +615,7 @@ void HealthMeter_Draw(PlayState* play) {
|
|||
}
|
||||
|
||||
offsetX += 10.0f;
|
||||
s32 lineLength = CVar_GetS32("gHeartsLineLength", 10);
|
||||
s32 lineLength = CVarGetInteger("gHeartsLineLength", 10);
|
||||
if (lineLength != 0 && (i+1)%lineLength == 0) {
|
||||
offsetX = PosX_anchor;
|
||||
offsetY += 10.0f;
|
||||
|
@ -635,7 +635,7 @@ void HealthMeter_HandleCriticalAlarm(PlayState* play) {
|
|||
if (interfaceCtx->unk_22A <= 0) {
|
||||
interfaceCtx->unk_22A = 0;
|
||||
interfaceCtx->unk_22C = 0;
|
||||
if (CVar_GetS32("gLowHpAlarm", 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
|
||||
if (CVarGetInteger("gLowHpAlarm", 0) == 0 && !Player_InCsMode(play) && (play->pauseCtx.state == 0) &&
|
||||
(play->pauseCtx.debugState == 0) && HealthMeter_IsCritical() && !Play_InCsMode(play)) {
|
||||
func_80078884(NA_SE_SY_HITPOINT_ALARM);
|
||||
}
|
||||
|
|
|
@ -414,7 +414,7 @@ void Map_InitData(PlayState* play, s16 room) {
|
|||
|
||||
if (sEntranceIconMapIndex < 24) {
|
||||
const char* textureName = minimapTableOW[sEntranceIconMapIndex];
|
||||
memcpy(play->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(textureName), ResourceMgr_LoadTexSizeByName(textureName));
|
||||
memcpy(play->interfaceCtx.mapSegment, GetResourceDataByName(textureName, false), GetResourceTexSizeByName(textureName, false));
|
||||
}
|
||||
|
||||
interfaceCtx->unk_258 = mapIndex;
|
||||
|
@ -448,7 +448,7 @@ void Map_InitData(PlayState* play, s16 room) {
|
|||
//0xFF0, __FILE__, __LINE__);
|
||||
|
||||
const char* textureName = minimapTableDangeon[gMapData->dgnMinimapTexIndexOffset[mapIndex] + room];
|
||||
memcpy(play->interfaceCtx.mapSegment, ResourceMgr_LoadTexByName(textureName), ResourceMgr_LoadTexSizeByName(textureName));
|
||||
memcpy(play->interfaceCtx.mapSegment, GetResourceDataByName(textureName, false), GetResourceTexSizeByName(textureName, false));
|
||||
|
||||
R_COMPASS_OFFSET_X = gMapData->roomCompassOffsetX[mapIndex][room];
|
||||
R_COMPASS_OFFSET_Y = gMapData->roomCompassOffsetY[mapIndex][room];
|
||||
|
@ -602,17 +602,17 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
s16 tempX, tempZ;
|
||||
Color_RGB8 lastEntranceColor = { 200, 0, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_MinimapEntrance.Changed", 0)) {
|
||||
lastEntranceColor = CVar_GetRGB("gCosmetics.Hud_MinimapEntrance.Value", lastEntranceColor);
|
||||
if (CVarGetInteger("gCosmetics.Hud_MinimapEntrance.Changed", 0)) {
|
||||
lastEntranceColor = CVarGetColor24("gCosmetics.Hud_MinimapEntrance.Value", lastEntranceColor);
|
||||
}
|
||||
Color_RGB8 currentPositionColor = { 200, 255, 0 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_MinimapPosition.Changed", 0)) {
|
||||
currentPositionColor = CVar_GetRGB("gCosmetics.Hud_MinimapPosition.Value", currentPositionColor);
|
||||
if (CVarGetInteger("gCosmetics.Hud_MinimapPosition.Changed", 0)) {
|
||||
currentPositionColor = CVarGetColor24("gCosmetics.Hud_MinimapPosition.Value", currentPositionColor);
|
||||
}
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
Y_Margins_Minimap = Bottom_MM_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap = 0;
|
||||
|
@ -635,22 +635,22 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
tempZ = player->actor.world.pos.z;
|
||||
tempX /= R_COMPASS_SCALE_X;
|
||||
tempZ /= R_COMPASS_SCALE_Y;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromLeftEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVar_GetS32("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
OTRGetDimensionFromLeftEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromRightEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVar_GetS32("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
OTRGetDimensionFromRightEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
Matrix_Translate(
|
||||
(R_COMPASS_OFFSET_X + tempX + (CVar_GetS32("gMinimapPosX", 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
(R_COMPASS_OFFSET_X + tempX + (CVarGetInteger("gMinimapPosX", 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
Matrix_Translate(
|
||||
(R_COMPASS_OFFSET_X+(9999*10) + tempX / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y+(9999*10) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
|
@ -673,22 +673,22 @@ void Minimap_DrawCompassIcons(PlayState* play) {
|
|||
tempZ = sPlayerInitialPosZ+Y_Margins_Minimap;
|
||||
tempX /= R_COMPASS_SCALE_X;
|
||||
tempZ /= R_COMPASS_SCALE_Y;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromLeftEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVar_GetS32("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
OTRGetDimensionFromLeftEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y + ((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
Matrix_Translate(
|
||||
OTRGetDimensionFromRightEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVar_GetS32("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
OTRGetDimensionFromRightEdge((R_COMPASS_OFFSET_X + (X_Margins_Minimap*10) + tempX + (CVarGetInteger("gMinimapPosX", 0)*10)) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y +((Y_Margins_Minimap*10)*-1) - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
Matrix_Translate(
|
||||
(R_COMPASS_OFFSET_X + tempX + (CVar_GetS32("gMinimapPosX", 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y - tempZ + ((CVar_GetS32("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
(R_COMPASS_OFFSET_X + tempX + (CVarGetInteger("gMinimapPosX", 0)*10) / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y - tempZ + ((CVarGetInteger("gMinimapPosY", 0)*10)*-1)) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
Matrix_Translate(
|
||||
(R_COMPASS_OFFSET_X+(9999*10) + tempX / 10.0f),
|
||||
(R_COMPASS_OFFSET_Y+(9999*10) - tempZ) / 10.0f, 0.0f, MTXMODE_NEW);
|
||||
|
@ -714,23 +714,23 @@ void Minimap_Draw(PlayState* play) {
|
|||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s32 mapIndex = gSaveContext.mapIndex;
|
||||
Color_RGB8 minimapColor = {0, 255, 255};
|
||||
if (CVar_GetS32("gCosmetics.Hud_Minimap.Changed", 0)) {
|
||||
minimapColor = CVar_GetRGB("gCosmetics.Hud_Minimap.Value", minimapColor);
|
||||
if (CVarGetInteger("gCosmetics.Hud_Minimap.Changed", 0)) {
|
||||
minimapColor = CVarGetColor24("gCosmetics.Hud_Minimap.Value", minimapColor);
|
||||
}
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
// If any of these CVars are enabled, disable toggling the minimap with L, unless gEnableMapToggle is set
|
||||
bool enableMapToggle =
|
||||
!(CVar_GetS32("gDebugEnabled", 0) || CVar_GetS32("gMoonJumpOnL", 0) || CVar_GetS32("gTurboOnL", 0)) ||
|
||||
CVar_GetS32("gEnableMapToggle", 0);
|
||||
!(CVarGetInteger("gDebugEnabled", 0) || CVarGetInteger("gMoonJumpOnL", 0) || CVarGetInteger("gTurboOnL", 0)) ||
|
||||
CVarGetInteger("gEnableMapToggle", 0);
|
||||
|
||||
if (play->pauseCtx.state < 4) {
|
||||
//Minimap margins
|
||||
s16 X_Margins_Minimap;
|
||||
s16 Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
Y_Margins_Minimap = Bottom_MM_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap = 0;
|
||||
|
@ -763,17 +763,17 @@ void Minimap_Draw(PlayState* play) {
|
|||
|
||||
s16 dgnMiniMapX = OTRGetRectDimensionFromRightEdge(R_DGN_MINIMAP_X + X_Margins_Minimap);
|
||||
s16 dgnMiniMapY = R_DGN_MINIMAP_Y + Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
dgnMiniMapY = R_DGN_MINIMAP_Y+CVar_GetS32("gMinimapPosY", 0)+Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVar_GetS32("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVar_GetS32("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
dgnMiniMapX = CVar_GetS32("gMinimapPosX", 0);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
dgnMiniMapY = R_DGN_MINIMAP_Y+CVarGetInteger("gMinimapPosY", 0)+Y_Margins_Minimap;
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromLeftEdge(R_DGN_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
dgnMiniMapX = OTRGetDimensionFromRightEdge(R_DGN_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
dgnMiniMapX = CVarGetInteger("gMinimapPosX", 0);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
dgnMiniMapX = -9999;
|
||||
}
|
||||
}
|
||||
|
@ -834,17 +834,17 @@ void Minimap_Draw(PlayState* play) {
|
|||
|
||||
s16 oWMiniMapX = OTRGetRectDimensionFromRightEdge(R_OW_MINIMAP_X + X_Margins_Minimap);
|
||||
s16 oWMiniMapY = R_OW_MINIMAP_Y + Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
oWMiniMapY = R_OW_MINIMAP_Y+CVar_GetS32("gMinimapPosY", 0)+Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVar_GetS32("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVar_GetS32("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
oWMiniMapX = CVar_GetS32("gMinimapPosX", 0);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
oWMiniMapY = R_OW_MINIMAP_Y+CVarGetInteger("gMinimapPosY", 0)+Y_Margins_Minimap;
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromLeftEdge(R_OW_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
oWMiniMapX = OTRGetDimensionFromRightEdge(R_OW_MINIMAP_X+CVarGetInteger("gMinimapPosX", 0)+X_Margins_Minimap);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
oWMiniMapX = CVarGetInteger("gMinimapPosX", 0);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
oWMiniMapX = -9999;
|
||||
}
|
||||
}
|
||||
|
@ -868,45 +868,45 @@ void Minimap_Draw(PlayState* play) {
|
|||
s16 TopLeftY = PosY << 2;
|
||||
s16 TopLeftW = (Map0 ? OTRGetRectDimensionFromLeftEdge(PosX + IconSize) : OTRGetRectDimensionFromRightEdge(PosX + IconSize)) << 2;
|
||||
s16 TopLeftH = (PosY + IconSize) << 2;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + CVar_GetS32("gMinimapPosX", 0) + X_Margins_Minimap;
|
||||
PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + CVar_GetS32("gMinimapPosY", 0) + Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
PosX = gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + CVarGetInteger("gMinimapPosX", 0) + X_Margins_Minimap;
|
||||
PosY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + CVarGetInteger("gMinimapPosY", 0) + Y_Margins_Minimap;
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
TopLeftX = OTRGetRectDimensionFromLeftEdge(PosX) << 2;
|
||||
TopLeftW = OTRGetRectDimensionFromLeftEdge(PosX + IconSize) << 2;
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
TopLeftX = OTRGetRectDimensionFromRightEdge(PosX) << 2;
|
||||
TopLeftW = OTRGetRectDimensionFromRightEdge(PosX + IconSize) << 2;
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
TopLeftX = PosX << 2;
|
||||
TopLeftW = PosX + IconSize << 2;
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
TopLeftX = -9999 << 2;
|
||||
TopLeftW = -9999 + IconSize << 2;
|
||||
}
|
||||
if (!CVar_GetS32("gMinimapPosType", 0) != 4 && Map0 && !CVar_GetS32("gFixDungeonMinimapIcon", 0)) { //Force top left icon if fix not applied.
|
||||
if (!CVarGetInteger("gMinimapPosType", 0) != 4 && Map0 && !CVarGetInteger("gFixDungeonMinimapIcon", 0)) { //Force top left icon if fix not applied.
|
||||
TopLeftX = OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex]) << 2;
|
||||
TopLeftY = gMapData->owEntranceIconPosY[sEntranceIconMapIndex] << 2;
|
||||
TopLeftW = OTRGetRectDimensionFromLeftEdge(gMapData->owEntranceIconPosX[sEntranceIconMapIndex] + IconSize) << 2;
|
||||
TopLeftH = (gMapData->owEntranceIconPosY[sEntranceIconMapIndex] + IconSize) << 2;
|
||||
}
|
||||
}
|
||||
if (CVar_GetS32("gFixDungeonMinimapIcon", 0) != 0){
|
||||
if (CVarGetInteger("gFixDungeonMinimapIcon", 0) != 0){
|
||||
//No idea why and how Original value work but this does actually fix them all.
|
||||
PosY = PosY+1024;
|
||||
}
|
||||
if ((gMapData->owEntranceFlag[sEntranceIconMapIndex] == 0xFFFF) ||
|
||||
((gMapData->owEntranceFlag[sEntranceIconMapIndex] != 0xFFFF) &&
|
||||
(gSaveContext.infTable[26] & gBitFlags[gMapData->owEntranceFlag[mapIndex]]))) {
|
||||
if (!Map0 || !CVar_GetS32("gFixDungeonMinimapIcon", 0)) {
|
||||
if (!Map0 || !CVarGetInteger("gFixDungeonMinimapIcon", 0)) {
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, TopLeftX, TopLeftY, TopLeftW, TopLeftH, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
} else if (CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself
|
||||
} else if (CVarGetInteger("gAlwaysShowDungeonMinimapIcon", 0) != 0){ //Ability to show entrance Before beating the dungeon itself
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b,
|
||||
IconSize, IconSize, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
@ -916,17 +916,17 @@ void Minimap_Draw(PlayState* play) {
|
|||
|
||||
s16 entranceX = OTRGetRectDimensionFromRightEdge(270 + X_Margins_Minimap);
|
||||
s16 entranceY = 154 + Y_Margins_Minimap;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
entranceY = 154 + Y_Margins_Minimap + CVar_GetS32("gMinimapPosY", 0);
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(270 + X_Margins_Minimap + CVar_GetS32("gMinimapPosX", 0));
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(270 + X_Margins_Minimap + CVar_GetS32("gMinimapPosX", 0));
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
entranceX = 270 + X_Margins_Minimap + CVar_GetS32("gMinimapPosX", 0);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
entranceY = 154 + Y_Margins_Minimap + CVarGetInteger("gMinimapPosY", 0);
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Left_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromLeftEdge(270 + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap = Right_MM_Margin;};
|
||||
entranceX = OTRGetRectDimensionFromRightEdge(270 + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0));
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
entranceX = 270 + X_Margins_Minimap + CVarGetInteger("gMinimapPosX", 0);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
entranceX = -9999;
|
||||
}
|
||||
}
|
||||
|
@ -937,7 +937,7 @@ void Minimap_Draw(PlayState* play) {
|
|||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPWideTextureRectangle(OVERLAY_DISP++, entranceX << 2, entranceY << 2, (entranceX + 32) << 2, (entranceY + 8) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
} else if ((play->sceneNum == SCENE_SPOT08) && CVar_GetS32("gAlwaysShowDungeonMinimapIcon", 0) != 0){
|
||||
} else if ((play->sceneNum == SCENE_SPOT08) && CVarGetInteger("gAlwaysShowDungeonMinimapIcon", 0) != 0){
|
||||
|
||||
gDPLoadTextureBlock(OVERLAY_DISP++, gMapDungeonEntranceIconTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8,
|
||||
8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
|
@ -979,10 +979,10 @@ void Map_Update(PlayState* play) {
|
|||
s16 floor;
|
||||
s16 i;
|
||||
|
||||
Top_MM_Margin = CVar_GetS32("gHUDMargin_T", 0);
|
||||
Left_MM_Margin = CVar_GetS32("gHUDMargin_L", 0);
|
||||
Right_MM_Margin = CVar_GetS32("gHUDMargin_R", 0);
|
||||
Bottom_MM_Margin = CVar_GetS32("gHUDMargin_B", 0);
|
||||
Top_MM_Margin = CVarGetInteger("gHUDMargin_T", 0);
|
||||
Left_MM_Margin = CVarGetInteger("gHUDMargin_L", 0);
|
||||
Right_MM_Margin = CVarGetInteger("gHUDMargin_R", 0);
|
||||
Bottom_MM_Margin = CVarGetInteger("gHUDMargin_B", 0);
|
||||
|
||||
if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) {
|
||||
switch (play->sceneNum) {
|
||||
|
@ -1052,4 +1052,4 @@ void Map_Update(PlayState* play) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,15 +113,15 @@ void MapMark_DrawForDungeon(PlayState* play) {
|
|||
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->minimapAlpha);
|
||||
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, interfaceCtx->minimapAlpha);
|
||||
|
||||
s32 Top_MC_Margin = CVar_GetS32("gHUDMargin_T", 0);
|
||||
s32 Left_MC_Margin = CVar_GetS32("gHUDMargin_L", 0);
|
||||
s32 Right_MC_Margin = CVar_GetS32("gHUDMargin_R", 0);
|
||||
s32 Bottom_MC_Margin = CVar_GetS32("gHUDMargin_B", 0);
|
||||
s32 Top_MC_Margin = CVarGetInteger("gHUDMargin_T", 0);
|
||||
s32 Left_MC_Margin = CVarGetInteger("gHUDMargin_L", 0);
|
||||
s32 Right_MC_Margin = CVarGetInteger("gHUDMargin_R", 0);
|
||||
s32 Bottom_MC_Margin = CVarGetInteger("gHUDMargin_B", 0);
|
||||
|
||||
s32 X_Margins_Minimap_ic;
|
||||
s32 Y_Margins_Minimap_ic;
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
Y_Margins_Minimap_ic = Bottom_MC_Margin;
|
||||
} else {
|
||||
X_Margins_Minimap_ic = 0;
|
||||
|
@ -135,24 +135,24 @@ void MapMark_DrawForDungeon(PlayState* play) {
|
|||
//Minimap chest / boss icon
|
||||
const s32 PosX_Minimap_ori = GREG(94) + OTRGetRectDimensionFromRightEdge(markPoint->x+X_Margins_Minimap_ic) + 204;
|
||||
const s32 PosY_Minimap_ori = GREG(95) + markPoint->y + Y_Margins_Minimap_ic + 140;
|
||||
if (CVar_GetS32("gMinimapPosType", 0) != 0) {
|
||||
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVar_GetS32("gMinimapPosY", 0));
|
||||
if (CVar_GetS32("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
|
||||
if (CVarGetInteger("gMinimapPosType", 0) != 0) {
|
||||
rectTop = (markPoint->y + Y_Margins_Minimap_ic + 140 + CVarGetInteger("gMinimapPosY", 0));
|
||||
if (CVarGetInteger("gMinimapPosType", 0) == 1) {//Anchor Left
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Left_MC_Margin;};
|
||||
if (play->sceneNum == SCENE_YDAN || play->sceneNum == SCENE_DDAN || play->sceneNum == SCENE_BDAN ||
|
||||
play->sceneNum == SCENE_BMORI1 || play->sceneNum == SCENE_HIDAN || play->sceneNum == SCENE_MIZUSIN ||
|
||||
play->sceneNum == SCENE_JYASINZOU || play->sceneNum == SCENE_HAKADAN || play->sceneNum == SCENE_HAKADANCH ||
|
||||
play->sceneNum == SCENE_ICE_DOUKUTO) {
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPoint->x+CVar_GetS32("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPoint->x+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
} else {
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPoint->x+CVar_GetS32("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
rectLeft = OTRGetRectDimensionFromLeftEdge(markPoint->x+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
}
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVar_GetS32("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
rectLeft = OTRGetRectDimensionFromRightEdge(markPoint->x+CVar_GetS32("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
rectLeft = markPoint->x+CVar_GetS32("gMinimapPosX", 0)+204+X_Margins_Minimap_ic;
|
||||
} else if (CVar_GetS32("gMinimapPosType", 0) == 4) {//Hidden
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 2) {//Anchor Right
|
||||
if (CVarGetInteger("gMinimapUseMargins", 0) != 0) {X_Margins_Minimap_ic = Right_MC_Margin;};
|
||||
rectLeft = OTRGetRectDimensionFromRightEdge(markPoint->x+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic);
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 3) {//Anchor None
|
||||
rectLeft = markPoint->x+CVarGetInteger("gMinimapPosX", 0)+204+X_Margins_Minimap_ic;
|
||||
} else if (CVarGetInteger("gMinimapPosType", 0) == 4) {//Hidden
|
||||
rectLeft = -9999;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -95,30 +95,30 @@ void Message_ResetOcarinaNoteState(void) {
|
|||
sOcarinaNoteABtnEnv = (Color_RGB8){ 10, 10, 10 };
|
||||
sOcarinaNoteCBtnPrim = (Color_RGB8){ 255, 255, 50 };
|
||||
sOcarinaNoteCBtnEnv = (Color_RGB8){ 10, 10, 10 };
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
sOcarinaNoteABtnPrim = CVar_GetRGB("gCosmetics.Hud_AButton.Value", sOcarinaNoteABtnPrim);
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
sOcarinaNoteABtnPrim = CVarGetColor24("gCosmetics.Hud_AButton.Value", sOcarinaNoteABtnPrim);
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sOcarinaNoteABtnPrim = (Color_RGB8){ 80, 255, 150 };
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
sOcarinaNoteCBtnPrim = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", sOcarinaNoteCBtnPrim);
|
||||
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
sOcarinaNoteCBtnPrim = CVarGetColor24("gCosmetics.Hud_CButtons.Value", sOcarinaNoteCBtnPrim);
|
||||
}
|
||||
|
||||
sOcarinaNoteCUpBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCDownBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCLeftBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
sOcarinaNoteCRightBtnPrim = sOcarinaNoteCBtnPrim;
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
sOcarinaNoteCUpBtnPrim = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", sOcarinaNoteCUpBtnPrim);
|
||||
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
sOcarinaNoteCUpBtnPrim = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", sOcarinaNoteCUpBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
sOcarinaNoteCDownBtnPrim = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", sOcarinaNoteCDownBtnPrim);
|
||||
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
sOcarinaNoteCDownBtnPrim = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", sOcarinaNoteCDownBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
sOcarinaNoteCLeftBtnPrim = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", sOcarinaNoteCLeftBtnPrim);
|
||||
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
sOcarinaNoteCLeftBtnPrim = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", sOcarinaNoteCLeftBtnPrim);
|
||||
}
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
sOcarinaNoteCRightBtnPrim = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", sOcarinaNoteCRightBtnPrim);
|
||||
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
sOcarinaNoteCRightBtnPrim = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", sOcarinaNoteCRightBtnPrim);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ void Message_UpdateOcarinaGame(PlayState* play) {
|
|||
u8 Message_ShouldAdvance(PlayState* play) {
|
||||
Input* input = &play->state.input[0];
|
||||
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP)) {
|
||||
|
@ -158,7 +158,7 @@ u8 Message_ShouldAdvance(PlayState* play) {
|
|||
u8 Message_ShouldAdvanceSilent(PlayState* play) {
|
||||
Input* input = &play->state.input[0];
|
||||
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
return CHECK_BTN_ALL(input->press.button, BTN_A) || isB_Held || CHECK_BTN_ALL(input->press.button, BTN_CUP);
|
||||
|
@ -183,7 +183,7 @@ void Message_HandleChoiceSelection(PlayState* play, u8 numChoices) {
|
|||
static s16 sAnalogStickHeld = false;
|
||||
MessageContext* msgCtx = &play->msgCtx;
|
||||
Input* input = &play->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadText", 0);
|
||||
bool dpad = CVarGetInteger("gDpadText", 0);
|
||||
|
||||
if ((input->rel.stick_y >= 30 && !sAnalogStickHeld) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
sAnalogStickHeld = true;
|
||||
|
@ -287,7 +287,7 @@ void Message_FindMessage(PlayState* play, u16 textId) {
|
|||
const char* seg;
|
||||
u16 bufferId = textId;
|
||||
// Use the better owl message if better owl is enabled
|
||||
if (CVar_GetS32("gBetterOwl", 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
|
||||
if (CVarGetInteger("gBetterOwl", 0) != 0 && (bufferId == 0x2066 || bufferId == 0x607B ||
|
||||
bufferId == 0x10C2 || bufferId == 0x10C6 || bufferId == 0x206A))
|
||||
{
|
||||
bufferId = 0x71B3;
|
||||
|
@ -458,14 +458,14 @@ void Message_DrawTextboxIcon(PlayState* play, Gfx** p, s16 x, s16 y) {
|
|||
{ 0, 0, 0 },
|
||||
{ 0, 130, 255 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 50, 130, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 50, 130, 255 });
|
||||
sIconPrimColors[0].r = (color.r / 255) * 95;
|
||||
sIconPrimColors[0].g = (color.g / 255) * 95;
|
||||
sIconPrimColors[0].b = (color.b / 255) * 95;
|
||||
sIconPrimColors[1] = color;
|
||||
sIconEnvColors[1] = color;
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sIconPrimColors[0] = (Color_RGB8){ 0, 200, 80 };
|
||||
sIconPrimColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
sIconEnvColors[1] = (Color_RGB8){ 50, 255, 130 };
|
||||
|
@ -1024,7 +1024,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
msgCtx->textDelay = msgCtx->msgBufDecoded[++i];
|
||||
break;
|
||||
case MESSAGE_UNSKIPPABLE:
|
||||
msgCtx->textUnskippable = CVar_GetS32("gSkipText", 0) != 1;
|
||||
msgCtx->textUnskippable = CVarGetInteger("gSkipText", 0) != 1;
|
||||
break;
|
||||
case MESSAGE_TWO_CHOICE:
|
||||
msgCtx->textboxEndType = TEXTBOX_ENDTYPE_2_CHOICE;
|
||||
|
@ -1108,7 +1108,7 @@ void Message_DrawText(PlayState* play, Gfx** gfxP) {
|
|||
}
|
||||
}
|
||||
if (msgCtx->textDelayTimer == 0) {
|
||||
msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 2);
|
||||
msgCtx->textDrawPos = i + CVarGetInteger("gTextSpeed", 2);
|
||||
msgCtx->textDelayTimer = msgCtx->textDelay;
|
||||
} else {
|
||||
msgCtx->textDelayTimer--;
|
||||
|
@ -1131,7 +1131,7 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 y) {
|
|||
R_TEXTBOX_ICON_YPOS = y + 6;
|
||||
R_TEXTBOX_ICON_SIZE = 32;
|
||||
memcpy((uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
|
||||
ResourceMgr_LoadTexByName(gItemIcons[itemId]), ResourceMgr_LoadTexSizeByName(gItemIcons[itemId]));
|
||||
GetResourceDataByName(gItemIcons[itemId], false), GetResourceTexSizeByName(gItemIcons[itemId], false));
|
||||
// "Item 32-0"
|
||||
osSyncPrintf("アイテム32-0\n");
|
||||
} else {
|
||||
|
@ -1139,7 +1139,7 @@ void Message_LoadItemIcon(PlayState* play, u16 itemId, s16 y) {
|
|||
R_TEXTBOX_ICON_YPOS = y + 10;
|
||||
R_TEXTBOX_ICON_SIZE = 24;
|
||||
memcpy((uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
|
||||
ResourceMgr_LoadTexByName(gItemIcons[itemId]), ResourceMgr_LoadTexSizeByName(gItemIcons[itemId]));
|
||||
GetResourceDataByName(gItemIcons[itemId], false), GetResourceTexSizeByName(gItemIcons[itemId], false));
|
||||
// "Item 24"
|
||||
osSyncPrintf("アイテム24=%d (%d) {%d}\n", itemId, itemId - ITEM_KOKIRI_EMERALD, 84);
|
||||
}
|
||||
|
@ -1509,9 +1509,9 @@ void Message_Decode(PlayState* play) {
|
|||
msgCtx->textboxBackgroundUnkArg = font->msgBuf[msgCtx->msgBufPos + 3] & 0xF;
|
||||
|
||||
memcpy((uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE,
|
||||
ResourceMgr_LoadTexByName(gRedMessageXLeftTex), ResourceMgr_LoadTexSizeByName(gRedMessageXLeftTex));
|
||||
GetResourceDataByName(gRedMessageXLeftTex, false), GetResourceTexSizeByName(gRedMessageXLeftTex, false));
|
||||
memcpy((uintptr_t)msgCtx->textboxSegment + MESSAGE_STATIC_TEX_SIZE + 0x900,
|
||||
ResourceMgr_LoadTexByName(gRedMessageXRightTex), ResourceMgr_LoadTexSizeByName(gRedMessageXRightTex));
|
||||
GetResourceDataByName(gRedMessageXRightTex, false), GetResourceTexSizeByName(gRedMessageXRightTex, false));
|
||||
|
||||
msgCtx->msgBufPos += 3;
|
||||
R_TEXTBOX_BG_YPOS = R_TEXTBOX_Y + 8;
|
||||
|
@ -1630,12 +1630,12 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
//DmaMgr_SendRequest1(font->msgBuf, (uintptr_t)(_staff_message_data_staticSegmentRomStart + 4 + font->msgOffset),
|
||||
//font->msgLength, __FILE__, __LINE__);
|
||||
|
||||
} else if (CVar_GetS32("gAskToEquip", 0) &&
|
||||
(((LINK_IS_ADULT || CVar_GetS32("gTimelessEquipment", 0)) &&
|
||||
} else if (CVarGetInteger("gAskToEquip", 0) &&
|
||||
(((LINK_IS_ADULT || CVarGetInteger("gTimelessEquipment", 0)) &&
|
||||
// 0C = Biggoron, 4B = Giant's, 4E = Mirror Shield, 50-51 = Tunics
|
||||
(textId == 0x0C || textId == 0x4B || textId == 0x4E ||
|
||||
textId == 0x50 || textId == 0x51)) ||
|
||||
((!LINK_IS_ADULT || CVar_GetS32("gTimelessEquipment", 0)) &&
|
||||
((!LINK_IS_ADULT || CVarGetInteger("gTimelessEquipment", 0)) &&
|
||||
// 4C = Deku Shield, A4 = Kokiri Sword
|
||||
(textId == 0x4C || textId == 0xA4)) ||
|
||||
// 4D == Hylian Shield
|
||||
|
@ -1657,7 +1657,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
osSyncPrintf("吹き出し種類=%d\n", msgCtx->textBoxType);
|
||||
if (textBoxType < TEXTBOX_TYPE_NONE_BOTTOM) {
|
||||
const char* textureName = msgStaticTbl[messageStaticIndices[textBoxType]];
|
||||
memcpy(msgCtx->textboxSegment, ResourceMgr_LoadTexByName(textureName), MESSAGE_STATIC_TEX_SIZE);
|
||||
memcpy(msgCtx->textboxSegment, GetResourceDataByName(textureName, false), MESSAGE_STATIC_TEX_SIZE);
|
||||
if (textBoxType == TEXTBOX_TYPE_BLACK) {
|
||||
msgCtx->textboxColorRed = 0;
|
||||
msgCtx->textboxColorGreen = 0;
|
||||
|
@ -1999,14 +1999,14 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 50, 50, 255 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_AButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_AButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteAPrimColors[0].r = (color.r / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[0].g = (color.g / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[0].b = (color.b / 255) * 95;
|
||||
sOcarinaNoteAPrimColors[1] = color;
|
||||
sOcarinaNoteAEnvColors[1] = color;
|
||||
} else if (CVar_GetS32("gCosmetics.DefaultColorScheme", 0)) {
|
||||
} else if (CVarGetInteger("gCosmetics.DefaultColorScheme", 0)) {
|
||||
sOcarinaNoteAPrimColors[0] = (Color_RGB8){ 80, 255, 150 };
|
||||
sOcarinaNoteAPrimColors[1] = (Color_RGB8){ 100, 255, 200 };
|
||||
sOcarinaNoteAEnvColors[1] = (Color_RGB8){ 50, 255, 50 };
|
||||
|
@ -2020,8 +2020,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CButtons.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_CButtons.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CButtons.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCPrimColors[0] = color;
|
||||
sOcarinaNoteCPrimColors[1] = color;
|
||||
sOcarinaNoteCEnvColors[1].r = (color.r / 255) * 95;
|
||||
|
@ -2037,8 +2037,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CUpButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_CUpButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CUpButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCUpPrimColors[0] = color;
|
||||
sOcarinaNoteCUpPrimColors[1] = color;
|
||||
sOcarinaNoteCUpEnvColors[1].r = (color.r / 255) * 95;
|
||||
|
@ -2054,8 +2054,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CDownButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_CDownButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CDownButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCDownPrimColors[0] = color;
|
||||
sOcarinaNoteCDownPrimColors[1] = color;
|
||||
sOcarinaNoteCDownEnvColors[1].r = (color.r / 255) * 95;
|
||||
|
@ -2071,8 +2071,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CLeftButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_CLeftButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CLeftButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCLeftPrimColors[0] = color;
|
||||
sOcarinaNoteCLeftPrimColors[1] = color;
|
||||
sOcarinaNoteCLeftEnvColors[1].r = (color.r / 255) * 95;
|
||||
|
@ -2088,8 +2088,8 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
{ 10, 10, 10 },
|
||||
{ 110, 110, 50 },
|
||||
};
|
||||
if (CVar_GetS32("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Hud_CRightButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
if (CVarGetInteger("gCosmetics.Hud_CRightButton.Changed", 0)) {
|
||||
Color_RGB8 color = CVarGetColor24("gCosmetics.Hud_CRightButton.Value", (Color_RGB8){ 100, 200, 255 });
|
||||
sOcarinaNoteCRightPrimColors[0] = color;
|
||||
sOcarinaNoteCRightPrimColors[1] = color;
|
||||
sOcarinaNoteCRightEnvColors[1].r = (color.r / 255) * 95;
|
||||
|
@ -2136,7 +2136,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
gDPSetCombineLERP(gfx++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE,
|
||||
0);
|
||||
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
|
||||
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(play->state.input[0].cur.button, BTN_B)
|
||||
: CHECK_BTN_ALL(play->state.input[0].press.button, BTN_B);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
@ -2417,7 +2417,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
}
|
||||
break;
|
||||
case MSGMODE_SETUP_DISPLAY_SONG_PLAYED:
|
||||
if (CVar_GetS32("gFastOcarinaPlayback", 0) == 0 ||
|
||||
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 ||
|
||||
play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME ||
|
||||
play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
|
||||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
|
||||
|
@ -2472,7 +2472,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
Message_Decode(play);
|
||||
msgCtx->msgMode = MSGMODE_DISPLAY_SONG_PLAYED_TEXT;
|
||||
|
||||
if (CVar_GetS32("gFastOcarinaPlayback", 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
|
||||
if (CVarGetInteger("gFastOcarinaPlayback", 0) == 0 || play->msgCtx.lastPlayedSong == OCARINA_SONG_TIME
|
||||
|| play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS ||
|
||||
play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) {
|
||||
msgCtx->stateTimer = 20;
|
||||
|
@ -2987,7 +2987,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
* the last value being saved in a static variable.
|
||||
*/
|
||||
void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
|
||||
if (!CVar_GetS32("gDebugEnabled", 0)) { return; }
|
||||
if (!CVarGetInteger("gDebugEnabled", 0)) { return; }
|
||||
|
||||
static s16 sVarLastValue = 0;
|
||||
static s16 sFillTimer = 0;
|
||||
|
@ -3124,7 +3124,7 @@ void Message_Update(PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
bool isB_Held = CVar_GetS32("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
||||
bool isB_Held = CVarGetInteger("gSkipText", 0) != 0 ? CHECK_BTN_ALL(input->cur.button, BTN_B) && !sTextboxSkipped
|
||||
: CHECK_BTN_ALL(input->press.button, BTN_B);
|
||||
|
||||
switch (msgCtx->msgMode) {
|
||||
|
|
|
@ -80,7 +80,7 @@ Vec3f* OLib_VecSphToVec3f(Vec3f* dest, VecSph* sph) {
|
|||
f32 sinYaw;
|
||||
f32 cosYaw;
|
||||
|
||||
if (CVar_GetS32("gFixCameraDrift", 0)) {
|
||||
if (CVarGetInteger("gFixCameraDrift", 0)) {
|
||||
cosPitch = Math_AccurateCosS(sph->pitch);
|
||||
cosYaw = Math_AccurateCosS(sph->yaw);
|
||||
sinPitch = Math_AccurateSinS(sph->pitch);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -554,10 +554,10 @@ void Play_Init(GameState* thisx) {
|
|||
gTrnsnUnkState = 0;
|
||||
play->transitionMode = 0;
|
||||
|
||||
if (CVar_GetS32("gSceneTransitions", 255)!= 255){
|
||||
play->transitionMode = CVar_GetS32("gSceneTransitions", 0);
|
||||
gSaveContext.nextTransitionType = CVar_GetS32("gSceneTransitions", 0);
|
||||
play->fadeTransition = CVar_GetS32("gSceneTransitions", 0);
|
||||
if (CVarGetInteger("gSceneTransitions", 255)!= 255){
|
||||
play->transitionMode = CVarGetInteger("gSceneTransitions", 0);
|
||||
gSaveContext.nextTransitionType = CVarGetInteger("gSceneTransitions", 0);
|
||||
play->fadeTransition = CVarGetInteger("gSceneTransitions", 0);
|
||||
}
|
||||
|
||||
FrameAdvance_Init(&play->frameAdvCtx);
|
||||
|
@ -686,7 +686,7 @@ void Play_Update(PlayState* play) {
|
|||
ActorOverlayTable_LogPrint();
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gFreeCamera", 0) && Player_InCsMode(play)) {
|
||||
if (CVarGetInteger("gFreeCamera", 0) && Player_InCsMode(play)) {
|
||||
play->manualCamera = false;
|
||||
}
|
||||
|
||||
|
@ -869,7 +869,7 @@ void Play_Update(PlayState* play) {
|
|||
|
||||
// Don't autosave in grottos or cutscenes
|
||||
// Also don't save when you first load a file
|
||||
if (CVar_GetS32("gAutosave", 0) && (gSaveContext.cutsceneIndex == 0) && (play->gameplayFrames > 60) &&
|
||||
if (CVarGetInteger("gAutosave", 0) && (gSaveContext.cutsceneIndex == 0) && (play->gameplayFrames > 60) &&
|
||||
(play->sceneNum != SCENE_YOUSEI_IZUMI_TATE) && (play->sceneNum != SCENE_KAKUSIANA) && (play->sceneNum != SCENE_KENJYANOMA)) {
|
||||
Play_PerformSave(play);
|
||||
}
|
||||
|
@ -1088,7 +1088,7 @@ void Play_Update(PlayState* play) {
|
|||
if (!gSaveContext.sohStats.gameComplete) {
|
||||
gSaveContext.sohStats.playTimer++;
|
||||
|
||||
if (CVar_GetS32("gMMBunnyHood", 0) && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
if (CVarGetInteger("gMMBunnyHood", 0) && Player_GetMask(play) == PLAYER_MASK_BUNNY) {
|
||||
gSaveContext.sohStats.count[COUNT_TIME_BUNNY_HOOD]++;
|
||||
}
|
||||
}
|
||||
|
@ -1645,13 +1645,13 @@ time_t Play_GetRealTime() {
|
|||
void Play_Main(GameState* thisx) {
|
||||
PlayState* play = (PlayState*)thisx;
|
||||
|
||||
if (CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0)) {
|
||||
CVar_SetS32("gCheatEasyPauseBufferFrameAdvance", CVar_GetS32("gCheatEasyPauseBufferFrameAdvance", 0) - 1);
|
||||
if (CVarGetInteger("gCheatEasyPauseBufferFrameAdvance", 0)) {
|
||||
CVarSetInteger("gCheatEasyPauseBufferFrameAdvance", CVarGetInteger("gCheatEasyPauseBufferFrameAdvance", 0) - 1);
|
||||
}
|
||||
if (CVar_GetS32("gPauseBufferBlockInputFrame", 0)) {
|
||||
CVar_SetS32("gPauseBufferBlockInputFrame", CVar_GetS32("gPauseBufferBlockInputFrame", 0) - 1);
|
||||
if (CVarGetInteger("gPauseBufferBlockInputFrame", 0)) {
|
||||
CVarSetInteger("gPauseBufferBlockInputFrame", CVarGetInteger("gPauseBufferBlockInputFrame", 0) - 1);
|
||||
}
|
||||
if (play->envCtx.unk_EE[2] == 0 && CVar_GetS32("gLetItSnow", 0)) {
|
||||
if (play->envCtx.unk_EE[2] == 0 && CVarGetInteger("gLetItSnow", 0)) {
|
||||
play->envCtx.unk_EE[3] = 64;
|
||||
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJECT_KANKYO, 0, 0, 0, 0, 0, 0, 3, 0);
|
||||
}
|
||||
|
@ -1697,7 +1697,7 @@ void Play_Main(GameState* thisx) {
|
|||
LOG_NUM("1", 1);
|
||||
}
|
||||
|
||||
if (CVar_GetS32("gTimeSync", 0)) {
|
||||
if (CVarGetInteger("gTimeSync", 0)) {
|
||||
const int maxRealDaySeconds = 86400;
|
||||
const int maxInGameDayTicks = 65536;
|
||||
|
||||
|
@ -2194,7 +2194,7 @@ void Play_PerformSave(PlayState* play) {
|
|||
} else {
|
||||
Save_SaveFile();
|
||||
}
|
||||
if (CVar_GetS32("gAutosave", 0)) {
|
||||
if (CVarGetInteger("gAutosave", 0)) {
|
||||
Overlay_DisplayText(3.0f, "Game Saved");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -363,7 +363,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
|||
void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & 0x400000) &&
|
||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
||||
if ((CVar_GetS32("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK) ||
|
||||
if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK) ||
|
||||
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = 10;
|
||||
this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge];
|
||||
|
@ -490,7 +490,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
|
|||
s32 Player_GetStrength(void) {
|
||||
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
|
||||
|
||||
if (CVar_GetS32("gTimelessEquipment", 0) || LINK_IS_ADULT) {
|
||||
if (CVarGetInteger("gTimelessEquipment", 0) || LINK_IS_ADULT) {
|
||||
return strengthUpgrade;
|
||||
} else if (strengthUpgrade != 0) {
|
||||
return PLAYER_STR_BRACELET;
|
||||
|
@ -634,9 +634,9 @@ s32 func_8008F2F8(PlayState* play) {
|
|||
triggerEntry = &sTextTriggers[var];
|
||||
|
||||
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVar_GetS32("gSuperTunic", 0) == 0)) ||
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON && CVarGetInteger("gSuperTunic", 0) == 0)) ||
|
||||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVar_GetS32("gSuperTunic", 0) == 0)))) {
|
||||
(this->currentTunic != PLAYER_TUNIC_ZORA && CVarGetInteger("gSuperTunic", 0) == 0)))) {
|
||||
Message_StartTextbox(play, triggerEntry->textId, NULL);
|
||||
gSaveContext.textTriggerFlags |= triggerEntry->flag;
|
||||
}
|
||||
|
@ -749,14 +749,14 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis
|
|||
|
||||
Color_RGB8 sTemp;
|
||||
color = &sTunicColors[tunic];
|
||||
if (tunic == PLAYER_TUNIC_KOKIRI && CVar_GetS32("gCosmetics.Link_KokiriTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_KokiriTunic.Value", sTunicColors[PLAYER_TUNIC_KOKIRI]);
|
||||
if (tunic == PLAYER_TUNIC_KOKIRI && CVarGetInteger("gCosmetics.Link_KokiriTunic.Changed", 0)) {
|
||||
sTemp = CVarGetColor24("gCosmetics.Link_KokiriTunic.Value", sTunicColors[PLAYER_TUNIC_KOKIRI]);
|
||||
color = &sTemp;
|
||||
} else if (tunic == PLAYER_TUNIC_GORON && CVar_GetS32("gCosmetics.Link_GoronTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_GoronTunic.Value", sTunicColors[PLAYER_TUNIC_GORON]);
|
||||
} else if (tunic == PLAYER_TUNIC_GORON && CVarGetInteger("gCosmetics.Link_GoronTunic.Changed", 0)) {
|
||||
sTemp = CVarGetColor24("gCosmetics.Link_GoronTunic.Value", sTunicColors[PLAYER_TUNIC_GORON]);
|
||||
color = &sTemp;
|
||||
} else if (tunic == PLAYER_TUNIC_ZORA && CVar_GetS32("gCosmetics.Link_ZoraTunic.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Link_ZoraTunic.Value", sTunicColors[PLAYER_TUNIC_ZORA]);
|
||||
} else if (tunic == PLAYER_TUNIC_ZORA && CVarGetInteger("gCosmetics.Link_ZoraTunic.Changed", 0)) {
|
||||
sTemp = CVarGetColor24("gCosmetics.Link_ZoraTunic.Value", sTunicColors[PLAYER_TUNIC_ZORA]);
|
||||
color = &sTemp;
|
||||
}
|
||||
|
||||
|
@ -774,11 +774,11 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis
|
|||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
||||
color = &sGauntletColors[strengthUpgrade - 2];
|
||||
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVar_GetS32("gCosmetics.Gloves_SilverGauntlets.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Gloves_SilverGauntlets.Value", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
if (strengthUpgrade == PLAYER_STR_SILVER_G && CVarGetInteger("gCosmetics.Gloves_SilverGauntlets.Changed", 0)) {
|
||||
sTemp = CVarGetColor24("gCosmetics.Gloves_SilverGauntlets.Value", sGauntletColors[PLAYER_STR_SILVER_G - 2]);
|
||||
color = &sTemp;
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVar_GetS32("gCosmetics.Gloves_GoldenGauntlets.Changed", 0)) {
|
||||
sTemp = CVar_GetRGB("gCosmetics.Gloves_GoldenGauntlets.Value", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
} else if (strengthUpgrade == PLAYER_STR_GOLD_G && CVarGetInteger("gCosmetics.Gloves_GoldenGauntlets.Changed", 0)) {
|
||||
sTemp = CVarGetColor24("gCosmetics.Gloves_GoldenGauntlets.Value", sGauntletColors[PLAYER_STR_GOLD_G - 2]);
|
||||
color = &sTemp;
|
||||
}
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, color->r, color->g, color->b, 0);
|
||||
|
@ -948,8 +948,8 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
}
|
||||
|
||||
if (limbIndex == PLAYER_LIMB_HEAD) {
|
||||
if (CVar_GetS32("gCosmetics.Link_HeadScale.Changed", 0)) {
|
||||
f32 scale = CVar_GetFloat("gCosmetics.Link_HeadScale.Value", 1.0f);
|
||||
if (CVarGetInteger("gCosmetics.Link_HeadScale.Changed", 0)) {
|
||||
f32 scale = CVarGetFloat("gCosmetics.Link_HeadScale.Value", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
if (scale > 1.2f) {
|
||||
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
@ -961,8 +961,8 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
rot->y -= this->unk_6B8;
|
||||
rot->z += this->unk_6B6;
|
||||
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
if (CVar_GetS32("gCosmetics.Link_SwordScale.Changed", 0)) {
|
||||
f32 scale = CVar_GetFloat("gCosmetics.Link_SwordScale.Value", 1.0f);
|
||||
if (CVarGetInteger("gCosmetics.Link_SwordScale.Changed", 0)) {
|
||||
f32 scale = CVarGetFloat("gCosmetics.Link_SwordScale.Value", 1.0f);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
Matrix_Translate(-((LINK_IS_ADULT ? 320.0f : 200.0f) * scale), 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
@ -1176,7 +1176,7 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
|
|||
void Player_DrawGetItemIceTrap(PlayState* play, Player* this, Vec3f* refPos, s32 drawIdPlusOne, f32 height) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
if (CVarGetInteger("gLetItSnow", 0)) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
|
@ -1607,7 +1607,7 @@ s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
type = gPlayerModelTypes[modelGroup][3];
|
||||
if ((type == 18) || (type == 19)) {
|
||||
dListOffset = ptr[1] * ptrSize;
|
||||
} else if (type == 16 && CVar_GetS32("gPauseLiveLink", 0)) {
|
||||
} else if (type == 16 && CVarGetInteger("gPauseLiveLink", 0)) {
|
||||
//if (ptr[0] == 1)
|
||||
//dListOffset = 4;
|
||||
}
|
||||
|
@ -1686,8 +1686,8 @@ void func_80091A24(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAni
|
|||
sp12C[0] = sword;
|
||||
sp12C[1] = shield;
|
||||
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - ((CVar_GetS32("gPauseLiveLink", 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
||||
pos->y - (CVar_GetS32("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger("gPauseLiveLink", 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
||||
pos->y - (CVarGetInteger("gPauseTriforce", 0) ? 16 : 0), pos->z, rot);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x04, seg04);
|
||||
|
@ -1706,7 +1706,7 @@ void func_80091A24(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAni
|
|||
func_8008F470(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
||||
func_80091880, NULL, &sp12C);
|
||||
|
||||
if (CVar_GetS32("gPauseTriforce", 0)) {
|
||||
if (CVarGetInteger("gPauseTriforce", 0)) {
|
||||
|
||||
Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0),
|
||||
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
|
||||
|
@ -1740,8 +1740,8 @@ void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* po
|
|||
Vec3s* srcTable;
|
||||
s32 i;
|
||||
bool canswitchrnd = false;
|
||||
s16 SelectedMode = CVar_GetS32("gPauseLiveLink", 0);
|
||||
MinFrameCount = CVar_GetS32("gMinFrameCount", 200);
|
||||
s16 SelectedMode = CVarGetInteger("gPauseLiveLink", 0);
|
||||
MinFrameCount = CVarGetInteger("gMinFrameCount", 200);
|
||||
|
||||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||
|
@ -1766,7 +1766,7 @@ void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* po
|
|||
};
|
||||
s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet);
|
||||
|
||||
if (CVar_GetS32("gPauseLiveLink", 0) || CVar_GetS32("gPauseTriforce", 0)) {
|
||||
if (CVarGetInteger("gPauseLiveLink", 0) || CVarGetInteger("gPauseTriforce", 0)) {
|
||||
uintptr_t anim = 0; // Initialise anim
|
||||
|
||||
if (CUR_EQUIP_VALUE(EQUIP_SWORD) >= 3) {
|
||||
|
@ -1923,7 +1923,7 @@ void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* po
|
|||
|
||||
//anim = gPlayerAnim_link_wait_itemD2_20f; // Use for biggoron sword?
|
||||
|
||||
if (CVar_GetS32("gPauseTriforce", 0)) {
|
||||
if (CVarGetInteger("gPauseTriforce", 0)) {
|
||||
anim = gPlayerAnim_link_magic_kaze2;
|
||||
sword = 0;
|
||||
shield = 0;
|
||||
|
|
|
@ -401,7 +401,7 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
|
|||
|
||||
camera = GET_ACTIVE_CAM(play);
|
||||
camId = camera->camDataIdx;
|
||||
if (camId == -1 && CVar_GetS32("gNoRestrictItems", 0)) {
|
||||
if (camId == -1 && CVarGetInteger("gNoRestrictItems", 0)) {
|
||||
// This prevents a crash when using items that change the
|
||||
// camera (such as din's fire) on scenes with prerendered backgrounds
|
||||
return NULL;
|
||||
|
|
|
@ -845,7 +845,7 @@ AnimationEntry* AnimationContext_AddEntry(AnimationContext* animationCtx, Animat
|
|||
*/
|
||||
void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animation, s32 frame, s32 limbCount,
|
||||
Vec3s* frameTable) {
|
||||
if (CVar_GetS32("gN64WeirdFrames", 0) && frame < 0) {
|
||||
if (CVarGetInteger("gN64WeirdFrames", 0) && frame < 0) {
|
||||
Vec3s* src = (Vec3s*)getN64WeirdFrame((sizeof(Vec3s) * limbCount + 2) * frame);
|
||||
memcpy(frameTable, src, sizeof(Vec3s) * limbCount + 2);
|
||||
return;
|
||||
|
|
|
@ -136,7 +136,7 @@ void Sram_OpenSave() {
|
|||
|
||||
Save_LoadFile();
|
||||
|
||||
if (!CVar_GetS32("gRememberSaveLocation", 0) || gSaveContext.savedSceneNum == SCENE_YOUSEI_IZUMI_TATE ||
|
||||
if (!CVarGetInteger("gRememberSaveLocation", 0) || gSaveContext.savedSceneNum == SCENE_YOUSEI_IZUMI_TATE ||
|
||||
gSaveContext.savedSceneNum == SCENE_KAKUSIANA) {
|
||||
switch (gSaveContext.savedSceneNum) {
|
||||
case SCENE_YDAN:
|
||||
|
@ -285,7 +285,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||
u16* ptr;
|
||||
u16 checksum;
|
||||
|
||||
if (fileChooseCtx->buttonIndex != 0 || !CVar_GetS32("gDebugEnabled", 0)) {
|
||||
if (fileChooseCtx->buttonIndex != 0 || !CVarGetInteger("gDebugEnabled", 0)) {
|
||||
Sram_InitNewSave();
|
||||
} else {
|
||||
Sram_InitDebugSave();
|
||||
|
@ -296,7 +296,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||
gSaveContext.dayTime = 0x6AAB;
|
||||
gSaveContext.cutsceneIndex = 0xFFF1;
|
||||
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVar_GetS32("gDebugEnabled", 0)) || CVar_GetS32("gNaviSkipCutscene", 0)) {
|
||||
if ((fileChooseCtx->buttonIndex == 0 && CVarGetInteger("gDebugEnabled", 0)) || CVarGetInteger("gNaviSkipCutscene", 0)) {
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
|
|||
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
|
||||
}
|
||||
|
||||
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVar_GetString("gSpoilerLog", ""), 1) != 0 &&
|
||||
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0 &&
|
||||
!((Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasMasterQuest()) ||
|
||||
(Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasOriginal()))) {
|
||||
// Set N64DD Flags for save file
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ultra64.h"
|
||||
#include <libultraship/libultra.h>
|
||||
#include "global.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue