diff --git a/assets/audio/sequences/seq_109.prg.seq b/assets/audio/sequences/seq_109.prg.seq index 49b0dfb606..ee3e8e0aa4 100644 --- a/assets/audio/sequences/seq_109.prg.seq +++ b/assets/audio/sequences/seq_109.prg.seq @@ -1149,7 +1149,7 @@ ENVELOPE_08BA: point 20, 20000 hang -#if OOT_VERSION == NTSC_1_2 || PLATFORM_GC +#if OOT_VERSION == NTSC_1_2 || !PLATFORM_N64 .filter FILTER_0932 filter 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/include/line_numbers.h b/include/line_numbers.h index c3946b2ea2..f0d0ae5faa 100644 --- a/include/line_numbers.h +++ b/include/line_numbers.h @@ -57,8 +57,8 @@ LN(ntsc_1_0, other, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc, gc) // NTSC 1.0, NTSC 1.1, Gamecube, and all the other versions -#define LN4(ntsc_1_0, ntsc_1_1, other, gc) \ - LN(ntsc_1_0, ntsc_1_1, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc, gc) +#define LN4(ntsc_1_0, ntsc_1_1, other, gc, ique) \ + LN(ntsc_1_0, ntsc_1_1, other, other, other, gc, gc, gc, gc, gc, gc, gc, gc, ique) // NTSC 1.0, NTSC 1.1, NTSC 1.2/PAL 1.0, Gamecube US/JP, Gamecube EU, and Gamecube CE #define LN5(ntsc_1_0, ntsc_1_1, other, pal_1_1, gc_ntsc, gc_eu, gc_jp_ce) \ diff --git a/src/audio/general.c b/src/audio/general.c index cbbb0c0709..2a639275bb 100644 --- a/src/audio/general.c +++ b/src/audio/general.c @@ -1188,7 +1188,7 @@ u8 D_8016B9F3; u8 sFanfareStartTimer; u16 sFanfareSeqId; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) u16 sPrevAmbienceSeqId; #endif @@ -1706,7 +1706,7 @@ void AudioOcarina_PlayControllerInput(u8 unused) { } else { // no bending or vibrato for recording state OCARINA_RECORD_SCARECROW_SPAWN sCurOcarinaBendIndex = 0; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) sCurOcarinaVibrato = 0; #endif sCurOcarinaBendFreq = 1.0f; // No bend @@ -1853,7 +1853,7 @@ void AudioOcarina_PlaybackSong(void) { } // Update vibrato -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 if (sNotePlaybackVibrato != sPlaybackSong[sPlaybackNotePos].vibrato) { sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato; // Sets vibrato to io port 6 @@ -2144,7 +2144,7 @@ void AudioOcarina_RecordSong(void) { } else if (sRecordOcarinaVolume != sCurOcarinaVolume) { noteChanged = true; } else if (sRecordOcarinaVibrato != sCurOcarinaVibrato) { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) { noteChanged = true; } @@ -2152,7 +2152,7 @@ void AudioOcarina_RecordSong(void) { noteChanged = true; #endif } else if (sRecordOcarinaBendIndex != sCurOcarinaBendIndex) { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) { noteChanged = true; } @@ -2493,7 +2493,7 @@ f32 Audio_ComputeSfxFreqScale(u8 bankId, u8 entryIdx) { switch (bankId) { case BANK_VOICE: -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (((entry->sfxId & 0xFF) < 0x40) && (sAudioBaseFilter2 != 0)) { phi_v0 = true; } else if (((entry->sfxId & 0xFF) >= 0x40) && (sAudioExtraFilter2 != 0)) { @@ -2614,7 +2614,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) { f32 behindScreenZ; u8 baseFilter = 0; SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx]; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) s32 pad; #endif @@ -2655,7 +2655,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) { } } if (sAudioBaseFilter != 0) { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if ((bankId == BANK_PLAYER) || (bankId == BANK_ITEM) || ((bankId == BANK_VOICE) && ((entry->sfxId & 0xFF) < 0x40))) #else @@ -3239,7 +3239,7 @@ void Audio_PlaySceneSequence(u16 seqId) { AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); } -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) { Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); @@ -3383,7 +3383,7 @@ void func_800F5B58(void) { if (sPrevMainBgmSeqId == NA_BGM_DISABLED) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0); } else { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (sPrevMainBgmSeqId == NA_BGM_NATURE_AMBIENCE) { sPrevMainBgmSeqId = sPrevAmbienceSeqId; } @@ -3519,7 +3519,7 @@ void Audio_SetSequenceMode(u8 seqMode) { volumeFadeInTimer); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_SUB, 10, 8, NA_BGM_ENEMY); -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 if (seqId != NA_BGM_NATURE_AMBIENCE) #else if (seqId > NA_BGM_NATURE_AMBIENCE) @@ -3544,7 +3544,7 @@ void Audio_SetSequenceMode(u8 seqMode) { sPrevSeqMode = seqMode + 0x80; } else { -#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC +#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64 // Empty #elif OOT_VERSION < PAL_1_0 if ((seqMode == SEQ_MODE_ENEMY) && (seqId != NA_BGM_FIELD_LOGIC) && @@ -3600,7 +3600,7 @@ void Audio_SetBgmEnemyVolume(f32 dist) { sAudioEnemyVol = ((350.0f - adjDist) * 127.0f) / 350.0f; Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, VOL_SCALE_INDEX_BGM_SUB, sAudioEnemyVol, 10); -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) #else if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE) @@ -3610,7 +3610,7 @@ void Audio_SetBgmEnemyVolume(f32 dist) { } } -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) #else if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId > NA_BGM_NATURE_AMBIENCE) @@ -3928,7 +3928,7 @@ void func_800F6C34(void) { sFanfareStartTimer = 0; D_8016B9F3 = 1; sMalonSingingDisabled = false; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) sPrevAmbienceSeqId = NA_BGM_DISABLED; #endif } @@ -3989,7 +3989,7 @@ void Audio_StartNatureAmbienceSequence(u16 playerIO, u16 channelMask) { } #endif -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if ((Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_DISABLED) && (Audio_GetActiveSeqId(SEQ_PLAYER_BGM_MAIN) != NA_BGM_NATURE_AMBIENCE)) { Audio_StopSequence(SEQ_PLAYER_BGM_MAIN, 0); @@ -4023,7 +4023,7 @@ void Audio_PlayNatureAmbienceSequence(u8 natureAmbienceId) { if ((gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId == NA_BGM_DISABLED) || !(sSeqFlags[gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId & 0xFF & 0xFF] & SEQ_FLAG_NO_AMBIENCE)) { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId != NA_BGM_NATURE_AMBIENCE) { sPrevAmbienceSeqId = gActiveSeqs[SEQ_PLAYER_BGM_MAIN].seqId; } diff --git a/src/audio/lib/seqplayer.c b/src/audio/lib/seqplayer.c index 71132797e2..a7091b24b3 100644 --- a/src/audio/lib/seqplayer.c +++ b/src/audio/lib/seqplayer.c @@ -437,7 +437,7 @@ void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) { void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) { s32 finished = 0; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (seqPlayer->finished == 1) { finished = 1; } @@ -457,7 +457,7 @@ void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) { } if (AudioLoad_IsFontLoadComplete(seqPlayer->defaultFont)) { -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (finished == 1) { AudioHeap_ReleaseNotesForFont(seqPlayer->defaultFont); } diff --git a/src/audio/lib/synthesis.c b/src/audio/lib/synthesis.c index d19ed4ae5f..85fb8d2610 100644 --- a/src/audio/lib/synthesis.c +++ b/src/audio/lib/synthesis.c @@ -644,7 +644,7 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat // Leak reverb between the left and right channels -#if OOT_VERSION < NTSC_1_1 || PLATFORM_GC +#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64 if ((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) #else if (((reverb->leakRtl != 0) || (reverb->leakLtr != 0)) && (gAudioCtx.soundMode != SOUNDMODE_MONO)) @@ -785,7 +785,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS samplesLenFixedPoint = (resamplingRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac; numSamplesToLoad = samplesLenFixedPoint >> 16; -#if !(OOT_VERSION < NTSC_1_1 || PLATFORM_GC) +#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64) if (numSamplesToLoad == 0) { skipBytes = false; } diff --git a/src/audio/lib/thread.c b/src/audio/lib/thread.c index c074f596a1..f47dbade7e 100644 --- a/src/audio/lib/thread.c +++ b/src/audio/lib/thread.c @@ -17,7 +17,7 @@ AudioTask* AudioThread_Update(void) { return AudioThread_UpdateImpl(); } -#if !(OOT_VERSION < PAL_1_0 || PLATFORM_GC) +#if !(OOT_VERSION < PAL_1_0 || !PLATFORM_N64) static s32 sMaxAbiCmdCnt = 0x80; static AudioTask* sWaitingAudioTask = NULL; #endif @@ -26,7 +26,7 @@ static AudioTask* sWaitingAudioTask = NULL; * This is Audio_Update for the audio thread */ AudioTask* AudioThread_UpdateImpl(void) { -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 static s32 sMaxAbiCmdCnt = 0x80; static AudioTask* sWaitingAudioTask = NULL; #endif diff --git a/src/audio/session_init.c b/src/audio/session_init.c index 0abc371ec9..a6e67f40d4 100644 --- a/src/audio/session_init.c +++ b/src/audio/session_init.c @@ -13,7 +13,7 @@ TempoData gTempoData = { // Sizes of everything on the init pool #define AI_BUFFERS_SIZE (AIBUF_SIZE * ARRAY_COUNT(gAudioCtx.aiBuffers)) #define SOUNDFONT_LIST_SIZE (NUM_SOUNDFONTS * sizeof(SoundFont)) -#if OOT_VERSION < PAL_1_0 || PLATFORM_GC +#if OOT_VERSION < PAL_1_0 || !PLATFORM_N64 #define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE) #else #define PERMANENT_POOL_SIZE (SFX_SEQ_SIZE + SFX_SOUNDFONTS_SIZE + 0x10) diff --git a/src/audio/sfx.c b/src/audio/sfx.c index ce94cf5483..1c743e95ba 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 OOT_VERSION < NTSC_1_1 || PLATFORM_GC +#if OOT_VERSION < NTSC_1_1 || !PLATFORM_N64 temp3 = entry->sfxId; // fake entry->priority = entry->priority + temp3 - temp3; #endif diff --git a/src/boot/z_locale.c b/src/boot/z_locale.c index 41c6ea00c4..1b8bd4294d 100644 --- a/src/boot/z_locale.c +++ b/src/boot/z_locale.c @@ -40,7 +40,7 @@ void Locale_Init(void) { PRINTF(VT_COL(RED, WHITE)); PRINTF(T("z_locale_init: 日本用かアメリカ用か判別できません\n", "z_locale_init: Can't tell if it's for Japan or America\n")); - LogUtils_HungupThread("../z_locale.c", LN4(86, 92, 101, 118)); + LogUtils_HungupThread("../z_locale.c", LN4(86, 92, 101, 118, UNK_LINE)); PRINTF(VT_RST); break; } diff --git a/src/code/game.c b/src/code/game.c index 2bed93e965..ee29c84496 100644 --- a/src/code/game.c +++ b/src/code/game.c @@ -391,7 +391,7 @@ void GameState_InitArena(GameState* gameState, size_t size) { } else { THA_Init(&gameState->tha, NULL, 0); PRINTF(T("ハイラル確保失敗\n", "Failure to secure Hyrule\n")); - HUNGUP_AND_CRASH("../game.c", LN4(895, 898, 985, 999)); + HUNGUP_AND_CRASH("../game.c", LN4(895, 898, 985, 999, 999)); } } @@ -432,7 +432,7 @@ void GameState_Realloc(GameState* gameState, size_t size) { SystemArena_Display(); #endif - HUNGUP_AND_CRASH("../game.c", LN4(940, 943, 1030, 1044)); + HUNGUP_AND_CRASH("../game.c", LN4(940, 943, 1030, 1044, 1044)); } } diff --git a/src/code/graph.c b/src/code/graph.c index 84186386e3..091c80bae3 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -380,7 +380,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { PRINTF("%c", BEL); PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域先頭が破壊されています\n", "Dynamic area head is destroyed\n") VT_RST); - Fault_AddHungupAndCrash("../graph.c", LN4(937, 940, 951, 1070)); + Fault_AddHungupAndCrash("../graph.c", LN4(937, 940, 951, 1070, 1067)); } if (pool->tailMagic != GFXPOOL_TAIL_MAGIC) { @@ -388,7 +388,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { PRINTF("%c", BEL); PRINTF(VT_COL(RED, WHITE) T("ダイナミック領域末尾が破壊されています\n", "Dynamic region tail is destroyed\n") VT_RST); - Fault_AddHungupAndCrash("../graph.c", LN4(943, 946, 957, 1076)); + Fault_AddHungupAndCrash("../graph.c", LN4(943, 946, 957, 1076, 1073)); } } @@ -481,7 +481,7 @@ void Graph_ThreadEntry(void* arg0) { sprintf(faultMsg, "CLASS SIZE= %d bytes", size); Fault_AddHungupAndCrashImpl("GAME CLASS MALLOC FAILED", faultMsg); #else - Fault_AddHungupAndCrash("../graph.c", LN4(1067, 1070, 1081, 1200)); + Fault_AddHungupAndCrash("../graph.c", LN4(1067, 1070, 1081, 1200, 1197)); #endif } diff --git a/src/code/sys_cfb.c b/src/code/sys_cfb.c index 9ad789176b..e175ddf944 100644 --- a/src/code/sys_cfb.c +++ b/src/code/sys_cfb.c @@ -34,7 +34,7 @@ void SysCfb_Init(s32 n64dd) { PRINTF("RAM4M mode\n"); sSysCfbEnd = 0x80400000; } else { - LogUtils_HungupThread("../sys_cfb.c", LN4(305, 308, 322, 354)); + LogUtils_HungupThread("../sys_cfb.c", LN4(305, 308, 322, 354, 341)); } screenSize = SCREEN_WIDTH * SCREEN_HEIGHT; diff --git a/src/code/z_eff_ss_dead.c b/src/code/z_eff_ss_dead.c index 3c1adf4cb6..2a64a23f4a 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_N64 +#if PLATFORM_GC if (arg3 == 0) { return; } diff --git a/src/code/z_room.c b/src/code/z_room.c index 67d99eb214..2612e2450c 100644 --- a/src/code/z_room.c +++ b/src/code/z_room.c @@ -458,7 +458,7 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS "z_room.c: Data consistent with camera id does not exist camid=%d\n") VT_RST, bgCamIndex); -#if PLATFORM_GC +#if !PLATFORM_N64 LogUtils_HungupThread("../z_room.c", 726); #else Fault_AddHungupAndCrash("../z_room.c", LN2(724, 727, 721)); @@ -545,7 +545,7 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) { } else if (roomShape->amountType == ROOM_SHAPE_IMAGE_AMOUNT_MULTI) { Room_DrawImageMulti(play, room, flags); } else { -#if PLATFORM_GC +#if !PLATFORM_N64 LogUtils_HungupThread("../z_room.c", 841); #else Fault_AddHungupAndCrash("../z_room.c", LN2(849, 852, 836));