diff options
| author | cadmic <cadmic24@gmail.com> | 2024-09-06 02:18:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-06 11:18:59 +0200 |
| commit | 53b2110373eb506d9c035697c0719851a77936d4 (patch) | |
| tree | e23e13cd11a9f81b41f2d18f695df37a9fd432b2 /src | |
| parent | 3faa1c6acce3b317ee23f153d17f0ea66a8f1c79 (diff) | |
Clean up uses of !PLATFORM_N64 vs PLATFORM_GC (#2134)
* Clean up uses of !PLATFORM_N64 vs PLATFORM_GC
* Put N64 button colors first
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio/general.c | 4 | ||||
| -rw-r--r-- | src/audio/sfx.c | 2 | ||||
| -rw-r--r-- | src/boot/stackcheck.c | 2 | ||||
| -rw-r--r-- | src/code/fp.s | 2 | ||||
| -rw-r--r-- | src/code/fp_math.c | 6 | ||||
| -rw-r--r-- | src/code/gfxprint.c | 6 | ||||
| -rw-r--r-- | src/code/rand.c | 6 | ||||
| -rw-r--r-- | src/code/z_eff_ss_dead.c | 2 | ||||
| -rw-r--r-- | src/code/z_message.c | 2 | ||||
| -rw-r--r-- | src/code/z_scene_table.c | 4 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 4 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 2 | ||||
| -rw-r--r-- | src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c | 2 | ||||
| -rw-r--r-- | src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c | 8 |
14 files changed, 26 insertions, 26 deletions
diff --git a/src/audio/general.c b/src/audio/general.c index ab33df294..af5ca719a 100644 --- a/src/audio/general.c +++ b/src/audio/general.c @@ -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; diff --git a/src/audio/sfx.c b/src/audio/sfx.c index 4debc94b7..90ed7a28f 100644 --- a/src/audio/sfx.c +++ b/src/audio/sfx.c @@ -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 diff --git a/src/boot/stackcheck.c b/src/boot/stackcheck.c index a1cff55e6..399b6c051 100644 --- a/src/boot/stackcheck.c +++ b/src/boot/stackcheck.c @@ -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) { diff --git a/src/code/fp.s b/src/code/fp.s index f7a00e213..d5b42094a 100644 --- a/src/code/fp.s +++ b/src/code/fp.s @@ -6,7 +6,7 @@ .balign 16 -#if PLATFORM_GC +#if !PLATFORM_N64 DATA(qNaN0x3FFFFF) .word 0x7FBFFFFF ENDDATA(qNaN0x3FFFFF) diff --git a/src/code/fp_math.c b/src/code/fp_math.c index fb73b58ef..85fb4cedf 100644 --- a/src/code/fp_math.c +++ b/src/code/fp_math.c @@ -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 */ diff --git a/src/code/gfxprint.c b/src/code/gfxprint.c index ac4bb7ced..6307324ed 100644 --- a/src/code/gfxprint.c +++ b/src/code/gfxprint.c @@ -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; diff --git a/src/code/rand.c b/src/code/rand.c index 917b1ecfc..378f0456e 100644 --- a/src/code/rand.c +++ b/src/code/rand.c @@ -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. * diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index 2a64a23f4..3c1adf4cb 100644 --- a/src/code/z_eff_ss_dead.c +++ b/src/code/z_eff_ss_dead.c @@ -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; } diff --git a/src/code/z_message.c b/src/code/z_message.c index eff41c44c..29212d318 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -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 diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index ed18c33c6..a2fc170e8 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -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 diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index a5616563d..bfc625d69 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -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 }; diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index ff7730421..a0cecf047 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -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 diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c index db2b3558e..1f5dcba14 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_collect.c @@ -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 diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c index c72a47810..936400e1c 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c @@ -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 } |
