mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-29 00:06:33 +00:00
Clean up uses of !PLATFORM_N64 vs PLATFORM_GC (#2134)
* Clean up uses of !PLATFORM_N64 vs PLATFORM_GC * Put N64 button colors first
This commit is contained in:
parent
3faa1c6acc
commit
53b2110373
20 changed files with 35 additions and 35 deletions
|
@ -76,7 +76,7 @@ void Fault_DrawText(s32 x, s32 y, const char* fmt, ...);
|
|||
#define Fault_SetFontColor(color) (void)0
|
||||
#define Fault_SetCharPad(padW, padH) (void)0
|
||||
|
||||
#else
|
||||
#elif PLATFORM_GC
|
||||
|
||||
void Fault_InitDrawer(void);
|
||||
void Fault_SetForeColor(u16 color);
|
||||
|
@ -93,7 +93,7 @@ extern vs32 gFaultMsgId;
|
|||
|
||||
#define FAULT_MSG_ID gFaultMsgId
|
||||
|
||||
#else
|
||||
#elif PLATFORM_GC
|
||||
|
||||
typedef struct FaultMgr {
|
||||
/* 0x000 */ OSThread thread;
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct GfxPrint {
|
|||
#define GFXP_FLAG_RAINBOW (1 << 1)
|
||||
#define GFXP_FLAG_SHADOW (1 << 2)
|
||||
#define GFXP_FLAG_UPDATE (1 << 3)
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
#define GFXP_FLAG_ENLARGE (1 << 6)
|
||||
#endif
|
||||
#define GFXP_FLAG_OPEN (1 << 7)
|
||||
|
|
|
@ -60,7 +60,7 @@ f64 sqrt(f64 f);
|
|||
#pragma intrinsic(sqrt)
|
||||
#endif
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
extern float qNaN0x3FFFFF;
|
||||
extern float qNaN0x10000;
|
||||
extern float sNaN0x3FFFFF;
|
||||
|
|
|
@ -10,7 +10,7 @@ void Rand_Seed_Variable(u32* rndNum, u32 seed);
|
|||
u32 Rand_Next_Variable(u32* rndNum);
|
||||
f32 Rand_ZeroOne_Variable(u32* rndNum);
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
f32 Rand_Centered(void);
|
||||
f32 Rand_Centered_Variable(u32* rndNum);
|
||||
#endif
|
||||
|
|
|
@ -151,7 +151,7 @@ typedef struct InterfaceContext {
|
|||
#define A_BUTTON_X 186
|
||||
#define A_BUTTON_Y 9
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define A_BUTTON_R 90
|
||||
#define A_BUTTON_G 90
|
||||
#define A_BUTTON_B 255
|
||||
|
@ -164,7 +164,7 @@ typedef struct InterfaceContext {
|
|||
#define B_BUTTON_X 160
|
||||
#define B_BUTTON_Y 17
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define B_BUTTON_R 0
|
||||
#define B_BUTTON_G 150
|
||||
#define B_BUTTON_B 0
|
||||
|
@ -186,7 +186,7 @@ typedef struct InterfaceContext {
|
|||
#define C_UP_BUTTON_X 254
|
||||
#define C_UP_BUTTON_Y 16
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define START_BUTTON_R 200
|
||||
#define START_BUTTON_G 0
|
||||
#define START_BUTTON_B 0
|
||||
|
|
|
@ -11,7 +11,7 @@ typedef struct Arena {
|
|||
#if PLATFORM_N64
|
||||
/* 0x08 */ u32 size;
|
||||
/* 0x0C */ u8 allocFailures;
|
||||
#else
|
||||
#elif PLATFORM_GC
|
||||
/* 0x08 */ OSMesgQueue lockQueue;
|
||||
/* 0x20 */ u8 allocFailures; // only used in non-debug builds
|
||||
/* 0x21 */ u8 isInit;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
#define AUDIO_PRINTF osSyncPrintf
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define AUDIO_PRINTF(args) (void)0
|
||||
|
@ -858,7 +858,7 @@ NatureAmbienceDataIO sNatureAmbienceDataIO[20] = {
|
|||
},
|
||||
};
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
u32 sOcarinaAllowedButtonMask = (BTN_A | BTN_CUP | BTN_CDOWN | BTN_CLEFT | BTN_CRIGHT);
|
||||
s32 sOcarinaAButtonMap = BTN_A;
|
||||
s32 sOcarinaCUpButtonMap = BTN_CUP;
|
||||
|
|
|
@ -342,7 +342,7 @@ void Audio_ChooseActiveSfx(u8 bankId) {
|
|||
entry->sfxId, entry->posX, entry->posZ, *entry->posX, *entry->posY, *entry->posZ);
|
||||
}
|
||||
entry->priority = (u32)entry->dist + (SQ(0xFF - sfxImportance) * SQ(76));
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
temp3 = entry->sfxId; // fake
|
||||
entry->priority = entry->priority + temp3 - temp3;
|
||||
#endif
|
||||
|
|
|
@ -18,7 +18,7 @@ void StackCheck_Init(StackEntry* entry, void* stackBottom, void* stackTop, u32 i
|
|||
entry->minSpace = minSpace;
|
||||
entry->name = name;
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
iter = sStackInfoListStart;
|
||||
while (iter) {
|
||||
if (iter == entry) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.balign 16
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
DATA(qNaN0x3FFFFF)
|
||||
.word 0x7FBFFFFF
|
||||
ENDDATA(qNaN0x3FFFFF)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "z64math.h"
|
||||
#include "macros.h"
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
s32 gUseAtanContFrac;
|
||||
#endif
|
||||
|
||||
|
@ -46,7 +46,7 @@ f32 Math_FNearbyIntF(f32 x) {
|
|||
return nearbyintf(x);
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
/* Arctangent approximation using a Taylor series (one quadrant) */
|
||||
f32 Math_FAtanTaylorQF(f32 x) {
|
||||
static const f32 coeffs[] = {
|
||||
|
@ -173,7 +173,7 @@ f32 Math_FAtanContFracF(f32 x) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
/**
|
||||
* @return arctan(x) in radians, in (-pi/2,pi/2) range
|
||||
*/
|
||||
|
|
|
@ -126,7 +126,7 @@ u8 sGfxPrintFontData[(16 * 256) / 2] = {
|
|||
0x1B, 0xAA, 0x40, 0x21, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
// Can be used to set GFXP_FLAG_ENLARGE by default
|
||||
static u8 sDefaultSpecialFlags;
|
||||
#endif
|
||||
|
@ -342,7 +342,7 @@ void GfxPrint_Init(GfxPrint* this) {
|
|||
this->flags |= GFXP_FLAG_SHADOW;
|
||||
this->flags |= GFXP_FLAG_UPDATE;
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
if (sDefaultSpecialFlags & GFXP_FLAG_ENLARGE) {
|
||||
this->flags |= GFXP_FLAG_ENLARGE;
|
||||
} else {
|
||||
|
@ -370,7 +370,7 @@ Gfx* GfxPrint_Close(GfxPrint* this) {
|
|||
Gfx* ret;
|
||||
|
||||
this->flags &= ~GFXP_FLAG_OPEN;
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
gDPPipeSync(this->dList++);
|
||||
#endif
|
||||
ret = this->dList;
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
*/
|
||||
static u32 sRandInt = 1;
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
/**
|
||||
* Space to store a value to be re-interpreted as a float.
|
||||
*
|
||||
|
@ -114,7 +114,7 @@ f32 Rand_ZeroOne(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
/**
|
||||
* Returns a pseudo-random floating-point number between -0.5f and 0.5f by the same manner in which Rand_ZeroOne
|
||||
* generates its result.
|
||||
|
@ -179,7 +179,7 @@ f32 Rand_ZeroOne_Variable(u32* rndNum) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
/**
|
||||
* Generates the next pseudo-random floating-point number between -0.5f and 0.5f from the provided rndNum.
|
||||
*
|
||||
|
|
|
@ -30,7 +30,7 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||
Gfx* displayListHead;
|
||||
f32 cos;
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
if (arg3 == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define OCARINA_BUTTON_A_PRIM_R 80
|
||||
#define OCARINA_BUTTON_A_PRIM_G 150
|
||||
#define OCARINA_BUTTON_A_PRIM_B 255
|
||||
|
|
|
@ -137,7 +137,7 @@ Gfx sDefaultDisplayList[] = {
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
#if PLATFORM_N64 // Scene_Draw is at end of file in GC versions
|
||||
#if PLATFORM_N64 // Scene_Draw is at end of file in GC/iQue versions
|
||||
|
||||
SceneDrawConfigFunc sSceneDrawConfigs[SDC_MAX] = {
|
||||
Scene_DrawConfigDefault, // SDC_DEFAULT
|
||||
|
@ -1693,7 +1693,7 @@ void Scene_DrawConfigBesitu(PlayState* play) {
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_scene_table.c", 7910);
|
||||
}
|
||||
|
||||
#if PLATFORM_GC // Scene_Draw is at beginning of file in N64 versions
|
||||
#if !PLATFORM_N64 // Scene_Draw is at beginning of file in N64 versions
|
||||
|
||||
SceneDrawConfigFunc sSceneDrawConfigs[SDC_MAX] = {
|
||||
Scene_DrawConfigDefault, // SDC_DEFAULT
|
||||
|
|
|
@ -2261,7 +2261,7 @@ void BossMo_UpdateCore(Actor* thisx, PlayState* play) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
BossMo_SfxTest();
|
||||
#endif
|
||||
}
|
||||
|
@ -3051,7 +3051,7 @@ void BossMo_DrawEffects(BossMoEffect* effect, PlayState* play) {
|
|||
CLOSE_DISPS(gfxCtx, "../z_boss_mo.c", 7482);
|
||||
}
|
||||
|
||||
#if PLATFORM_GC
|
||||
#if !PLATFORM_N64
|
||||
void BossMo_SfxTest(void) {
|
||||
// Appears to be a test function for sound effects.
|
||||
static Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4)
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define CURSOR_COLOR_R 0
|
||||
#define CURSOR_COLOR_G 80
|
||||
#define CURSOR_COLOR_B 255
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "assets/textures/parameter_static/parameter_static.h"
|
||||
#include "assets/textures/icon_item_static/icon_item_static.h"
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define KALEIDO_COLOR_COLLECT_UNK_R 80
|
||||
#define KALEIDO_COLOR_COLLECT_UNK_G 150
|
||||
#define KALEIDO_COLOR_COLLECT_UNK_B 255
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "assets/textures/icon_item_gameover_static/icon_item_gameover_static.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#if PLATFORM_N64
|
||||
#if !PLATFORM_GC
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_R 100
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_G 100
|
||||
#define KALEIDO_COLOR_PROMPT_UNK_B 255
|
||||
|
@ -3663,7 +3663,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
pauseCtx->state = PAUSE_STATE_CLOSING;
|
||||
WREG(2) = -6240;
|
||||
func_800F64E0(0);
|
||||
#if PLATFORM_GC && OOT_NTSC
|
||||
#if !PLATFORM_N64 && OOT_NTSC
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
#endif
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
|
@ -3811,7 +3811,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
WREG(2) = -6240;
|
||||
YREG(8) = pauseCtx->unk_204;
|
||||
func_800F64E0(0);
|
||||
#if PLATFORM_GC && OOT_NTSC
|
||||
#if !PLATFORM_N64 && OOT_NTSC
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
#endif
|
||||
} else {
|
||||
|
@ -3839,7 +3839,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
#if PLATFORM_GC && OOT_NTSC
|
||||
#if !PLATFORM_N64 && OOT_NTSC
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue