This commit is contained in:
Tharo 2025-06-11 08:37:22 +09:00 committed by GitHub
commit 07b790f1ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
556 changed files with 3106 additions and 2479 deletions

View File

@ -309,9 +309,14 @@ endif
INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR)
# Check code syntax with host compiler
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-missing-braces
CHECK_WARNINGS += -Werror=implicit-int -Werror=implicit-function-declaration -Werror=int-conversion -Werror=incompatible-pointer-types
# Actors and effets are mostly callback functions and often don't use all arguments,
# ignore those warnings entirely in these directories.
$(BUILD_DIR)/src/overlays/actors/%.o: CHECK_WARNINGS += -Wno-unused-parameter
$(BUILD_DIR)/src/overlays/effects/%.o: CHECK_WARNINGS += -Wno-unused-parameter
# The `cpp` command behaves differently on macOS (it behaves as if
# `-traditional-cpp` was passed) so we use `gcc -E` instead.
CPP := gcc -E

View File

@ -787,7 +787,7 @@ u8 Actor_ApplyDamage(Actor* actor);
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag);
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag);
void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* arg5,
struct PlayState* play, s16 params, Gfx* dList);
void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2);
s32 Flags_GetEventChkInf(s32 flag);

View File

@ -261,7 +261,7 @@ void Environment_DrawSkyboxFilters(struct PlayState* play);
s32 Environment_ZBufValToFixedPoint(s32 zBufferVal);
u16 Environment_GetPixelDepth(s32 x, s32 y);
void Environment_GraphCallback(struct GraphicsContext* gfxCtx, void* param);
void Environment_Init(struct PlayState* play2, EnvironmentContext* envCtx, s32 unused);
void Environment_Init(struct PlayState* play2, EnvironmentContext* envCtx, s32 arg2);
u8 Environment_SmoothStepToU8(u8* pvalue, u8 target, u8 scale, u8 step, u8 minStep);
u8 Environment_SmoothStepToS8(s8* pvalue, s8 target, u8 scale, u8 step, u8 minStep);
f32 Environment_LerpWeight(u16 max, u16 min, u16 val);
@ -273,15 +273,15 @@ void Environment_Update(struct PlayState* play, EnvironmentContext* envCtx, Ligh
struct GameOverContext* gameOverCtx, struct GraphicsContext* gfxCtx);
void Environment_DrawSunAndMoon(struct PlayState* play);
void Environment_DrawSunLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view,
struct GraphicsContext* gfxCtx, Vec3f pos, s32 unused);
struct GraphicsContext* gfxCtx, Vec3f pos, s32 arg5);
void Environment_DrawLensFlare(struct PlayState* play, EnvironmentContext* envCtx, struct View* view,
struct GraphicsContext* gfxCtx, Vec3f pos, s32 unused, s16 scale, f32 colorIntensity,
struct GraphicsContext* gfxCtx, Vec3f pos, s32 arg5, s16 scale, f32 colorIntensity,
s16 glareStrength, u8 isSun);
void Environment_DrawRain(struct PlayState* play, struct View* view, struct GraphicsContext* gfxCtx);
void Environment_ChangeLightSetting(struct PlayState* play, u32 lightSetting);
void Environment_UpdateLightningStrike(struct PlayState* play);
void Environment_AddLightningBolts(struct PlayState* play, u8 num);
void Environment_DrawLightning(struct PlayState* play, s32 unused);
void Environment_DrawLightning(struct PlayState* play, s32 arg1);
void Environment_PlaySceneSequence(struct PlayState* play);
void Environment_DrawCustomLensFlare(struct PlayState* play);
void Environment_InitGameOverLights(struct PlayState* play);

View File

@ -4,6 +4,7 @@
#include "ultra64.h"
#include "ultra64/gbi.h"
#include "alignment.h"
#include "attributes.h"
#include "sched.h"
#include "thga.h"
#include "versions.h"
@ -109,10 +110,10 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file,
#else
#define OPEN_DISPS(gfxCtx, file, line) \
{ \
GraphicsContext* __gfxCtx = gfxCtx; \
s32 __dispPad
#define OPEN_DISPS(gfxCtx, file, line) \
{ \
UNUSED GraphicsContext* __gfxCtx = gfxCtx; \
UNUSED s32 __dispPad
#define CLOSE_DISPS(gfxCtx, file, line) \
do {} while (0); \
@ -123,7 +124,7 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file,
#endif
void Graph_ThreadEntry(void*);
void Graph_ThreadEntry(void* arg);
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
extern u64 gMojiFontTex[]; // original name: "font_ff"

21
include/stack_pad.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef STACK_PAD_H
#define STACK_PAD_H
#include "attributes.h"
#ifndef GLUE
#define GLUE(a, b) a##b
#endif
#ifndef GLUE2
#define GLUE2(a, b) GLUE(a, b)
#endif
#ifndef NON_MATCHING
#define STACK_PAD(type) UNUSED type GLUE2(__stack_pad_, __LINE__)
#define STACK_PADS(type, n) STACK_PAD(type)[(n)]
#else
#define STACK_PAD(type)
#define STACK_PADS(type, n)
#endif
#endif

View File

@ -84,7 +84,7 @@ char* AudioDebug_ToStringBinary(u32 num, u8 bits) {
}
void AudioDebug_Draw(GfxPrint* printer) {
s32 pad[3];
STACK_PADS(s32, 3);
u8 i;
u8 j;
u8 ctr;

View File

@ -8,6 +8,7 @@
#include "seqcmd.h"
#include "sequence.h"
#include "sfx.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "versions.h"
#include "audio.h"
@ -1461,9 +1462,9 @@ void AudioOcarina_CheckIfStartedSong(void) {
*/
void AudioOcarina_CheckSongsWithMusicStaff(void) {
u16 curOcarinaSongFlag;
u16 pad;
STACK_PAD(s16);
u8 noNewValidInput = false;
u16 pad2;
STACK_PAD(s16);
s8 staffOcarinaPlayingPosOffset = 0;
u8 songIndex;
OcarinaNote* curNote;
@ -1636,7 +1637,7 @@ void AudioOcarina_CheckSongsWithoutMusicStaff(void) {
}
// This unused argument is used in Majora's Mask as a u8
void AudioOcarina_PlayControllerInput(u8 unused) {
void AudioOcarina_PlayControllerInput(UNUSED u8 arg0) {
u32 ocarinaBtnsHeld;
// Prevents two different ocarina notes from being played on two consecutive frames
@ -1919,13 +1920,12 @@ void AudioOcarina_PlaybackSong(void) {
void AudioOcarina_SetRecordingSong(u8 isRecordingComplete) {
u16 i;
u16 i2;
u16 pad;
STACK_PADS(s16, 2);
u8 pitch;
OcarinaNote* note;
STACK_PAD(s32);
u8 j;
u8 k;
s32 t;
STACK_PAD(s32);
OcarinaNote* recordedSong;
if (sRecordingState == OCARINA_RECORD_SCARECROW_LONG) {
@ -2313,10 +2313,10 @@ void AudioOcarina_ResetStaffs(void) {
#if DEBUG_FEATURES
#include "debug.inc.c"
#else
void AudioDebug_Draw(GfxPrint* printer) {
void AudioDebug_Draw(UNUSED GfxPrint* printer) {
}
void AudioDebug_ScrPrt(const char* str, u16 num) {
void AudioDebug_ScrPrt(UNUSED const char* str, UNUSED u16 num) {
}
#endif
@ -2361,10 +2361,10 @@ void Audio_Update(void) {
}
}
void func_800F3138(UNK_TYPE arg0) {
void func_800F3138(UNUSED UNK_TYPE arg0) {
}
void func_800F3140(UNK_TYPE arg0, UNK_TYPE arg1) {
void func_800F3140(UNUSED UNK_TYPE arg0, UNUSED UNK_TYPE arg1) {
}
void func_800F314C(s8 seqId) {
@ -2449,7 +2449,7 @@ s8 Audio_ComputeSfxReverb(u8 bankId, u8 entryIdx, u8 channelIdx) {
return reverb;
}
s8 Audio_ComputeSfxPanSigned(f32 x, f32 z, u8 token) {
s8 Audio_ComputeSfxPanSigned(f32 x, f32 z, UNUSED u8 token) {
f32 absX;
f32 absZ;
f32 pan;
@ -2600,7 +2600,7 @@ u8 func_800F37B8(f32 behindScreenZ, SfxBankEntry* arg1, s8 arg2) {
return (phi_v1 * 0x10) + (u8)((phi_f0 * phi_f12) / (10000.0f / 5.2f));
}
s8 func_800F3990(f32 posY, u16 sfxParams) {
s8 func_800F3990(f32 posY, UNUSED u16 sfxParams) {
s8 combFilterGain = 0;
if (posY >= 0.0f) {
@ -2626,7 +2626,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIdx, u8 channelIndex) {
u8 baseFilter = 0;
SfxBankEntry* entry = &gSfxBanks[bankId][entryIdx];
#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
s32 pad;
STACK_PAD(s32);
#endif
switch (bankId) {
@ -3634,7 +3634,7 @@ void Audio_SetBgmEnemyVolume(f32 dist) {
}
void Audio_UpdateMalonSinging(f32 dist, u16 seqId) {
s8 pad;
STACK_PAD(u8);
s8 melodyVolume;
s16 curSeqId;
@ -4082,7 +4082,7 @@ void func_800F7170(void) {
AUDIOCMD_GLOBAL_STOP_AUDIOCMDS();
}
void func_800F71BC(s32 arg0) {
void func_800F71BC(UNUSED s32 arg0) {
D_80133418 = 1;
func_800F6C34();
AudioOcarina_ResetStaffs();

View File

@ -21,6 +21,7 @@
#include "audiothread_cmd.h"
#include "seqcmd.h"
#include "sfx.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "ultra64/abi.h"
#include "audio.h"
@ -43,7 +44,7 @@ ActiveSequence gActiveSeqs[4];
void Audio_StartSequence(u8 seqPlayerIndex, u8 seqId, u8 seqArgs, u16 fadeInDuration) {
u8 channelIndex;
u16 skipTicks;
s32 pad;
STACK_PAD(s32);
if (!gStartSeqDisabled || (seqPlayerIndex == SEQ_PLAYER_SFX)) {
seqArgs &= 0x7F;
@ -105,7 +106,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
u8 channelIndex;
u8 i;
f32 freqScaleTarget;
s32 pad;
STACK_PAD(s32);
#if DEBUG_FEATURES
if (gAudioDebugPrintSeqCmd && (cmd & SEQCMD_OP_MASK) != (SEQCMD_OP_SET_SEQPLAYER_IO << 28)) {
@ -483,7 +484,7 @@ void Audio_UpdateActiveSequences(void) {
u8 setupVal2;
u8 setupVal1;
u16 seqId;
s32 pad[2];
STACK_PADS(s32, 2);
u16 channelMask;
u32 retMsg;
f32 volume;

View File

@ -1,7 +1,9 @@
#include "array_count.h"
#include "attributes.h"
#include "audiothread_cmd.h"
#include "printf.h"
#include "sfx.h"
#include "stack_pad.h"
#include "terminal.h"
#include "ultra64.h"
#include "audio.h"
@ -72,7 +74,7 @@ void Audio_ClearBGMMute(u8 channelIndex) {
}
void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* vol, s8* reverbAdd) {
u8 i;
UNUSED_NDEBUG u8 i;
SfxRequest* req;
if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) {
@ -306,7 +308,7 @@ void Audio_ChooseActiveSfx(u8 bankId) {
SfxBankEntry* entry;
ActiveSfx chosenSfx[MAX_CHANNELS_PER_BANK];
ActiveSfx* activeSfx;
s32 pad;
STACK_PAD(s32);
numChosenSfx = 0;
for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) {
@ -519,7 +521,7 @@ void Audio_PlayActiveSfx(u8 bankId) {
void Audio_StopSfxByBank(u8 bankId) {
SfxBankEntry* entry;
s32 pad;
STACK_PAD(s32);
SfxBankEntry cmp;
u8 entryIndex = gSfxBanks[bankId][0].next;
@ -714,7 +716,6 @@ u8 Audio_IsSfxPlaying(u32 sfxId) {
void Audio_ResetSfx(void) {
u8 bankId;
u8 i;
u8 entryIndex;
gSfxRequestWriteIndex = 0;
gSfxRequestReadIndex = 0;

View File

@ -216,7 +216,7 @@ void Audio_NotePortamentoInit(Note* note) {
note->playbackState.portamento = note->playbackState.parentLayer->portamento;
}
void Audio_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, s16* volOut) {
void Audio_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, UNUSED s16* volOut) {
adsr->action.asByte = 0;
adsr->delay = 0;
adsr->envelope = envelope;

View File

@ -1,4 +1,6 @@
#include "alignment.h"
#include "attributes.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "versions.h"
#include "audio.h"
@ -729,7 +731,7 @@ void AudioHeap_LoadFilter(s16* filter, s32 lowPassCutoff, s32 highPassCutoff) {
}
}
void AudioHeap_UpdateReverb(SynthesisReverb* reverb) {
void AudioHeap_UpdateReverb(UNUSED SynthesisReverb* reverb) {
}
void AudioHeap_UpdateReverbs(void) {
@ -843,7 +845,7 @@ s32 AudioHeap_ResetStep(void) {
}
void AudioHeap_Init(void) {
s32 pad1[4];
STACK_PADS(s32, 4);
s16* ramAddr;
s32 persistentSize;
s32 temporarySize;
@ -852,7 +854,7 @@ void AudioHeap_Init(void) {
OSIntMask intMask;
s32 i;
s32 j;
s32 pad2;
STACK_PAD(s32);
AudioSpec* spec = &gAudioSpecs[gAudioCtx.specId]; // Audio Specifications
gAudioCtx.sampleDmaCount = 0;
@ -1391,7 +1393,7 @@ void AudioHeap_ApplySampleBankCacheInternal(s32 apply, s32 sampleBankId) {
Instrument* inst;
SoundEffect* soundEffect;
u32* fakematch;
s32 pad[4];
STACK_PADS(s32, 4);
sampleBankTable = gAudioCtx.sampleBankTable;
numFonts = gAudioCtx.soundFontTable->header.numEntries;

View File

@ -7,6 +7,7 @@
#include "attributes.h"
#include "buffers.h"
#include "segment_symbols.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "versions.h"
#include "audio.h"
@ -121,11 +122,11 @@ void AudioLoad_DecreaseSampleDmaTtls(void) {
* original name:Nas_WaveDmaCallBack
*/
void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium) {
s32 pad1;
STACK_PAD(s32);
SampleDma* dma;
s32 hasDma = false;
u32 dmaDevAddr;
u32 pad2;
STACK_PAD(s32);
u32 dmaIndex;
u32 transfer;
s32 bufferPos;
@ -217,7 +218,7 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef,
/**
* original name: Nas_WaveDmaNew
*/
void AudioLoad_InitSampleDmaBuffers(s32 numNotes) {
void AudioLoad_InitSampleDmaBuffers(UNUSED s32 numNotes) {
SampleDma* dma;
s32 i;
s32 t2;
@ -395,12 +396,12 @@ void AudioLoad_InitTable(AudioTable* table, u32 romAddr, u16 unkMediumParam) {
* original name: Nas_PreLoadBank
*/
SoundFontData* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outDefaultFontId) {
s32 pad[2];
STACK_PADS(s32, 2);
s32 index;
SoundFontData* fontData;
s32 numFonts;
s32 fontId;
s32 i;
STACK_PAD(s32);
if (seqId >= gAudioCtx.numSequences) {
return NULL;
@ -424,7 +425,7 @@ SoundFontData* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outDefaultFontId) {
* original name: Nas_PreLoadSeq
*/
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1) {
s32 pad;
STACK_PAD(s32);
u32 defaultFontId;
if (seqId < gAudioCtx.numSequences) {
@ -505,21 +506,21 @@ void AudioLoad_AsyncLoad(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesg
/**
* original name: Nas_PreLoadSeq_BG
*/
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
void AudioLoad_AsyncLoadSeq(s32 seqId, UNUSED s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(SEQUENCE_TABLE, seqId, 0, retData, retQueue);
}
/**
* original name: Nas_PreLoadWave_BG
*/
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, UNUSED s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(SAMPLE_TABLE, sampleBankId, 0, retData, retQueue);
}
/**
* original name: Nas_PreLoadBank_BG
*/
void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, OSMesgQueue* retQueue) {
void AudioLoad_AsyncLoadFont(s32 fontId, UNUSED s32 arg1, s32 retData, OSMesgQueue* retQueue) {
AudioLoad_AsyncLoad(FONT_TABLE, fontId, 0, retData, retQueue);
}
@ -610,7 +611,7 @@ s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 skipTicks
/**
* original name: __Nas_StartSeq
*/
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, UNUSED s32 arg2) {
SequencePlayer* seqPlayer = &gAudioCtx.seqPlayers[playerIdx];
u8* seqData;
s32 index;
@ -656,7 +657,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
* original name: __Load_Seq
*/
u8* AudioLoad_SyncLoadSeq(s32 seqId) {
s32 pad;
STACK_PAD(s32);
s32 didAllocate;
if (gAudioCtx.seqLoadStatus[AudioLoad_GetRealTableIndex(SEQUENCE_TABLE, seqId)] == LOAD_STATUS_IN_PROGRESS) {
@ -756,7 +757,7 @@ SoundFontData* AudioLoad_SyncLoadFont(u32 fontId) {
void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) {
u32 size;
AudioTable* table;
s32 pad;
STACK_PAD(s32);
u32 medium;
s32 loadStatus;
u32 romAddr;
@ -1060,14 +1061,14 @@ void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) {
/**
* original name: Nas_FastDiskCopy
*/
void AudioLoad_SyncDmaUnkMedium(u32 devAddr, u8* addr, u32 size, s32 unkMediumParam) {
void AudioLoad_SyncDmaUnkMedium(UNUSED u32 devAddr, UNUSED u8* addr, UNUSED u32 size, UNUSED s32 unkMediumParam) {
}
/**
* original name: Nas_StartDma
*/
s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void* ramAddr, u32 size,
OSMesgQueue* reqQueue, s32 medium, const char* dmaFuncType) {
OSMesgQueue* reqQueue, s32 medium, UNUSED const char* dmaFuncType) {
OSPiHandle* handle;
if (gAudioCtx.resetTimer > 16) {
@ -1129,7 +1130,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData,
s8 cachePolicy;
u32 devAddr;
s32 loadStatus;
s32 pad;
STACK_PAD(s32);
u32 realId = AudioLoad_GetRealTableIndex(tableType, id);
switch (tableType) {
@ -1268,7 +1269,7 @@ void AudioLoad_InitSoundFont(s32 fontId) {
* original name: Nas_InitAudio
*/
void AudioLoad_Init(void* heap, u32 heapSize) {
s32 pad[18];
STACK_PADS(s32, 18);
s32 numFonts;
void* ramAddr;
s32 i;
@ -1582,7 +1583,7 @@ void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size) {
/**
* original name: __Nas_SlowDiskCopy
*/
void AudioLoad_DmaSlowCopyUnkMedium(s32 devAddr, u8* ramAddr, s32 size, s32 arg3) {
void AudioLoad_DmaSlowCopyUnkMedium(UNUSED s32 devAddr, UNUSED u8* ramAddr, UNUSED s32 size, UNUSED s32 arg3) {
}
/**
@ -1739,7 +1740,7 @@ void AudioLoad_ProcessAsyncLoads(s32 resetStatus) {
/**
* original name: __BgCopyDisk
*/
void AudioLoad_ProcessAsyncLoadUnkMedium(AudioAsyncLoad* asyncLoad, s32 resetStatus) {
void AudioLoad_ProcessAsyncLoadUnkMedium(UNUSED AudioAsyncLoad* asyncLoad, UNUSED s32 resetStatus) {
}
/**
@ -1748,7 +1749,7 @@ void AudioLoad_ProcessAsyncLoadUnkMedium(AudioAsyncLoad* asyncLoad, s32 resetSta
void AudioLoad_FinishAsyncLoad(AudioAsyncLoad* asyncLoad) {
u32 retMsg = asyncLoad->retMsg;
u32 fontId;
u32 pad;
STACK_PAD(s32);
OSMesg doneMsg;
u32 sampleBankId1;
u32 sampleBankId2;
@ -1850,7 +1851,7 @@ void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) {
/**
* original name: __Nas_BgDiskCopy
*/
void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, void* ramAddr, u32 size, s16 arg3) {
void AudioLoad_AsyncDmaUnkMedium(UNUSED u32 devAddr, UNUSED void* ramAddr, UNUSED u32 size, UNUSED s16 arg3) {
}
/**
@ -2035,7 +2036,7 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) {
u32 preloadIndex;
u32 key;
u32 nChunks;
s32 pad;
STACK_PAD(s32);
if (gAudioCtx.preloadSampleStackTop > 0) {
if (resetStatus != 0) {
@ -2300,10 +2301,10 @@ void AudioLoad_PreloadSamplesForFont(s32 fontId, s32 async, SampleBankRelocInfo*
* original name: EmemReload
*/
void AudioLoad_LoadPermanentSamples(void) {
s32 pad;
STACK_PAD(s32);
u32 fontId;
AudioTable* sampleBankTable;
s32 pad2;
STACK_PAD(s32);
s32 i;
sampleBankTable = AudioLoad_GetLoadTable(SAMPLE_TABLE);

View File

@ -1,11 +1,12 @@
#include "ultra64.h"
#include "audio.h"
#include "stack_pad.h"
void Audio_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* attrs) {
f32 volLeft;
f32 volRight;
s32 halfPanIndex;
u64 pad;
STACK_PADS(s32, 3);
u8 strongLeft;
u8 strongRight;
f32 vel;
@ -153,7 +154,7 @@ void Audio_NoteDisable(Note* note) {
}
void Audio_ProcessNotes(void) {
s32 pad[2];
STACK_PADS(s32, 2);
NoteAttributes* attrs;
NoteSubEu* noteSubEu2;
NoteSubEu* noteSubEu;
@ -759,7 +760,7 @@ Note* Audio_FindNodeWithPrioLessThan(AudioListItem* list, s32 limit) {
}
void Audio_NoteInitForLayer(Note* note, SequenceLayer* layer) {
s32 pad[3];
STACK_PADS(s32, 3);
s16 instId;
NotePlaybackState* playbackState = &note->playbackState;
NoteSubEu* sub = &note->noteSubEu;

View File

@ -18,6 +18,7 @@
#include "array_count.h"
#include "assert.h"
#include "attributes.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "audio.h"
@ -323,7 +324,7 @@ void AudioSeq_InitSequenceChannel(SequenceChannel* channel) {
*/
s32 AudioSeq_SeqChannelSetLayer(SequenceChannel* channel, s32 layerIndex) {
SequenceLayer* layer;
s32 pad;
STACK_PAD(s32);
if (channel->layers[layerIndex] == NULL) {
layer = AudioSeq_AudioListPopBack(&gAudioCtx.layerFreeList);
@ -432,7 +433,7 @@ void AudioSeq_SequencePlayerSetupChannels(SequencePlayer* seqPlayer, u16 channel
/**
* original name: Nas_DeAllocSub
*/
void AudioSeq_SequencePlayerDisableChannels(SequencePlayer* seqPlayer, u16 channelBitsUnused) {
void AudioSeq_SequencePlayerDisableChannels(SequencePlayer* seqPlayer, UNUSED u16 channelBits) {
SequenceChannel* channel;
s32 i;
@ -476,9 +477,9 @@ void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer) {
* original name: Nas_ReleaseGroup
*/
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer) {
#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
s32 finished = 0;
#if !(OOT_VERSION < NTSC_1_1 || !PLATFORM_N64)
if (seqPlayer->finished == 1) {
finished = 1;
}
@ -1828,7 +1829,7 @@ void AudioSeq_SequencePlayerProcessSequence(SequencePlayer* seqPlayer) {
u8* data;
u8* data2;
u8* data3;
s32 pad;
STACK_PAD(s32);
s32 dummy;
s32 delay;

View File

@ -1,4 +1,6 @@
#include "alignment.h"
#include "attributes.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "audio.h"
@ -61,7 +63,7 @@ u8 sNumSamplesPerWavePeriod[] = {
void AudioSynth_InitNextRingBuf(s32 chunkLen, s32 updateIndex, s32 reverbIndex) {
ReverbRingBufferItem* bufItem;
s32 pad[3];
STACK_PADS(s32, 3);
SynthesisReverb* reverb = &gAudioCtx.synthesisReverbs[reverbIndex];
s32 temp_a0_2;
s32 temp_a0_4;
@ -156,7 +158,6 @@ Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen)
Acmd* cmdP;
s32 i;
s32 j;
SynthesisReverb* reverb;
cmdP = cmdStart;
for (i = gAudioCtx.audioBufferParameters.ticksPerUpdate; i > 0; i--) {
@ -480,7 +481,7 @@ void AudioSynth_LoadFilterSize(Acmd* cmd, s32 size, void* addr) {
aFilter(cmd, 2, size, addr);
}
Acmd* AudioSynth_LoadRingBuffer1(Acmd* cmd, s32 aiBufLen, SynthesisReverb* reverb, s16 updateIndex) {
Acmd* AudioSynth_LoadRingBuffer1(Acmd* cmd, UNUSED s32 aiBufLen, SynthesisReverb* reverb, s16 updateIndex) {
ReverbRingBufferItem* ringBufferItem = &reverb->items[reverb->curFrame][updateIndex];
cmd =
@ -494,7 +495,7 @@ Acmd* AudioSynth_LoadRingBuffer1(Acmd* cmd, s32 aiBufLen, SynthesisReverb* rever
return cmd;
}
Acmd* AudioSynth_LoadRingBuffer2(Acmd* cmd, s32 aiBufLen, SynthesisReverb* reverb, s16 updateIndex) {
Acmd* AudioSynth_LoadRingBuffer2(Acmd* cmd, UNUSED s32 aiBufLen, SynthesisReverb* reverb, s16 updateIndex) {
ReverbRingBufferItem* bufItem = &reverb->items2[reverb->curFrame][updateIndex];
cmd = AudioSynth_LoadRingBufferPart(cmd, DMEM_WET_LEFT_CH, bufItem->startPos, bufItem->lengthA, reverb);
@ -707,9 +708,9 @@ Acmd* AudioSynth_DoOneAudioUpdate(s16* aiBuf, s32 aiBufLen, Acmd* cmd, s32 updat
return cmd;
}
Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisState* synthState, s16* aiBuf,
Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisState* synthState, UNUSED s16* aiBuf,
s32 aiBufLen, Acmd* cmd, s32 updateIndex) {
s32 pad1[3];
STACK_PADS(s32, 3);
Sample* sample;
AdpcmLoop* loopInfo;
s32 nSamplesUntilLoopEnd;
@ -723,7 +724,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
s32 gain;
s32 frameIndex;
s32 skipBytes;
s32 temp_v1_6;
STACK_PAD(s32);
s16* combFilterState;
s32 nSamplesToDecode;
u32 sampleAddr;
@ -734,7 +735,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
s32 nSamplesToProcess;
s32 phi_s4;
s32 nFirstFrameSamplesToIgnore;
s32 pad2[7];
STACK_PADS(s32, 7);
s32 frameSize;
s32 nFramesToDecode;
s32 skipInitialSamples;
@ -758,7 +759,6 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
s32 finished;
s32 aligned;
s16 addr;
u16 unused;
bookOffset = noteSubEu->bitField1.bookOffset;
finished = noteSubEu->bitField0.finished;
@ -1158,7 +1158,7 @@ Acmd* AudioSynth_FinalResample(Acmd* cmd, NoteSynthesisState* synthState, s32 si
}
Acmd* AudioSynth_ProcessEnvelope(Acmd* cmd, NoteSubEu* noteSubEu, NoteSynthesisState* synthState, s32 aiBufLen,
u16 dmemSrc, s32 haasEffectDelaySide, s32 flags) {
u16 dmemSrc, s32 haasEffectDelaySide, UNUSED s32 flags) {
u32 dmemDests;
u16 curVolLeft;
u16 targetVolLeft;
@ -1170,7 +1170,7 @@ Acmd* AudioSynth_ProcessEnvelope(Acmd* cmd, NoteSubEu* noteSubEu, NoteSynthesisS
s16 rampReverb;
s16 sourceReverbVol;
u16 targetVolRight;
s32 pad;
STACK_PAD(s32);
curVolLeft = synthState->curVolLeft;
targetVolLeft = noteSubEu->targetVolLeft;

View File

@ -4,6 +4,7 @@
#include "array_count.h"
#include "audiothread_cmd.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "versions.h"
#include "audio.h"
@ -41,7 +42,7 @@ AudioTask* AudioThread_UpdateImpl(void) {
#endif
u32 samplesRemainingInAi;
s32 abiCmdCnt;
s32 pad;
STACK_PAD(s32);
s32 j;
s32 sp5C;
s16* curAiBuffer;
@ -211,7 +212,7 @@ AudioTask* AudioThread_UpdateImpl(void) {
*/
void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) {
s32 i;
s32 pad[3];
STACK_PADS(s32, 3);
u32 flags;
switch (cmd->op) {
@ -557,7 +558,7 @@ void Audio_GetSampleBankIdsOfFont(s32 fontId, u32* sampleBankId1, u32* sampleBan
* original name: Nap_CheckSpecChange
*/
s32 func_800E5EDC(void) {
s32 pad;
STACK_PAD(s32);
s32 specId;
if (osRecvMesg(gAudioCtx.audioResetQueueP, (OSMesg*)&specId, OS_MESG_NOBLOCK) == -1) {
@ -585,7 +586,7 @@ void func_800E5F34(void) {
s32 AudioThread_ResetAudioHeap(s32 specId) {
s32 resetStatus;
OSMesg msg;
s32 pad;
STACK_PAD(s32);
func_800E5F34();
resetStatus = gAudioCtx.resetStatus;

View File

@ -299,7 +299,7 @@ void* gzip_malloc(size_t size) {
return ret;
}
void gzip_free(void* ptr) {
void gzip_free(UNUSED void* ptr) {
gzip_malloc_tmp = 0;
gzip_malloc_addr = gzip_mem_buff;
}

View File

@ -1,5 +1,6 @@
#include "is_debug.h"
#include "attributes.h"
#include "ultra64.h"
#include "versions.h"
@ -66,7 +67,7 @@ void func_800015F4(void) {
#endif
#if DEBUG_FEATURES
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
void* is_proutSyncPrintf(UNUSED void* arg, const char* str, size_t count) {
u32 data;
s32 pos;
s32 start;
@ -95,7 +96,7 @@ void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
u32 addr = (u32)&gISVDbgPrnAdrs->data + (start & 0xFFFFFFC);
s32 shift = ((3 - (start & 3)) * 8);
if (*str) {
if (*str != '\0') {
osEPiReadIo(sISVHandle, addr, &data);
osEPiWriteIo(sISVHandle, addr, (*str << shift) | (data & ~(0xFF << shift)));

View File

@ -1,6 +1,7 @@
#include "yaz0.h"
#include "alignment.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "dma.h"
@ -14,7 +15,7 @@ size_t sYaz0CurSize;
u8* sYaz0MaxPtr;
void* Yaz0_FirstDMA(void) {
s32 pad[2];
STACK_PADS(s32, 2);
size_t dmaSize;
size_t bufferSize;

View File

@ -1,5 +1,6 @@
#include "libu64/debug.h"
#include "alignment.h"
#include "attributes.h"
#include "carthandle.h"
#include "line_numbers.h"
#include "padmgr.h"
@ -29,6 +30,9 @@ typedef struct LocaleCartInfo {
void Locale_Init(void) {
#if !PLATFORM_GC
ALIGNED(4) u8 regionInfo[4];
#if PLATFORM_IQUE
UNUSED
#endif
u8 countryCode;
osEPiReadIo(gCartHandle, 0x3C, (u32*)regionInfo);

View File

@ -36,6 +36,7 @@
#include "printf.h"
#include "segment_symbols.h"
#include "stack.h"
#include "stack_pad.h"
#include "stackcheck.h"
#include "terminal.h"
#include "translation.h"
@ -131,7 +132,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
s32 ret;
size_t buffSize = gDmaMgrDmaBuffSize;
#if DEBUG_FEATURES
UNUSED s32 pad;
STACK_PAD(s32);
#endif
if (buffSize == 0) {
@ -177,7 +178,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
SET_IOMSG(ioMsg, &queue, rom, ram, size);
{ UNUSED s32 pad2; }
{ STACK_PAD(s32); }
if (gDmaMgrVerbose == 10) {
PRINTF(T("%10lld ノーマルDMA %08x %08x %08x (%d)\n", "%10lld Normal DMA %08x %08x %08x (%d)\n"),
@ -249,7 +250,7 @@ s32 DmaMgr_AudioDmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
*/
void DmaMgr_DmaFromDriveRom(void* ram, uintptr_t rom, size_t size) {
#if PLATFORM_N64
s32 pad;
STACK_PAD(s32);
#endif
OSPiHandle* handle = osDriveRomInit();
OSMesgQueue queue;
@ -324,7 +325,7 @@ NORETURN void DmaMgr_Error(DmaRequest* req, const char* filename, const char* er
* @param vrom Virtual ROM location
* @return Pointer to associated filename
*/
const char* DmaMgr_FindFileName(uintptr_t vrom) {
const char* DmaMgr_FindFileName(UNUSED_NDEBUG uintptr_t vrom) {
#if DEBUG_FEATURES
DmaEntry* iter = gDmaDataTable;
const char** name = sDmaMgrFileNames;
@ -348,7 +349,7 @@ const char* DmaMgr_FindFileName(uintptr_t vrom) {
}
#endif
const char* DmaMgr_GetFileName(uintptr_t vrom) {
const char* DmaMgr_GetFileName(UNUSED_NDEBUG uintptr_t vrom) {
#if PLATFORM_GC && DEBUG_FEATURES
const char* ret = DmaMgr_FindFileName(vrom);
@ -379,7 +380,9 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
u8 found = false;
DmaEntry* iter;
UNUSED_NDEBUG const char* filename;
#if !PLATFORM_GC
s32 i = 0;
#endif
#if DEBUG_FEATURES
// Get the filename (for debugging)
@ -504,7 +507,7 @@ void DmaMgr_ProcessRequest(DmaRequest* req) {
}
}
void DmaMgr_ThreadEntry(void* arg) {
void DmaMgr_ThreadEntry(UNUSED void* arg) {
OSMesg msg;
DmaRequest* req;
@ -550,9 +553,9 @@ void DmaMgr_ThreadEntry(void* arg) {
* @param msg Message to send to `queue` once the transfer is complete.
* @return 0
*/
s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue,
s32 DmaMgr_RequestAsync(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, UNUSED u32 unk, OSMesgQueue* queue,
OSMesg msg) {
static s32 sDmaMgrQueueFullLogged = 0;
UNUSED_NDEBUG static s32 sDmaMgrQueueFullLogged = 0;
#if PLATFORM_IQUE
PRINTF("dmacopy_bg(%x, %x, %x, %x, %x, %x, %x)\n", req, ram, vrom, size, unk, queue, msg);
@ -625,9 +628,9 @@ s32 DmaMgr_RequestSync(void* ram, uintptr_t vrom, size_t size) {
}
void DmaMgr_Init(void) {
const char** name;
s32 idx;
DmaEntry* iter;
UNUSED_NDEBUG const char** name;
UNUSED_NDEBUG s32 idx;
UNUSED_NDEBUG DmaEntry* iter;
// DMA the dma data table to RAM
DmaMgr_DmaRomToRam((uintptr_t)_dmadataSegmentRomStart, _dmadataSegmentStart,
@ -700,7 +703,7 @@ s32 DmaMgr_RequestSyncDebug(void* ram, uintptr_t vrom, size_t size, const char*
s32 ret;
OSMesgQueue queue;
OSMesg msg;
s32 pad;
STACK_PAD(s32);
req.filename = file;
req.line = line;

View File

@ -12,6 +12,7 @@
#include "prerender.h"
#include "printf.h"
#include "regs.h"
#include "stack_pad.h"
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
this->widthSave = width;
@ -725,7 +726,7 @@ void PreRender_DivotFilter(PreRender* this) {
u8* buffR = alloca(this->width);
u8* buffG = alloca(this->width);
u8* buffB = alloca(this->width);
s32 pad2[3];
STACK_PADS(s32, 3);
s32 pxR;
s32 pxG;
s32 pxB;

View File

@ -6,6 +6,7 @@
*/
#include "array_count.h"
#include "attributes.h"
#include "audiomgr.h"
#include "printf.h"
#include "regs.h"
@ -86,7 +87,7 @@ void AudioMgr_HandleRetrace(AudioMgr* audioMgr) {
*
* @see Audio_PreNMI
*/
void AudioMgr_HandlePreNMI(AudioMgr* audioMgr) {
void AudioMgr_HandlePreNMI(UNUSED AudioMgr* audioMgr) {
PRINTF(
T("オーディオマネージャが OS_SC_PRE_NMI_MSG を受け取りました\n", "Audio manager received OS_SC_PRE_NMI_MSG\n"));
Audio_PreNMI();

View File

@ -82,5 +82,5 @@ n64ddStruct_800FEE70_pointers* func_800AD560(void) {
void func_800AD590(void) {
}
void func_800AD598(s32 arg0, s32 arg1, s32 arg2) {
void func_800AD598(UNUSED s32 arg0, UNUSED s32 arg1, UNUSED s32 arg2) {
}

View File

@ -9,6 +9,7 @@
#include "printf.h"
#include "regs.h"
#include "sfx.h"
#include "stack_pad.h"
#include "z_lib.h"
#include "camera.h"
#include "cutscene.h"
@ -448,7 +449,7 @@ void DebugCamera_PrintF32Bytes(f32 value) {
}
void DebugCamera_PrintU16Bytes(u16 value) {
u16 pad;
STACK_PAD(s16);
u16 b = value;
char* a = (char*)&b;
@ -456,7 +457,7 @@ void DebugCamera_PrintU16Bytes(u16 value) {
}
void DebugCamera_PrintS16Bytes(s16 value) {
u16 pad;
STACK_PAD(s16);
s16 b = value;
char* a = (char*)&b;
@ -590,7 +591,7 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam) {
UNUSED Vec3f* at;
Vec3f* phi_s0;
Vec3f spD8;
s32 pad;
STACK_PAD(s32);
Vec3f* sp90;
Vec3f* sp80;
Vec3f* sp7C;
@ -1672,7 +1673,7 @@ s32 DebugCamera_LoadCallback(char* c) {
}
s32 DebugCamera_SaveCallback(char* c) {
s32 pad[2];
STACK_PADS(s32, 2);
s32 ret;
u32 freeSize;
s32 off;
@ -1742,7 +1743,7 @@ void DebugCamera_DrawSlotLetters(char* str, s16 y, s16 x, s32 colorIndex) {
DebugCamera_ScreenTextColored(20 + x, y, colorIndex, str + 0x14);
}
void DebugCamera_PrintAllCuts(Camera* cam) {
void DebugCamera_PrintAllCuts(UNUSED Camera* cam) {
s32 i;
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
@ -1772,8 +1773,7 @@ char D_8012D128[] = GFXP_KATAKANA "ト-タル ";
char D_8012D13C[] = GFXP_KATAKANA "キ- / ";
s32 func_800B91B0(Camera* cam, DebugCam* debugCam) {
s32 pointCount;
s32 curPoint;
STACK_PADS(s32, 2);
while (sDebugCamCuts[D_8016110C].letter == '?') {
D_8016110C++;
@ -1843,7 +1843,7 @@ s32 func_800B91B0(Camera* cam, DebugCam* debugCam) {
return D_8016110C | 0x8000;
}
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam) {
void DebugCamera_Reset(UNUSED Camera* cam, DebugCam* debugCam) {
s32 i;
D_801612EA = '*';

View File

@ -45,6 +45,7 @@
"gc-us-mq:160 ique-cn:160"
#include "libc64/sleep.h"
#include "attributes.h"
#include "libc64/sprintf.h"
#include "alloca.h"
#include "array_count.h"
@ -53,6 +54,7 @@
#include "padmgr.h"
#include "fault.h"
#include "stack.h"
#include "stack_pad.h"
#include "stackcheck.h"
#include "terminal.h"
#include "translation.h"
@ -663,7 +665,7 @@ OSThread* Fault_FindFaultedThread(void) {
}
void Fault_Wait5Seconds(void) {
s32 pad;
STACK_PAD(s32);
OSTime start = osGetTime();
do {
@ -827,7 +829,7 @@ void Fault_WaitForButtonCombo(void) {
}
}
void Fault_DrawMemDumpContents(const char* title, uintptr_t addr, u32 arg2) {
void Fault_DrawMemDumpContents(const char* title, uintptr_t addr, UNUSED u32 arg2) {
uintptr_t alignedAddr = addr;
u32* writeAddr;
s32 y;
@ -1109,7 +1111,7 @@ void Fault_LogStackTrace(OSThread* thread, s32 height) {
uintptr_t ra = thread->context.ra;
uintptr_t pc = thread->context.pc;
uintptr_t addr;
s32 pad;
STACK_PAD(s32);
osSyncPrintf("STACK TRACE\nSP PC (VPC)\n");
for (line = 1; line < height && (ra != 0 || sp != 0) && pc != (uintptr_t)__osCleanupThread; line++) {
@ -1185,10 +1187,10 @@ void Fault_UpdatePad(void) {
#define FAULT_MSG_FAULT ((OSMesg)2)
#define FAULT_MSG_UNK ((OSMesg)3)
void Fault_ThreadEntry(void* arg) {
void Fault_ThreadEntry(UNUSED void* arg) {
OSMesg msg;
OSThread* faultedThread;
s32 pad;
STACK_PAD(s32);
// Direct OS event messages to the fault event queue
osSetEventMesg(OS_EVENT_CPU_BREAK, &sFaultInstance->queue, FAULT_MSG_CPU_BREAK);
@ -1327,7 +1329,7 @@ void Fault_HungupFaultClient(const char* exp1, const char* exp2) {
*/
NORETURN void Fault_AddHungupAndCrashImpl(const char* exp1, const char* exp2) {
FaultClient client;
s32 pad;
STACK_PAD(s32);
Fault_AddClient(&client, Fault_HungupFaultClient, (void*)exp1, (void*)exp2);
*(u32*)0x11111111 = 0; // trigger an exception via unaligned memory access

View File

@ -8,6 +8,7 @@
#include "padmgr.h"
#include "segmented_address.h"
#include "stack.h"
#include "stack_pad.h"
#include "stackcheck.h"
#include "terminal.h"
#include "thread.h"
@ -454,7 +455,7 @@ void Fault_WaitForButtonCombo(void) {
s32 x;
s32 y;
s32 count;
s32 pad[4];
STACK_PADS(s32, 4);
// "KeyWaitB (L R Z Up Down Up Down Left Left Right Right B A START)"
osSyncPrintf(VT_FGCOL(WHITE) T("KeyWaitB ( ", "KeyWaitB (L R Z ") VT_FGCOL(WHITE) T("", "Up ")
@ -625,7 +626,7 @@ void func_800AF0E0(void) {
Fault_DrawText(40, 180, "Arena_failcnt = %d", gTotalAllocFailures);
}
void Fault_DrawMemDumpContents(const char* title, void* memory, u32 arg2) {
void Fault_DrawMemDumpContents(const char* title, void* memory, UNUSED u32 arg2) {
s32 x;
s32 y;
u32* ptr = (u32*)((uintptr_t)memory & ~3);
@ -661,7 +662,7 @@ void Fault_DrawMemDumpSP(OSThread* thread) {
void func_800AF3DC(void) {
static s32 B_80122570[16];
static s32 B_801225B0[8]; // Unused
UNUSED static s32 B_801225B0[8];
s32 i;
Fault_DrawRecBlack(22, 16, 276, 208);
@ -750,7 +751,7 @@ void Fault_ProcessClients(void) {
#define FAULT_MSG_FAULT ((OSMesg)2)
#define FAULT_MSG_UNK ((OSMesg)3)
void Fault_ThreadEntry(void* arg0) {
void Fault_ThreadEntry(UNUSED void* arg0) {
OSMesg msg;
OSThread* faultedThread;

View File

@ -7,6 +7,7 @@
#include "controller.h"
#include "play_state.h"
#include "save.h"
#include "stack_pad.h"
typedef struct FlagSetEntry {
/* 0x00 */ u16* value;
@ -83,7 +84,7 @@ void FlagSet_Update(PlayState* play) {
{
GfxPrint printer;
s32 pad;
STACK_PAD(s32);
polyOpa = POLY_OPA_DISP;
gfx = Gfx_Open(polyOpa);

View File

@ -1,4 +1,5 @@
#include "libc64/malloc.h"
#include "attributes.h"
#include "libc64/os_malloc.h"
#include "libu64/debug.h"
#include "libu64/gfxprint.h"
@ -20,6 +21,7 @@
#include "regs.h"
#include "rumble.h"
#include "speed_meter.h"
#include "stack_pad.h"
#include "sys_debug_controller.h"
#include "terminal.h"
#include "translation.h"
@ -97,7 +99,7 @@ void GameState_SetFBFilter(Gfx** gfxP) {
*gfxP = gfx;
}
void func_800C4344(GameState* gameState) {
void func_800C4344(UNUSED_NDEBUG GameState* gameState) {
#if DEBUG_FEATURES
Input* selectedInput;
s32 hexDumpSize;
@ -212,7 +214,7 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
}
if (R_ENABLE_AUDIO_DBG & 1) {
s32 pad;
STACK_PAD(s32);
GfxPrint printer;
GfxPrint_Init(&printer);
@ -225,7 +227,8 @@ void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx) {
if (R_ENABLE_ARENA_DBG < 0) {
#if PLATFORM_GC && DEBUG_FEATURES
s32 pad;
STACK_PAD(s32);
DebugArena_Display();
SystemArena_Display();
#endif
@ -477,7 +480,8 @@ void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* g
gameState->size = (u32)(gameState->init = NULL);
{
s32 requiredScopeTemp;
STACK_PAD(s32);
endTime = osGetTime();
PRINTF(T("game_set_next_game_null 処理時間 %d us\n", "game_set_next_game_null processing time %d us\n"),
OS_CYCLES_TO_USEC(endTime - startTime));

View File

@ -1,4 +1,5 @@
#include "libc64/malloc.h"
#include "attributes.h"
#include "libc64/sprintf.h"
#include "libu64/debug.h"
#include "array_count.h"
@ -16,6 +17,7 @@
#include "regs.h"
#include "setup_state.h"
#include "speed_meter.h"
#include "stack_pad.h"
#include "sys_cfb.h"
#include "sys_debug_controller.h"
#include "sys_ucode.h"
@ -184,7 +186,7 @@ void Graph_Init(GraphicsContext* gfxCtx) {
#endif
}
void Graph_Destroy(GraphicsContext* gfxCtx) {
void Graph_Destroy(UNUSED GraphicsContext* gfxCtx) {
#if DEBUG_FEATURES
func_800D3210();
Fault_RemoveClient(&sGraphFaultClient);
@ -446,7 +448,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
{
OSTime timeNow = osGetTime();
s32 pad;
STACK_PAD(s32);
gRSPGfxTimeTotal = gRSPGfxTimeAcc;
gRSPAudioTimeTotal = gRSPAudioTimeAcc;
@ -478,7 +480,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
#endif
}
void Graph_ThreadEntry(void* arg0) {
void Graph_ThreadEntry(UNUSED void* arg) {
GraphicsContext gfxCtx;
GameState* gameState;
u32 size;
@ -526,7 +528,7 @@ void Graph_ThreadEntry(void* arg0) {
}
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size) {
TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
UNUSED_NDEBUG TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
if (HREG(59) == 1) {
PRINTF("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->start,
@ -536,7 +538,7 @@ void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size) {
}
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size) {
TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
UNUSED_NDEBUG TwoHeadGfxArena* thga = &gfxCtx->polyOpa;
if (HREG(59) == 1) {
PRINTF("graph_alloc siz=%d thga size=%08x bufp=%08x head=%08x tail=%08x\n", size, thga->size, thga->start,

View File

@ -34,6 +34,7 @@
*/
#include "libu64/debug.h"
#include "array_count.h"
#include "attributes.h"
#include "irqmgr.h"
#include "printf.h"
#include "stackcheck.h"
@ -248,7 +249,7 @@ void IrqMgr_HandlePreNMI480(IrqMgr* irqMgr) {
}
}
void IrqMgr_HandlePreNMI500(IrqMgr* irqMgr) {
void IrqMgr_HandlePreNMI500(UNUSED IrqMgr* irqMgr) {
IrqMgr_CheckStacks();
}

View File

@ -1,4 +1,5 @@
#include "jpeg.h"
#include "stack_pad.h"
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
@ -11,7 +12,7 @@ u8 sJpegBitStreamDontSkip;
u32 sJpegBitStreamCurWord;
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state) {
s16 pad;
STACK_PAD(s16);
s16 unk0;
s16 unk1;
s16 unk2;

View File

@ -8,8 +8,10 @@
* 'ZELDA DEMO TOOL', encoded according to the N64 Font Code described in section 26.3 of the N64 Programming Manual.
*/
#include "mempak.h"
#include "attributes.h"
#include "padmgr.h"
#include "printf.h"
#include "stack_pad.h"
#define MEMPAK_MAX_FILES 11
@ -41,7 +43,7 @@ u8 sMempakExtName[PFS_FILE_EXT_LEN] = { 0 };
*/
s32 Mempak_Init(s32 controllerNum) {
OSMesgQueue* serialEventQueue;
s32 pad;
STACK_PAD(s32);
s32 ret = false;
serialEventQueue = PadMgr_AcquireSerialEventQueue(&gPadMgr);
@ -55,7 +57,7 @@ s32 Mempak_Init(s32 controllerNum) {
return ret;
}
s32 Mempak_GetFreeBytes(s32 controllerNum) {
s32 Mempak_GetFreeBytes(UNUSED s32 controllerNum) {
return sMempakFreeBytes;
}
@ -69,7 +71,7 @@ s32 Mempak_GetFreeBytes(s32 controllerNum) {
* @param end End file letter (inclusive)
* @return a bitfield where set bits indicate that the file exists
*/
s32 Mempak_FindFiles(s32 controllerNum, char start, char end) {
s32 Mempak_FindFiles(UNUSED s32 controllerNum, char start, char end) {
OSMesgQueue* serialEventQueue;
s32 error;
char letter;
@ -108,11 +110,11 @@ s32 Mempak_FindFiles(s32 controllerNum, char start, char end) {
* @param size Size in bytes
* @return true if the operation completed successfully, false otherwise
*/
s32 Mempak_Write(s32 controllerNum, char letter, void* buffer, s32 offset, s32 size) {
s32 Mempak_Write(UNUSED s32 controllerNum, char letter, void* buffer, s32 offset, s32 size) {
OSMesgQueue* serialEventQueue;
s32 error;
s32 ret = false;
s32 pad;
STACK_PAD(s32);
serialEventQueue = PadMgr_AcquireSerialEventQueue(&gPadMgr);
@ -139,11 +141,11 @@ s32 Mempak_Write(s32 controllerNum, char letter, void* buffer, s32 offset, s32 s
* @param size Size in bytes
* @return true if the operation completed successfully, false otherwise
*/
s32 Mempak_Read(s32 controllerNum, char letter, void* buffer, s32 offset, s32 size) {
s32 Mempak_Read(UNUSED s32 controllerNum, char letter, void* buffer, s32 offset, s32 size) {
OSMesgQueue* serialEventQueue;
s32 error;
s32 ret = false;
s32 pad;
STACK_PAD(s32);
serialEventQueue = PadMgr_AcquireSerialEventQueue(&gPadMgr);
@ -171,12 +173,12 @@ s32 Mempak_Read(s32 controllerNum, char letter, void* buffer, s32 offset, s32 si
* @param size File size
* @return true if the operation completed successfully, false otherwise
*/
s32 Mempak_CreateFile(s32 controllerNum, char* letter, s32 size) {
s32 Mempak_CreateFile(UNUSED s32 controllerNum, char* letter, s32 size) {
OSMesgQueue* serialEventQueue;
s32 error;
s32 ret = false;
s32 i;
s32 pad;
STACK_PAD(s32);
serialEventQueue = PadMgr_AcquireSerialEventQueue(&gPadMgr);
@ -236,7 +238,7 @@ s32 Mempak_CreateFile(s32 controllerNum, char* letter, s32 size) {
* @param letter Memory pak file letter, in the range 'A' to ('A' + MEMPAK_MAX_FILES)
* @return true if the operation completed successfully, false otherwise
*/
s32 Mempak_DeleteFile(s32 controllerNum, char letter) {
s32 Mempak_DeleteFile(UNUSED s32 controllerNum, char letter) {
OSMesgQueue* serialEventQueue;
s32 error;
s32 ret = false;
@ -261,11 +263,11 @@ s32 Mempak_DeleteFile(s32 controllerNum, char letter) {
* @param letter Memory pak file letter, in the range 'A' to ('A' + MEMPAK_MAX_FILES)
* @return the size of the file, or 0 if the operation failed for any reason
*/
s32 Mempak_GetFileSize(s32 controllerNum, char letter) {
s32 Mempak_GetFileSize(UNUSED s32 controllerNum, char letter) {
OSMesgQueue* serialEventQueue = PadMgr_AcquireSerialEventQueue(&gPadMgr);
OSPfsState state;
s32 error = osPfsFileState(&sMempakPfsHandle, sMempakFiles[MEMPAK_LETTER_TO_INDEX(letter)], &state);
s32 pad;
STACK_PAD(s32);
PadMgr_ReleaseSerialEventQueue(&gPadMgr, serialEventQueue);

View File

@ -292,18 +292,19 @@ void PadMgr_RumbleSet(PadMgr* padMgr, u8* enable) {
void PadMgr_UpdateInputs(PadMgr* padMgr) {
s32 i;
Input* input;
OSContPad* pad; // original name: "padnow1"
OSContPad* contPad; // original name: "padnow1"
s32 buttonDiff;
PadMgr_LockPadData(padMgr);
for (input = &padMgr->inputs[0], pad = &padMgr->pads[0], i = 0; i < padMgr->nControllers; i++, input++, pad++) {
for (input = &padMgr->inputs[0], contPad = &padMgr->pads[0], i = 0; i < padMgr->nControllers;
i++, input++, contPad++) {
input->prev = input->cur;
switch (pad->errno) {
switch (contPad->errno) {
case 0:
// No error, copy inputs
input->cur = *pad;
input->cur = *contPad;
if (!padMgr->ctrlrIsConnected[i]) {
padMgr->ctrlrIsConnected[i] = true;
PADMGR_LOG(i, T("認識しました", "Recognized"));
@ -320,7 +321,7 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
input->cur.button = 0;
input->cur.stick_x = 0;
input->cur.stick_y = 0;
input->cur.errno = pad->errno;
input->cur.errno = contPad->errno;
if (padMgr->ctrlrIsConnected[i]) {
// If we get no response, consider the controller disconnected
padMgr->ctrlrIsConnected[i] = false;
@ -331,7 +332,7 @@ void PadMgr_UpdateInputs(PadMgr* padMgr) {
break;
default:
// Unknown error response
LOG_HEX("padnow1->errno", pad->errno, "../padmgr.c", 396);
LOG_HEX("padnow1->errno", contPad->errno, "../padmgr.c", 396);
Fault_AddHungupAndCrash("../padmgr.c", LN3(379, 382, 397, 397));
break;
}

View File

@ -40,6 +40,7 @@
* @see irqmgr.c
*/
#include "libu64/debug.h"
#include "attributes.h"
#include "libu64/rcp_utils.h"
#include "array_count.h"
#include "fault.h"
@ -161,7 +162,7 @@ void Sched_SwapFrameBuffer(Scheduler* sc, CfbInfo* cfbInfo) {
#endif
}
void Sched_HandlePreNMI(Scheduler* sc) {
void Sched_HandlePreNMI(UNUSED_NDEBUG Scheduler* sc) {
#if DEBUG_FEATURES
OSTime now;
@ -192,7 +193,7 @@ void Sched_HandlePreNMI(Scheduler* sc) {
#endif
}
void Sched_HandleNMI(Scheduler* sc) {
void Sched_HandleNMI(UNUSED Scheduler* sc) {
// black the screen and reset the VI y scale just in time for NMI reset
#if OOT_VERSION < PAL_1_0
osViSetYScale(1.0f);
@ -688,7 +689,8 @@ void Sched_ThreadEntry(void* arg) {
}
}
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, u8 viModeType, UNK_TYPE arg4, IrqMgr* irqMgr) {
void Sched_Init(Scheduler* sc, void* stack, OSPri priority, UNUSED u8 viModeType, UNUSED UNK_TYPE arg4,
IrqMgr* irqMgr) {
bzero(sc, sizeof(Scheduler));
sc->isFirstSwap = true;

View File

@ -1,12 +1,14 @@
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0" \
"pal-1.0:0 pal-1.1:0"
#include "libc64/malloc.h"
#include "attributes.h"
#include "libu64/debug.h"
#include "array_count.h"
#include "gfx.h"
#include "printf.h"
#include "regs.h"
#include "speed_meter.h"
#include "stack_pad.h"
#include "terminal.h"
#include "zelda_arena.h"
#include "game.h"
@ -112,18 +114,18 @@ void SpeedMeter_Init(SpeedMeter* this) {
SpeedMeter_InitImpl(this, 32, 22);
}
void SpeedMeter_Destroy(SpeedMeter* this) {
void SpeedMeter_Destroy(UNUSED SpeedMeter* this) {
}
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, GraphicsContext* gfxCtx) {
s32 pad[2];
STACK_PADS(s32, 2);
u32 baseX = 32;
s32 width;
s32 i;
s32 uly;
s32 lry;
View view;
u32 pad2[3];
STACK_PADS(s32, 3);
Gfx* gfx;
uly = this->y;
@ -224,8 +226,8 @@ void SpeedMeter_DrawAllocEntry(SpeedMeterAllocEntry* this, GraphicsContext* gfxC
}
}
void SpeedMeter_DrawAllocEntries(SpeedMeter* meter, GraphicsContext* gfxCtx, GameState* state) {
s32 pad1[2];
void SpeedMeter_DrawAllocEntries(UNUSED SpeedMeter* meter, GraphicsContext* gfxCtx, GameState* state) {
STACK_PADS(s32, 2);
u32 ulx = 30;
u32 lrx = 290;
SpeedMeterAllocEntry entry;

View File

@ -1,6 +1,7 @@
#include "sys_math3d.h"
#include "printf.h"
#include "stack_pad.h"
#include "terminal.h"
#include "translation.h"
#include "ultra64.h"
@ -160,7 +161,7 @@ void Math3D_FindPointOnPlaneIntersect(f32 planeAAxis1Norm, f32 planeAAxis2Norm,
*/
s32 Math3D_PlaneVsPlaneNewLine(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB,
f32 planeBC, f32 planeBDist, InfiniteLine* intersect) {
char pad[4];
STACK_PAD(s32);
Vec3f planeANormal;
Vec3f planeBNormal;
f32 dirX;
@ -1641,7 +1642,7 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V
f32 fracB;
f32 fracBase;
f32 zero = 0.0f;
f32 pad;
STACK_PAD(s32);
f32 cylRadiusSq;
f32 radSqDiff;
f32 distCent2;
@ -1833,7 +1834,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) {
Vec3f cylIntersectCenter;
Vec3f midpointv0v1;
Vec3f diffMidpointIntersect;
s32 pad;
STACK_PAD(s32);
cylBottom = (f32)cyl->pos.y + cyl->yShift;
cylTop = cyl->height + cylBottom;

View File

@ -1,8 +1,9 @@
#include "sys_math3d.h"
#include "attributes.h"
#include "play_state.h"
void Math3D_DrawSphere(PlayState* play, Sphere16* sph) {
void Math3D_DrawSphere(UNUSED PlayState* play, UNUSED Sphere16* sph) {
}
void Math3D_DrawCylinder(PlayState* play, Cylinder16* cyl) {
void Math3D_DrawCylinder(UNUSED PlayState* play, UNUSED Cylinder16* cyl) {
}

View File

@ -4,6 +4,7 @@
#include "fault.h"
#endif
#include "printf.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "ultra64.h"
#include "z_lib.h"
@ -788,7 +789,7 @@ void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag) {
f32 temp;
f32 temp2;
f32 temp3;
f32 temp4;
STACK_PAD(s32);
temp = mf->xz;
temp *= temp;
@ -841,7 +842,7 @@ void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag) {
f32 temp;
f32 temp2;
f32 temp3;
f32 temp4;
STACK_PAD(s32);
temp = mf->xx;
temp *= temp;

View File

@ -13,6 +13,7 @@
* @note Original filename is likely sys_vibrate.c or similar as it is ordered after sys_ucode.c
*/
#include "rumble.h"
#include "attributes.h"
#include "padmgr.h"
/**
@ -147,7 +148,7 @@ void RumbleMgr_Init(RumbleMgr* rumbleMgr) {
rumbleMgr->updateEnabled = true;
}
void RumbleMgr_Destroy(RumbleMgr* rumbleMgr) {
void RumbleMgr_Destroy(UNUSED_NDEBUG RumbleMgr* rumbleMgr) {
#if DEBUG_FEATURES
bzero(rumbleMgr, sizeof(RumbleMgr));
#endif

View File

@ -1,4 +1,5 @@
#include "console_logo_state.h"
#include "attributes.h"
#include "setup_state.h"
#include "printf.h"
#include "translation.h"
@ -11,7 +12,7 @@ void Setup_InitImpl(SetupState* this) {
SET_NEXT_GAMESTATE(&this->state, ConsoleLogo_Init, ConsoleLogoState);
}
void Setup_Destroy(GameState* thisx) {
void Setup_Destroy(UNUSED GameState* thisx) {
}
void Setup_Init(GameState* thisx) {

View File

@ -1,8 +1,10 @@
#include "libu64/mtxuty-cvt.h"
#include "ultra64/gs2dex.h"
#include "array_count.h"
#include "attributes.h"
#include "printf.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "translation.h"
#include "ucode_disas.h"
#include "ultra64.h"
@ -218,7 +220,7 @@ void UCodeDisas_Init(UCodeDisas* this) {
}
}
void UCodeDisas_Destroy(UCodeDisas* this) {
void UCodeDisas_Destroy(UNUSED UCodeDisas* this) {
}
void UCodeDisas_SetCurUCodeImpl(UCodeDisas* this, void* ptr) {
@ -328,7 +330,7 @@ void UCodeDisas_PrintVertices(UCodeDisas* this, Vtx* vtx, s32 count, s32 start)
}
void UCodeDisas_Disassemble(UCodeDisas* this, Gfx* ptr) {
u32 pad;
STACK_PAD(s32);
uintptr_t addr;
u32 rdpHalf;
u16 linkDlLow;
@ -1016,7 +1018,7 @@ void UCodeDisas_Disassemble(UCodeDisas* this, Gfx* ptr) {
}
case G_MOVEWORD: {
u32 pad;
STACK_PAD(s32);
Gdma dma = ptr->dma;
Gmovewd movewd = ptr->movewd;
@ -1202,7 +1204,7 @@ void UCodeDisas_Disassemble(UCodeDisas* this, Gfx* ptr) {
} break;
case G_MOVEWORD: {
u32 pad[2];
STACK_PADS(s32, 2);
Gmovewd movewd = ptr->movewd;
switch (movewd.index) {

View File

@ -1,4 +1,5 @@
#include "libc64/math64.h"
#include "attributes.h"
#include "libu64/overlay.h"
#include "array_count.h"
#include "fault.h"
@ -11,6 +12,7 @@
#include "rumble.h"
#include "segmented_address.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_math.h"
#include "sys_matrix.h"
#include "terminal.h"
@ -68,7 +70,7 @@ void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw,
shape->shadowAlpha = 255;
}
void ActorShadow_Draw(Actor* actor, Lights* lights, PlayState* play, Gfx* dlist, Color_RGBA8* color) {
void ActorShadow_Draw(Actor* actor, UNUSED Lights* lights, PlayState* play, Gfx* dlist, Color_RGBA8* color) {
f32 temp1;
f32 temp2;
MtxF sp60;
@ -130,10 +132,10 @@ void ActorShadow_DrawHorse(Actor* actor, Lights* lights, PlayState* play) {
}
void ActorShadow_DrawFoot(PlayState* play, Light* light, MtxF* arg2, s32 arg3, f32 arg4, f32 arg5, f32 arg6) {
s32 pad1;
STACK_PAD(s32);
f32 sp58;
f32 temp;
s32 pad2;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_actor.c", 1661);
@ -343,7 +345,7 @@ void Attention_InitReticle(Attention* attention, s32 actorCategory, PlayState* p
}
}
void Attention_SetNaviState(Attention* attention, Actor* actor, s32 actorCategory, PlayState* play) {
void Attention_SetNaviState(Attention* attention, Actor* actor, s32 actorCategory, UNUSED PlayState* play) {
attention->naviHoverPos.x = actor->focus.pos.x;
attention->naviHoverPos.y = actor->focus.pos.y + (actor->lockOnArrowOffset * actor->scale.y);
attention->naviHoverPos.z = actor->focus.pos.z;
@ -500,7 +502,7 @@ void Attention_Draw(Attention* attention, PlayState* play) {
}
void Attention_Update(Attention* attention, Player* player, Actor* playerFocusActor, PlayState* play) {
s32 pad;
STACK_PAD(s32);
Actor* actor; // used for both the Navi hover actor and reticle actor
s32 category;
Vec3f projectedFocusPos;
@ -776,11 +778,11 @@ void Flags_SetCollectible(PlayState* play, s32 flag) {
}
}
void TitleCard_Init(PlayState* play, TitleCardContext* titleCtx) {
void TitleCard_Init(UNUSED PlayState* play, TitleCardContext* titleCtx) {
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensity = titleCtx->alpha = 0;
}
void TitleCard_InitBossName(PlayState* play, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
void TitleCard_InitBossName(UNUSED PlayState* play, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
u8 height) {
titleCtx->texture = texture;
titleCtx->x = x;
@ -809,7 +811,7 @@ void TitleCard_InitPlaceName(PlayState* play, TitleCardContext* titleCtx, void*
titleCtx->delayTimer = delay;
}
void TitleCard_Update(PlayState* play, TitleCardContext* titleCtx) {
void TitleCard_Update(UNUSED PlayState* play, TitleCardContext* titleCtx) {
if (DECR(titleCtx->delayTimer) == 0) {
if (DECR(titleCtx->durationTimer) == 0) {
Math_StepToS(&titleCtx->alpha, 0, 30);
@ -957,8 +959,8 @@ void Actor_Init(Actor* actor, PlayState* play) {
}
void Actor_Destroy(Actor* actor, PlayState* play) {
ActorOverlay* overlayEntry;
char* name;
UNUSED_NDEBUG ActorOverlay* overlayEntry;
UNUSED_NDEBUG char* name;
if (actor->destroy != NULL) {
actor->destroy(actor, play);
@ -1131,7 +1133,7 @@ f32 Player_GetHeight(Player* player) {
}
f32 func_8002DCE4(Player* player) {
s32 pad;
STACK_PAD(s32);
if (player->stateFlags1 & PLAYER_STATE1_23) {
return 8.0f;
@ -1186,13 +1188,13 @@ void Actor_SwapHookshotAttachment(PlayState* play, Actor* srcActor, Actor* destA
srcActor->flags &= ~ACTOR_FLAG_HOOKSHOT_ATTACHED;
}
void Actor_RequestHorseCameraSetting(PlayState* play, Player* player) {
void Actor_RequestHorseCameraSetting(PlayState* play, UNUSED Player* player) {
if ((play->roomCtx.curRoom.type != ROOM_TYPE_4) && Play_CamIsNotFixed(play)) {
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
}
}
void Actor_MountHorse(PlayState* play, Player* player, Actor* horse) {
void Actor_MountHorse(UNUSED PlayState* play, Player* player, Actor* horse) {
player->rideActor = horse;
player->stateFlags1 |= PLAYER_STATE1_23;
horse->child = &player->actor;
@ -1741,7 +1743,7 @@ s32 Attention_ShouldReleaseLockOn(Actor* actor, Player* player, s32 ignoreLeash)
*
* @return true if the talk offer was accepted, false otherwise
*/
s32 Actor_TalkOfferAccepted(Actor* actor, PlayState* play) {
s32 Actor_TalkOfferAccepted(Actor* actor, UNUSED PlayState* play) {
if (actor->flags & ACTOR_FLAG_TALK) {
actor->flags &= ~ACTOR_FLAG_TALK;
return true;
@ -1801,7 +1803,7 @@ s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, PlayState* play) {
return Actor_OfferTalk(actor, play, cylRadius);
}
u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
u32 Actor_TextboxIsClosing(UNUSED Actor* actor, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
return true;
} else {
@ -1824,7 +1826,7 @@ void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y) {
*y = projectedPos.y * cappedInvW * -(SCREEN_HEIGHT / 2) + (SCREEN_HEIGHT / 2);
}
u32 Actor_HasParent(Actor* actor, PlayState* play) {
u32 Actor_HasParent(Actor* actor, UNUSED PlayState* play) {
if (actor->parent != NULL) {
return true;
} else {
@ -1890,7 +1892,7 @@ s32 Actor_OfferCarry(Actor* actor, PlayState* play) {
return Actor_OfferGetItemNearby(actor, play, GI_NONE);
}
u32 Actor_HasNoParent(Actor* actor, PlayState* play) {
u32 Actor_HasNoParent(Actor* actor, UNUSED PlayState* play) {
if (actor->parent == NULL) {
return true;
} else {
@ -1898,7 +1900,7 @@ u32 Actor_HasNoParent(Actor* actor, PlayState* play) {
}
}
void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play) {
void func_8002F5C4(Actor* actorA, Actor* actorB, UNUSED PlayState* play) {
Actor* parent = actorA->parent;
if (parent->id == ACTOR_PLAYER) {
@ -1921,7 +1923,7 @@ void Actor_SetClosestSecretDistance(Actor* actor, PlayState* play) {
}
}
s32 Actor_IsMounted(PlayState* play, Actor* horse) {
s32 Actor_IsMounted(UNUSED PlayState* play, Actor* horse) {
if (horse->child != NULL) {
return true;
} else {
@ -1943,7 +1945,7 @@ u32 Actor_SetRideActor(PlayState* play, Actor* horse, s32 mountSide) {
return false;
}
s32 Actor_NotMounted(PlayState* play, Actor* horse) {
s32 Actor_NotMounted(UNUSED PlayState* play, Actor* horse) {
if (horse->child == NULL) {
return true;
} else {
@ -1962,7 +1964,8 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
* @param type PlayerKnockbackType
* @param damage additional amount of damage to deal to the player
*/
void Actor_SetPlayerKnockback(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage) {
void Actor_SetPlayerKnockback(PlayState* play, UNUSED Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type,
u32 damage) {
Player* player = GET_PLAYER(play);
player->knockbackDamage = damage;
@ -2537,7 +2540,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
}
void Actor_FaultPrint(Actor* actor, char* command) {
ActorOverlay* overlayEntry;
UNUSED_NDEBUG ActorOverlay* overlayEntry;
char* name;
if ((actor == NULL) || (actor->overlayEntry == NULL)) {
@ -2841,7 +2844,7 @@ s32 Actor_CullingCheck(PlayState* play, Actor* actor) {
* This interactive 3D graph visualizes the shape of the culling volume and has sliders for the 3 properties mentioned
* above: https://www.desmos.com/3d/4ztkxqky2a.
*/
s32 Actor_CullingVolumeTest(PlayState* play, Actor* actor, Vec3f* projPos, f32 projW) {
s32 Actor_CullingVolumeTest(UNUSED PlayState* play, Actor* actor, Vec3f* projPos, f32 projW) {
f32 invW;
if ((projPos->z > -actor->cullingVolumeScale) &&
@ -2890,8 +2893,8 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
actor = actorListEntry->head;
while (actor != NULL) {
ActorOverlay* overlayEntry = actor->overlayEntry;
char* actorName;
UNUSED_NDEBUG ActorOverlay* overlayEntry = actor->overlayEntry;
UNUSED_NDEBUG char* actorName;
#if DEBUG_FEATURES
actorName = overlayEntry->name != NULL ? overlayEntry->name : "";
@ -3007,7 +3010,7 @@ void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) {
u8 sEnemyActorCategories[] = { ACTORCAT_ENEMY, ACTORCAT_BOSS };
void Actor_FreezeAllEnemies(PlayState* play, ActorContext* actorCtx, s32 duration) {
void Actor_FreezeAllEnemies(UNUSED PlayState* play, ActorContext* actorCtx, s32 duration) {
Actor* actor;
s32 i;
@ -3159,13 +3162,13 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX,
s16 rotY, s16 rotZ, s16 params) {
s32 pad;
STACK_PAD(s32);
Actor* actor;
ActorProfile* profile;
s32 objectSlot;
ActorOverlay* overlayEntry;
uintptr_t temp;
char* name;
UNUSED_NDEBUG char* name;
u32 overlaySize;
overlayEntry = &gActorOverlayTable[actorId];
@ -3635,7 +3638,7 @@ s16 FaceChange_UpdateRandomSet(FaceChange* faceChange, s16 changeTimerBase, s16
return faceChange->face;
}
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, UNUSED PlayState* play) {
if ((bodyBreak->matrices = ZELDA_ARENA_MALLOC((count + 1) * sizeof(*bodyBreak->matrices), "../z_actor.c", 7540)) !=
NULL &&
(bodyBreak->dLists = ZELDA_ARENA_MALLOC((count + 1) * sizeof(*bodyBreak->dLists), "../z_actor.c", 7543)) !=
@ -3792,7 +3795,7 @@ void func_80033480(PlayState* play, Vec3f* posBase, f32 randRangeDiameter, s32 a
}
}
Actor* Actor_GetCollidedExplosive(PlayState* play, Collider* collider) {
Actor* Actor_GetCollidedExplosive(UNUSED PlayState* play, Collider* collider) {
if ((collider->acFlags & AC_HIT) && (collider->ac->category == ACTORCAT_EXPLOSIVE)) {
collider->acFlags &= ~AC_HIT;
return collider->ac;
@ -4388,8 +4391,7 @@ s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex) {
*/
s16 Npc_UpdateAutoTurn(Actor* actor, NpcInteractInfo* interactInfo, f32 distanceRange, s16 maxYawForPlayerTracking,
s16 trackingMode) {
s32 pad;
STACK_PAD(s32);
s16 yaw;
s16 yawDiff;
@ -4606,7 +4608,7 @@ void Actor_UpdateFidgetTables(PlayState* play, s16* fidgetTableY, s16* fidgetTab
}
}
void Actor_Noop(Actor* actor, PlayState* play) {
void Actor_Noop(UNUSED Actor* actor, UNUSED PlayState* play) {
}
s32 func_80035124(Actor* actor, PlayState* play) {
@ -4820,8 +4822,8 @@ void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3) {
/**
* Spawns En_Part (Dissipating Flames) actor as a child of the given actor.
*/
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused, PlayState* play,
s16 params, Gfx* dList) {
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, UNUSED s16* arg5,
PlayState* play, s16 params, Gfx* dList) {
EnPart* spawnedEnPart;
spawnedEnPart = (EnPart*)Actor_SpawnAsChild(&play->actorCtx, actor, play, ACTOR_EN_PART, spawnPos->x, spawnPos->y,
@ -4852,7 +4854,7 @@ void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2) {
f32 sp28;
f32 sp24;
CollisionPoly* floorPoly;
s32 pad;
STACK_PAD(s32);
floorPoly = actor->floorPoly;
floorPolyNormalX = COLPOLY_GET_NORMAL(floorPoly->normal.x);
@ -6115,12 +6117,12 @@ u16 func_80037C30(PlayState* play, s16 arg1) {
return func_80035BFC(play, arg1);
}
s32 func_80037C5C(PlayState* play, s16 arg1, u16 textId) {
s32 func_80037C5C(UNUSED PlayState* play, s16 arg1, u16 textId) {
func_80036E50(textId, arg1);
return false;
}
s32 func_80037C94(PlayState* play, Actor* actor, s32 arg2) {
s32 func_80037C94(PlayState* play, Actor* actor, UNUSED s32 arg2) {
return func_800374E0(play, actor, actor->textId);
}

View File

@ -1,4 +1,5 @@
#include "fault.h"
#include "attributes.h"
#include "printf.h"
#include "segment_symbols.h"
#include "z_actor_dlftbls.h"
@ -97,7 +98,7 @@ void ActorOverlayTable_LogPrint(void) {
#endif
}
void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
void ActorOverlayTable_FaultPrint(UNUSED void* arg0, UNUSED void* arg1) {
ActorOverlay* overlayEntry;
u32 overlaySize;
uintptr_t ramStart;

View File

@ -5,6 +5,7 @@
#include "printf.h"
#include "regs.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "sys_math3d.h"
#include "terminal.h"
#include "translation.h"
@ -151,7 +152,7 @@ void DynaSSNodeList_SetSSListHead(DynaSSNodeList* nodeList, SSList* ssList, s16*
/**
* Initialize DynaSSNodeList
*/
void DynaSSNodeList_Initialize(PlayState* play, DynaSSNodeList* nodeList) {
void DynaSSNodeList_Initialize(UNUSED PlayState* play, DynaSSNodeList* nodeList) {
nodeList->tbl = NULL;
nodeList->count = 0;
}
@ -247,7 +248,7 @@ void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest) {
f32 nx;
f32 ny;
f32 nz;
s32 pad;
STACK_PAD(s32);
f32 xx;
f32 zz;
f32 yz;
@ -525,7 +526,7 @@ void StaticLookup_AddPolyToSSList(CollisionContext* colCtx, SSList* ssList, Coll
while (true) {
// if at the end of the list
if (curNode->next == SS_NULL) {
s32 pad;
STACK_PAD(s32);
newNodeId = SSNodeList_GetNextNodeIdx(&colCtx->polyNodes);
SSNode_SetValue(&colCtx->polyNodes.tbl[newNodeId], &polyId, SS_NULL);
@ -659,8 +660,9 @@ f32 BgCheck_RaycastDownStatic(StaticLookup* lookup, CollisionContext* colCtx, u1
* returns true if `wallPolyPtr` was changed
* `invXZlength` is 1 / sqrt( sq(poly.normal.x) + sq(poly.normal.z) )
*/
s32 BgCheck_ComputeWallDisplacement(CollisionContext* colCtx, CollisionPoly* poly, f32* posX, f32* posZ, f32 nx, f32 ny,
f32 nz, f32 invXZlength, f32 planeDist, f32 radius, CollisionPoly** wallPolyPtr) {
s32 BgCheck_ComputeWallDisplacement(CollisionContext* colCtx, CollisionPoly* poly, f32* posX, f32* posZ, f32 nx,
UNUSED f32 ny, f32 nz, f32 invXZlength, f32 planeDist, f32 radius,
CollisionPoly** wallPolyPtr) {
CollisionPoly* wallPoly;
u32 surfaceData;
u32 hasFlag27;
@ -708,7 +710,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
f32 nx;
f32 ny;
f32 nz;
s32 pad;
STACK_PAD(s32);
Vec3s* vtxList;
f32 temp_f16;
f32 zMin;
@ -902,7 +904,7 @@ s32 BgCheck_SphVsStaticWall(StaticLookup* lookup, CollisionContext* colCtx, u16
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
f32 checkHeight, CollisionPoly** outPoly) {
s32 result = false;
u16 nextId;
STACK_PAD(s32);
CollisionPoly* curPoly;
CollisionPoly* polyList;
f32 ceilingY;
@ -1067,7 +1069,7 @@ s32 BgCheck_SphVsFirstStaticPolyList(SSNode* node, u16 xpFlags, CollisionContext
Vec3s* vtxList = colCtx->colHeader->vtxList;
while (true) {
u16 nextId;
STACK_PAD(s16);
s16 curPolyId = node->polyId;
CollisionPoly* curPoly = &polyList[curPolyId];
@ -1397,7 +1399,7 @@ s32 BgCheck_PolyIntersectsSubdivision(Vec3f* min, Vec3f* max, CollisionPoly* pol
* Initialize StaticLookup Table
* returns size of table, in bytes
*/
u32 BgCheck_InitializeStaticLookup(CollisionContext* colCtx, PlayState* play, StaticLookup* lookupTbl) {
u32 BgCheck_InitializeStaticLookup(CollisionContext* colCtx, UNUSED PlayState* play, StaticLookup* lookupTbl) {
Vec3s* vtxList;
CollisionPoly* polyList;
s32 polyMax;
@ -1556,7 +1558,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, PlayState* play, CollisionHeader
u32 memSize;
UNUSED_NDEBUG u32 lookupTblMemSize;
s32 customNodeListMax;
SSNodeList* nodeList;
STACK_PAD(s32);
u32 customMemSize;
s32 useCustomSubdivisions;
s32 i;
@ -1714,7 +1716,7 @@ s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos) {
f32 BgCheck_RaycastDownImpl(PlayState* play, CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly,
s32* outBgId, Vec3f* pos, Actor* actor, u32 downChkFlags, f32 chkDist) {
f32 yIntersectDyna;
s32* temp_a0;
STACK_PAD(s32);
StaticLookup* lookupTbl;
Vec3f checkPos;
StaticLookup* lookup;
@ -2466,7 +2468,7 @@ s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec
* ignores `actor` dyna poly
* returns true if any poly intersects the sphere, else false
* `outPoly` returns the pointer of the first poly found that intersects
* `outBgId` returns the bgId of the entity that owns `outPoly`
* @bug `outBgId` always returns BGCHECK_SCENE due to a bug in `BgCheck_SphVsFirstDynaPoly`
*/
s32 BgCheck_SphVsFirstPolyImpl(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags) {
@ -2623,7 +2625,7 @@ void DynaLookup_ResetVtxStartIndex(u16* vtxStartIndex) {
/**
* Initialize BgActor
*/
void BgActor_Initialize(PlayState* play, BgActor* bgActor) {
void BgActor_Initialize(UNUSED PlayState* play, BgActor* bgActor) {
bgActor->actor = NULL;
bgActor->colHeader = NULL;
ScaleRotPos_Initialize(&bgActor->prevTransform);
@ -2689,7 +2691,7 @@ void DynaPoly_AllocVtxList(PlayState* play, Vec3s** vtxList, s32 numVtx) {
/**
* Update BgActor's prevTransform
*/
void DynaPoly_SetBgActorPrevTransform(PlayState* play, BgActor* bgActor) {
void DynaPoly_SetBgActorPrevTransform(UNUSED PlayState* play, BgActor* bgActor) {
bgActor->prevTransform = bgActor->curTransform;
}
@ -2737,7 +2739,7 @@ void DynaPoly_Alloc(PlayState* play, DynaCollisionContext* dyna) {
* Set BgActor
* original name: DynaPolyInfo_setActor
*/
s32 DynaPoly_SetBgActor(PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader) {
s32 DynaPoly_SetBgActor(UNUSED PlayState* play, DynaCollisionContext* dyna, Actor* actor, CollisionHeader* colHeader) {
s32 bgId;
s32 foundSlot = false;
@ -2779,28 +2781,28 @@ DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId) {
return (DynaPolyActor*)colCtx->dyna.bgActors[bgId].actor;
}
void DynaPoly_DisableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_DisableCollision(UNUSED PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] |= BGACTOR_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
}
void DynaPoly_EnableCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_EnableCollision(UNUSED PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] &= ~BGACTOR_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
}
void DynaPoly_DisableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_DisableCeilingCollision(UNUSED PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] |= BGACTOR_CEILING_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
}
void DynaPoly_EnableCeilingCollision(PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
void DynaPoly_EnableCeilingCollision(UNUSED PlayState* play, DynaCollisionContext* dyna, s32 bgId) {
if (DynaPoly_IsBgIdBgActor(bgId)) {
dyna->bgActorFlags[bgId] &= ~BGACTOR_CEILING_COLLISION_DISABLED;
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
@ -2848,25 +2850,25 @@ void DynaPoly_DeleteBgActor(PlayState* play, DynaCollisionContext* dyna, s32 bgI
}
}
void DynaPoly_InvalidateLookup(PlayState* play, DynaCollisionContext* dyna) {
void DynaPoly_InvalidateLookup(UNUSED PlayState* play, DynaCollisionContext* dyna) {
dyna->bitFlag |= DYNAPOLY_INVALIDATE_LOOKUP;
}
/**
* original name: DynaPolyInfo_expandSRT
*/
void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex,
void DynaPoly_AddBgActorToLookup(UNUSED PlayState* play, DynaCollisionContext* dyna, s32 bgId, s32* vtxStartIndex,
s32* polyStartIndex) {
MtxF mtx;
Actor* actor;
s32 pad;
STACK_PAD(s32);
f32 radiusSq;
f32 numVtxInverse;
s32 i;
Vec3f pos;
Sphere16* sphere;
Vec3s* dVtxList;
Vec3s* point;
STACK_PAD(s32);
Vec3f newCenterPoint;
f32 newRadiusSq;
CollisionHeader* pbgdata;
@ -2954,7 +2956,7 @@ void DynaPoly_AddBgActorToLookup(PlayState* play, DynaCollisionContext* dyna, s3
for (i = 0; i < pbgdata->numVertices; i++) {
Vec3f vtx;
Vec3f vtxT; // Vtx after mtx transform
s32 pad2;
STACK_PAD(s32);
Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]);
SkinMatrix_Vec3fMtxFMultXYZ(&mtx, &vtx, &vtxT);
@ -3279,7 +3281,7 @@ f32 BgCheck_RaycastDownDyna(DynaRaycastDown* dynaRaycastDown) {
vtxList = dynaRaycastDown->dyna->bgActors[*dynaRaycastDown->bgId].colHeader->vtxList;
for (i2 = 0; i2 < 3; i2++) {
s32 pad;
STACK_PAD(s32);
Math_Vec3s_ToVec3f(&vtx, &vtxList[COLPOLY_VTX_INDEX(poly->vtxData[i2])]);
SkinMatrix_Vec3fMtxFMultXYZ(&srpMtx, &vtx, &polyVtx[i2]);
@ -3317,7 +3319,7 @@ f32 BgCheck_RaycastDownDyna(DynaRaycastDown* dynaRaycastDown) {
s32 BgCheck_SphVsDynaWallInBgActor(CollisionContext* colCtx, u16 xpFlags, DynaCollisionContext* dyna, SSList* ssList,
f32* outX, f32* outZ, CollisionPoly** outPoly, s32* outBgId, Vec3f* pos, f32 radius,
s32 bgId) {
f32 temp;
STACK_PAD(s32);
f32 intersect;
s32 result = false;
CollisionPoly* poly;
@ -3561,8 +3563,8 @@ s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32*
* `outPoly` returns the poly collided with
* `outY` returns the y coordinate needed to not collide with `outPoly`
*/
s32 BgCheck_CheckDynaCeilingList(CollisionContext* colCtx, u16 xpFlags, DynaCollisionContext* dyna, SSList* ssList,
f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly) {
s32 BgCheck_CheckDynaCeilingList(UNUSED CollisionContext* colCtx, u16 xpFlags, DynaCollisionContext* dyna,
SSList* ssList, f32* outY, Vec3f* pos, f32 checkHeight, CollisionPoly** outPoly) {
s16 polyId;
SSNode* curNode;
CollisionPoly* poly;
@ -3574,7 +3576,7 @@ s32 BgCheck_CheckDynaCeilingList(CollisionContext* colCtx, u16 xpFlags, DynaColl
f32 nz;
s32 result = false;
f32 intersectDist;
u16 padding;
STACK_PAD(s16);
if (ssList->head == SS_NULL) {
return false;
@ -3634,7 +3636,7 @@ s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, V
s32 result = false;
f32 resultY;
f32 tempY = chkDist + pos->y;
BgActor* bgActor;
STACK_PAD(s32);
CollisionPoly* poly;
resultY = tempY;
@ -3767,7 +3769,7 @@ s32 BgCheck_CheckLineAgainstBgActor(CollisionContext* colCtx, u16 xpFlags, Vec3f
s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
CollisionPoly** outPoly, f32* distSq, s32* outBgId, Actor* actor, f32 chkDist,
s32 bccFlags) {
s32 pad;
STACK_PAD(s32);
s32 i;
s32 result = false;
Linef line;
@ -3871,9 +3873,10 @@ s32 BgCheck_SphVsFirstDynaPolyInBgActor(CollisionContext* colCtx, u16 xpFlags, C
/**
* Gets first dyna poly intersecting sphere `center` `radius`
* returns true if poly detected, else false
* `outPoly` returns the first intersecting poly, while `outBgId` returns the BgActor index of that poly
* `outPoly` returns the first intersecting poly
* @bug the bg ID is never written out to `outBgId`
*/
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, UNUSED s32* outBgId,
Vec3f* center, f32 radius, Actor* actor, u16 bciFlags) {
s32 i = 0;
Sphere16 testSphere;
@ -4267,7 +4270,7 @@ f32 sZorasDomainWaterBoxMaxZ = -967.0f;
s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox) {
if (play->sceneId == SCENE_ZORAS_DOMAIN) {
s32 pad;
STACK_PAD(s32);
if (sZorasDomainWaterBoxMinX < x && x < sZorasDomainWaterBoxMaxX && sZorasDomainWaterBoxMinY < *ySurface &&
*ySurface < sZorasDomainWaterBoxMaxY && sZorasDomainWaterBoxMinZ < z && z < sZorasDomainWaterBoxMaxZ) {
@ -4323,7 +4326,7 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
s32 room;
s32 i;
WaterBox* waterBox;
WaterBox* waterBoxList = colHeader->waterBoxes; // unused, needed for matching
UNUSED WaterBox* waterBoxList = colHeader->waterBoxes; // needed for matching
if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == SEGMENTED_TO_VIRTUAL(NULL)) {
*outWaterBox = NULL;
@ -4356,7 +4359,7 @@ s32 WaterBox_GetSurface2(PlayState* play, CollisionContext* colCtx, Vec3f* pos,
/**
* WaterBox get BgCam index
*/
u32 WaterBox_GetBgCamIndex(CollisionContext* colCtx, WaterBox* waterBox) {
u32 WaterBox_GetBgCamIndex(UNUSED CollisionContext* colCtx, WaterBox* waterBox) {
u32 bgCamIndex = waterBox->properties & 0xFF;
return bgCamIndex;
@ -4379,7 +4382,7 @@ u16 WaterBox_GetBgCamSetting(CollisionContext* colCtx, WaterBox* waterBox) {
/**
* WaterBox get lighting settings
*/
u32 WaterBox_GetLightIndex(CollisionContext* colCtx, WaterBox* waterBox) {
u32 WaterBox_GetLightIndex(UNUSED CollisionContext* colCtx, WaterBox* waterBox) {
u32 lightIndex = (waterBox->properties >> 8) & 0x1F;
return lightIndex;
@ -4459,8 +4462,8 @@ s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec
/**
* Draw a list of dyna polys, specified by `ssList`
*/
void BgCheck_DrawDynaPolyList(PlayState* play, CollisionContext* colCtx, DynaCollisionContext* dyna, SSList* ssList,
u8 r, u8 g, u8 b) {
void BgCheck_DrawDynaPolyList(PlayState* play, UNUSED CollisionContext* colCtx, DynaCollisionContext* dyna,
SSList* ssList, u8 r, u8 g, u8 b) {
s16 curPolyId;
CollisionPoly* poly;
SSNode* curNode;

View File

@ -11,6 +11,7 @@
#include "printf.h"
#include "regs.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_math3d.h"
#include "terminal.h"
#include "translation.h"
@ -508,7 +509,7 @@ s32 func_80043F94(Camera* camera, Vec3f* from, CamColChk* to) {
void func_80044340(Camera* camera, Vec3f* arg1, Vec3f* arg2) {
CamColChk sp20;
Vec3s unused;
STACK_PADS(s32, 2);
sp20.pos = *arg2;
func_80043F94(camera, arg1, &sp20);
@ -519,9 +520,9 @@ void func_80044340(Camera* camera, Vec3f* arg1, Vec3f* arg2) {
* Checks if `from` to `to` is looking from the outside of a poly towards the front
*/
s32 Camera_CheckOOB(Camera* camera, Vec3f* from, Vec3f* to) {
s32 pad;
STACK_PAD(s32);
Vec3f intersect;
s32 pad2;
STACK_PAD(s32);
s32 bgId;
CollisionPoly* poly;
CollisionContext* colCtx = &camera->play->colCtx;
@ -541,7 +542,7 @@ s32 Camera_CheckOOB(Camera* camera, Vec3f* from, Vec3f* to) {
* and bgId to `bgId`. If no floor is found, then the normal is a flat surface pointing upwards.
*/
f32 Camera_GetFloorYNorm(Camera* camera, Vec3f* floorNorm, Vec3f* chkPos, s32* bgId) {
s32 pad;
STACK_PAD(s32);
CollisionPoly* floorPoly;
f32 floorY = BgCheck_EntityRaycastDown3(&camera->play->colCtx, &floorPoly, bgId, chkPos);
@ -655,7 +656,7 @@ s32 Camera_GetBgCamIndex(Camera* camera, s32* bgId, CollisionPoly* poly) {
*/
Vec3s* Camera_GetBgCamFuncDataUnderPlayer(Camera* camera, u16* bgCamCount) {
CollisionPoly* floorPoly;
s32 pad;
STACK_PAD(s32);
s32 bgId;
PosRot playerPosRot;
@ -838,7 +839,7 @@ Vec3f Camera_CalcUpFromPitchYawRoll(s16 pitch, s16 yaw, s16 roll) {
Vec3f rollMtxRow1;
Vec3f rollMtxRow2;
Vec3f rollMtxRow3;
f32 pad;
STACK_PAD(s32);
// Axis to roll around
u.x = cosP * sinY;
@ -885,10 +886,10 @@ f32 Camera_ClampLERPScale(Camera* camera, f32 maxLERPScale) {
return ret;
}
void Camera_CopyDataToRegs(Camera* camera, s16 mode) {
CameraModeValue* values;
CameraModeValue* valueP;
s32 i;
void Camera_CopyDataToRegs(Camera* camera, UNUSED_NDEBUG s16 mode) {
UNUSED_NDEBUG CameraModeValue* values;
UNUSED_NDEBUG CameraModeValue* valueP;
UNUSED_NDEBUG s32 i;
#if DEBUG_FEATURES
if (PREG(82)) {
@ -1083,7 +1084,7 @@ s32 Camera_CalcAtDefault(Camera* camera, VecGeo* eyeAtDir, f32 yOffset, s16 calc
Vec3f* at = &camera->at;
Vec3f playerToAtOffsetTarget;
Vec3f atTarget;
s32 pad2;
STACK_PAD(s32);
PosRot* playerPosRot = &camera->playerPosRot;
f32 playerHeight = Player_GetHeight(camera->player);
@ -1118,7 +1119,7 @@ s32 func_800458D4(Camera* camera, VecGeo* eyeAtDir, f32 yOffset, f32* arg3, s16
f32 deltaY;
Vec3f* at = &camera->at;
f32 temp;
s32 pad;
STACK_PAD(s32);
playerToAtOffsetTarget.y = Player_GetHeight(camera->player) + yOffset;
playerToAtOffsetTarget.x = 0.0f;
@ -1158,7 +1159,7 @@ s32 func_80045B08(Camera* camera, VecGeo* eyeAtDir, f32 yOffset, s16 arg3) {
f32 phi_f2;
Vec3f playerToAtOffsetTarget;
Vec3f atTarget;
f32 pad;
STACK_PAD(s32);
f32 temp_ret;
PosRot* playerPosRot = &camera->playerPosRot;
@ -1368,8 +1369,7 @@ s32 Camera_CalcAtForHorse(Camera* camera, VecGeo* eyeAtDir, f32 yOffset, f32* yP
Vec3f* at = &camera->at;
Vec3f playerToAtOffsetTarget;
Vec3f atTarget;
s32 pad;
s32 pad2;
STACK_PADS(s32, 2);
f32 playerHeight = Player_GetHeight(camera->player);
Player* player = camera->player;
PosRot horsePosRot;
@ -1448,7 +1448,7 @@ f32 Camera_ClampDist(Camera* camera, f32 dist, f32 minDist, f32 maxDist, s16 tim
}
s16 Camera_CalcDefaultPitch(Camera* camera, s16 arg1, s16 arg2, s16 arg3) {
f32 pad;
f32 interpValue;
f32 stepScale;
f32 t;
s16 phi_v0;
@ -1463,8 +1463,8 @@ s16 Camera_CalcDefaultPitch(Camera* camera, s16 arg1, s16 arg2, s16 arg3) {
stepScale = (1.0f / camera->pitchUpdateRateInv) * 3.0f;
} else {
t = absCur * (1.0f / CAM_MAX_PITCH);
pad = Camera_InterpolateCurve(0.8f, 1.0f - t);
stepScale = (1.0f / camera->pitchUpdateRateInv) * pad;
interpValue = Camera_InterpolateCurve(0.8f, 1.0f - t);
stepScale = (1.0f / camera->pitchUpdateRateInv) * interpValue;
}
return Camera_LERPCeilS(target, arg1, stepScale, 0xA);
}
@ -1595,7 +1595,7 @@ void func_80046E20(Camera* camera, VecGeo* eyeAdjustment, f32 minDist, f32 arg3,
}
}
s32 Camera_Noop(Camera* camera) {
s32 Camera_Noop(UNUSED Camera* camera) {
return true;
}
@ -1613,7 +1613,7 @@ s32 Camera_Normal1(Camera* camera) {
VecGeo eyeAdjustment;
VecGeo atEyeGeo;
VecGeo atEyeNextGeo;
PosRot* playerPosRot = &camera->playerPosRot;
UNUSED PosRot* playerPosRot = &camera->playerPosRot;
Normal1ReadOnlyData* roData = &camera->paramData.norm1.roData;
Normal1ReadWriteData* rwData = &camera->paramData.norm1.rwData;
f32 playerHeight;
@ -1846,7 +1846,7 @@ s32 Camera_Normal2(Camera* camera) {
PosRot* playerPosRot = &camera->playerPosRot;
Normal2ReadOnlyData* roData = &camera->paramData.norm2.roData;
Normal2ReadWriteData* rwData = &camera->paramData.norm2.rwData;
s32 pad;
STACK_PAD(s32);
BgCamFuncData* bgCamFuncData;
f32 playerHeight;
f32 yNormal;
@ -2007,7 +2007,7 @@ s32 Camera_Normal3(Camera* camera) {
VecGeo sp74;
PosRot* playerPosRot = &camera->playerPosRot;
f32 temp_f0;
f32 temp_f6;
STACK_PAD(s32);
s16 phi_a0;
s16 t2;
Normal3ReadOnlyData* roData = &camera->paramData.norm3.roData;
@ -2162,9 +2162,9 @@ s32 Camera_Parallel1(Camera* camera) {
s16 phi_a0;
Parallel1ReadOnlyData* roData = &camera->paramData.para1.roData;
Parallel1ReadWriteData* rwData = &camera->paramData.para1.rwData;
f32 pad2;
STACK_PAD(s32);
f32 playerHeight;
s32 pad3;
f32 value;
playerHeight = Player_GetHeight(camera->player);
if (RELOAD_PARAMS(camera) || CAM_DEBUG_RELOAD_PARAMS) {
@ -2249,8 +2249,8 @@ s32 Camera_Parallel1(Camera* camera) {
tangle = Camera_GetPitchAdjFromFloorHeightDiffs(camera, atToEyeDir.yaw - 0x7FFF, true);
spB8 = ((1.0f / roData->unk_0C) * 0.3f);
pad2 = (((1.0f / roData->unk_0C) * 0.7f) * (1.0f - camera->speedRatio));
rwData->unk_10 = Camera_LERPCeilS(tangle, rwData->unk_10, spB8 + pad2, 0xF);
value = (((1.0f / roData->unk_0C) * 0.7f) * (1.0f - camera->speedRatio));
rwData->unk_10 = Camera_LERPCeilS(tangle, rwData->unk_10, spB8 + value, 0xF);
} else {
rwData->unk_10 = 0;
}
@ -2361,7 +2361,7 @@ s32 Camera_Jump1(Camera* camera) {
Vec3f* eye = &camera->eye;
Vec3f* at = &camera->at;
Vec3f* eyeNext = &camera->eyeNext;
s32 pad2;
STACK_PAD(s32);
f32 spA4;
Vec3f newEye;
VecGeo eyeAtOffset;
@ -2370,10 +2370,10 @@ s32 Camera_Jump1(Camera* camera) {
VecGeo eyeDiffTarget;
PosRot* playerPosRot = &camera->playerPosRot;
UNUSED PosRot playerhead;
s16 tangle;
STACK_PAD(s16);
Jump1ReadOnlyData* roData = &camera->paramData.jump1.roData;
Jump1ReadWriteData* rwData = &camera->paramData.jump1.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -2523,7 +2523,7 @@ s32 Camera_Jump2(Camera* camera) {
s16 playerYawRot180;
Jump2ReadOnlyData* roData = &camera->paramData.jump2.roData;
Jump2ReadWriteData* rwData = &camera->paramData.jump2.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -2689,7 +2689,7 @@ s32 Camera_Jump3(Camera* camera) {
Vec3f* eye = &camera->eye;
Vec3f* at = &camera->at;
Vec3f* eyeNext = &camera->eyeNext;
s32 prevMode;
UNUSED_NDEBUG s32 prevMode;
f32 spC4;
f32 spC0;
f32 spBC;
@ -2699,8 +2699,7 @@ s32 Camera_Jump3(Camera* camera) {
Jump3ReadOnlyData* roData = &camera->paramData.jump3.roData;
VecGeo eyeAtOffset;
VecGeo eyeNextAtOffset;
s32 pad;
s32 pad2;
STACK_PADS(s32, 2);
CameraModeValue* values;
f32 t2;
f32 phi_f0;
@ -2708,9 +2707,9 @@ s32 Camera_Jump3(Camera* camera) {
f32 playerHeight;
PosRot playerhead;
f32 yNormal;
f32 temp_f18;
STACK_PAD(s32);
s32 modeSwitch;
f32 temp_f2_2;
STACK_PAD(s32);
Jump3ReadWriteData* rwData = &camera->paramData.jump3.rwData;
playerHeight = Player_GetHeight(camera->player);
@ -2889,7 +2888,7 @@ s32 Camera_Battle1(Camera* camera) {
Vec3f targetPos;
f32 var3;
f32 var2;
f32 temp_f0_2;
STACK_PAD(s32);
f32 temp_f12_2;
f32 spFC;
f32 spF8;
@ -2916,7 +2915,7 @@ s32 Camera_Battle1(Camera* camera) {
f32 fov;
Battle1ReadOnlyData* roData = &camera->paramData.batt1.roData;
Battle1ReadWriteData* rwData = &camera->paramData.batt1.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
skipEyeAtCalc = false;
@ -3167,7 +3166,7 @@ s32 Camera_Battle4(Camera* camera) {
VecGeo eyeNextAtOffset;
Battle4ReadOnlyData* roData = &camera->paramData.batt4.roData;
Battle4ReadWriteData* rwData = &camera->paramData.batt4.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -3265,7 +3264,7 @@ s32 Camera_KeepOn1(Camera* camera) {
s16 isOffGround;
KeepOn1ReadOnlyData* roData = &camera->paramData.keep1.roData;
KeepOn1ReadWriteData* rwData = &camera->paramData.keep1.rwData;
s16 t3;
STACK_PAD(s32);
f32 playerHeight;
sp88 = 0;
@ -3499,7 +3498,7 @@ s32 Camera_KeepOn3(Camera* camera) {
PosRot* camPlayerPosRot = &camera->playerPosRot;
KeepOn3ReadOnlyData* roData = &camera->paramData.keep3.roData;
KeepOn3ReadWriteData* rwData = &camera->paramData.keep3.rwData;
s32 pad;
s32 value;
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -3613,10 +3612,10 @@ s32 Camera_KeepOn3(Camera* camera) {
}
PRINTF("camera: talk: BG&collision check %d time(s)\n", i);
camera->stateFlags &= ~(CAM_STATE_CHECK_BG | CAM_STATE_EXTERNAL_FINISHED);
pad = ((rwData->animTimer + 1) * rwData->animTimer) >> 1;
rwData->eyeToAtTargetYaw = (f32)(s16)(atToEyeAdj.yaw - atToEyeNextDir.yaw) / pad;
rwData->eyeToAtTargetPitch = (f32)(s16)(atToEyeAdj.pitch - atToEyeNextDir.pitch) / pad;
rwData->eyeToAtTargetR = (atToEyeAdj.r - atToEyeNextDir.r) / pad;
value = ((rwData->animTimer + 1) * rwData->animTimer) >> 1;
rwData->eyeToAtTargetYaw = (f32)(s16)(atToEyeAdj.yaw - atToEyeNextDir.yaw) / value;
rwData->eyeToAtTargetPitch = (f32)(s16)(atToEyeAdj.pitch - atToEyeNextDir.pitch) / value;
rwData->eyeToAtTargetR = (atToEyeAdj.r - atToEyeNextDir.r) / value;
return 1;
}
@ -3665,7 +3664,7 @@ s32 Camera_KeepOn3(Camera* camera) {
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;
static Vec3f D_8015BD60;
UNUSED static Vec3f D_8015BD60;
static Vec3f D_8015BD70;
Vec3f* eye = &camera->eye;
Vec3f* at = &camera->at;
@ -3685,7 +3684,7 @@ s32 Camera_KeepOn4(Camera* camera) {
PosRot* playerPosRot = &camera->playerPosRot;
KeepOn4ReadOnlyData* roData = &camera->paramData.keep4.roData;
KeepOn4ReadWriteData* rwData = &camera->paramData.keep4.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
Player* player = GET_PLAYER(camera->play);
s16 angleCnt;
@ -3988,7 +3987,7 @@ s32 Camera_KeepOn0(Camera* camera) {
VecGeo eyeAtOffset;
KeepOn0ReadOnlyData* roData = &camera->paramData.keep0.roData;
KeepOn0ReadWriteData* rwData = &camera->paramData.keep0.rwData;
s32 pad;
STACK_PAD(s32);
BgCamFuncData* bgCamFuncData;
UNUSED Vec3s bgCamRot;
s16 fov;
@ -4056,10 +4055,10 @@ s32 Camera_KeepOn0(Camera* camera) {
s32 Camera_Fixed1(Camera* camera) {
Fixed1ReadOnlyData* roData = &camera->paramData.fixd1.roData;
Fixed1ReadWriteData* rwData = &camera->paramData.fixd1.rwData;
s32 pad;
STACK_PAD(s32);
VecGeo eyeOffset;
VecGeo eyeAtOffset;
s32 pad2;
STACK_PAD(s32);
Vec3f adjustedPos;
BgCamFuncData* bgCamFuncData;
Vec3f* eye = &camera->eye;
@ -4135,7 +4134,7 @@ s32 Camera_Fixed2(Camera* camera) {
BgCamFuncData* bgCamFuncData;
Fixed2ReadOnlyData* roData = &camera->paramData.fixd2.roData;
Fixed2ReadWriteData* rwData = &camera->paramData.fixd2.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -4214,7 +4213,7 @@ s32 Camera_Fixed3(Camera* camera) {
UNUSED VecGeo eyeAtOffset;
Fixed3ReadOnlyData* roData = &camera->paramData.fixd3.roData;
Fixed3ReadWriteData* rwData = &camera->paramData.fixd3.rwData;
s32 pad;
STACK_PAD(s32);
bgCamFuncData = (BgCamFuncData*)Camera_GetBgCamFuncData(camera);
@ -4286,7 +4285,7 @@ s32 Camera_Fixed4(Camera* camera) {
VecGeo atTargetEyeNextOffset;
PosRot* playerPosRot = &camera->playerPosRot;
BgCamFuncData* bgCamFuncData;
Vec3f* posOffset = &camera->playerToAtOffset;
UNUSED Vec3f* posOffset = &camera->playerToAtOffset;
Fixed4ReadOnlyData* roData = &camera->paramData.fixd4.roData;
Fixed4ReadWriteData* rwData = &camera->paramData.fixd4.rwData;
f32 playerYOffset;
@ -4382,7 +4381,7 @@ s32 Camera_Subj3(Camera* camera) {
Subj3ReadOnlyData* roData = &camera->paramData.subj3.roData;
Subj3ReadWriteData* rwData = &camera->paramData.subj3.rwData;
CameraModeValue* values;
Vec3f* pad2;
STACK_PAD(s32);
f32 playerHeight;
sp60 = Actor_GetFocus(&camera->player->actor);
@ -4510,14 +4509,13 @@ s32 Camera_Subj4(Camera* camera) {
Vec3f temp1;
Vec3f zoomAtTarget;
f32 temp2;
s32 pad1;
STACK_PAD(s32);
f32 eyeLerp;
PosRot playerPosRot;
VecGeo targetOffset;
VecGeo atEyeOffset;
s16 eyeToAtYaw;
s32 pad2;
f32 temp;
STACK_PADS(s32, 2);
Subj4ReadOnlyData* roData = &camera->paramData.subj4.roData;
Subj4ReadWriteData* rwData = &camera->paramData.subj4.rwData;
@ -4680,7 +4678,7 @@ s32 Camera_Data3(Camera* camera) {
}
s32 Camera_Data4(Camera* camera) {
s32 pad2[2];
STACK_PADS(s32, 2);
Data4ReadOnlyData* roData = &camera->paramData.data4.roData;
VecGeo eyeAtOffset;
VecGeo atOffset;
@ -4690,7 +4688,7 @@ s32 Camera_Data4(Camera* camera) {
Vec3f* eyeNext = &camera->eyeNext;
BgCamFuncData* bgCamFuncData;
Vec3f lookAt;
s32 pad;
STACK_PAD(s32);
Data4ReadWriteData* rwData = &camera->paramData.data4.rwData;
Vec3f* eye = &camera->eye;
f32 playerHeight;
@ -4767,9 +4765,9 @@ s32 Camera_Unique1(Camera* camera) {
UNUSED PosRot playerhead;
Unique1ReadOnlyData* roData = &camera->paramData.uniq1.roData;
Unique1ReadWriteData* rwData = &camera->paramData.uniq1.rwData;
s32 pad;
STACK_PAD(s32);
f32 playerHeight;
s32 pad2;
STACK_PAD(s32);
playerHeight = Player_GetHeight(camera->player);
if (RELOAD_PARAMS(camera) || CAM_DEBUG_RELOAD_PARAMS) {
@ -4854,11 +4852,11 @@ s32 Camera_Unique2(Camera* camera) {
Vec3f playerPos;
VecGeo eyeOffset;
VecGeo eyeAtOffset;
s32 pad;
STACK_PAD(s32);
f32 lerpRateFactor;
Unique2ReadOnlyData* roData = &camera->paramData.uniq2.roData;
Unique2ReadWriteData* rwData = &camera->paramData.uniq2.rwData;
s32 pad2;
STACK_PAD(s32);
f32 playerHeight;
playerHeight = Player_GetHeight(camera->player);
@ -5219,7 +5217,7 @@ s32 Camera_Unique6(Camera* camera) {
* camera rotates to follow player
*/
s32 Camera_Unique7(Camera* camera) {
s32 pad;
STACK_PAD(s32);
Unique7ReadOnlyData* roData = &camera->paramData.uniq7.roData;
PosRot* playerPosRot = &camera->playerPosRot;
VecGeo playerPosEyeOffset;
@ -5296,7 +5294,7 @@ s32 Camera_Unique9(Camera* camera) {
s16 action;
s16 atFlags;
s16 eyeFlags;
s16 pad2;
STACK_PAD(s16);
PosRot targethead;
PosRot playerhead;
PosRot playerPosRot;
@ -5816,7 +5814,7 @@ void Camera_RotateAroundPoint(PosRot* at, Vec3f* pos, Vec3f* dst) {
* until all keyFrames have been exhausted.
*/
s32 Camera_Demo1(Camera* camera) {
s32 pad;
STACK_PAD(s32);
Demo1ReadOnlyData* roData = &camera->paramData.demo1.roData;
f32* cameraFOV = &camera->fov;
Vec3f* at = &camera->at;
@ -5908,13 +5906,13 @@ s32 Camera_Demo3(Camera* camera) {
Vec3f sp68;
Vec3f sp5C;
f32 temp_f0;
s32 pad;
STACK_PAD(s32);
u8 skipUpdateEye = false;
f32 yOffset = Player_GetHeight(camera->player);
s16 angle;
Demo3ReadOnlyData* roData = &camera->paramData.demo3.roData;
Demo3ReadWriteData* rwData = &camera->paramData.demo3.rwData;
s32 pad2;
STACK_PAD(s32);
camera->stateFlags &= ~CAM_STATE_CAM_FUNC_FINISH;
@ -6124,7 +6122,7 @@ s32 Camera_Demo5(Camera* camera) {
VecGeo eyePlayerGeo;
s16 targetScreenPosX;
s16 targetScreenPosY;
s32 pad1;
STACK_PAD(s32);
PosRot playerhead;
PosRot targethead;
Player* player;
@ -6132,7 +6130,7 @@ s32 Camera_Demo5(Camera* camera) {
s32 framesDiff;
s32 temp_v0;
s16 t;
s32 pad2;
STACK_PAD(s32);
playerhead = Actor_GetFocus(&camera->player->actor);
player = camera->player;
@ -6755,7 +6753,7 @@ s32 Camera_Demo8(Camera* camera) {
* to be relative to the main camera's player, the current camera's player, or the main camera's target
*/
s32 Camera_Demo9(Camera* camera) {
s32 pad;
STACK_PAD(s32);
s32 finishAction;
s16 onePointTimer;
OnePointCamData* onePointCamData = &camera->paramData.demo9.onePointCamData;
@ -6764,7 +6762,7 @@ s32 Camera_Demo9(Camera* camera) {
Vec3f newEye;
Vec3f newAt;
f32 newRoll;
s32 pad3;
STACK_PAD(s32);
Camera* mainCam;
Vec3f* eye = &camera->eye;
PosRot* mainCamPlayerPosRot;
@ -6993,7 +6991,7 @@ s32 Camera_Special5(Camera* camera) {
Vec3f* at = &camera->at;
Vec3f* eyeNext = &camera->eyeNext;
PosRot spA8;
s16 pad;
STACK_PAD(s16);
s16 spA4;
CamColChk sp7C;
VecGeo sp74;
@ -7205,12 +7203,12 @@ s32 Camera_Special6(Camera* camera) {
BgCamFuncData* bgCamFuncData;
Vec3s bgCamRot;
s16 fov;
f32 sp54;
STACK_PAD(s32);
f32 timerF;
f32 timerDivisor;
Special6ReadOnlyData* roData = &camera->paramData.spec6.roData;
Special6ReadWriteData* rwData = &camera->paramData.spec6.rwData;
s32 pad;
STACK_PAD(s32);
if (RELOAD_PARAMS(camera) || CAM_DEBUG_RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
@ -7301,7 +7299,7 @@ s32 Camera_Special8(Camera* camera) {
}
s32 Camera_Special9(Camera* camera) {
s32 pad;
STACK_PAD(s32);
Vec3f* eye = &camera->eye;
Vec3f* at = &camera->at;
Vec3f* eyeNext = &camera->eyeNext;
@ -7309,14 +7307,14 @@ s32 Camera_Special9(Camera* camera) {
VecGeo eyeAdjustment;
VecGeo atEyeOffsetGeo;
f32 playerYOffset;
s32 pad3;
STACK_PAD(s32);
PosRot* playerPosRot = &camera->playerPosRot;
PosRot referencePosRot;
f32 yNormal;
DoorParams* doorParams = &camera->paramData.doorParams;
Special9ReadOnlyData* roData = &camera->paramData.spec9.roData;
Special9ReadWriteData* rwData = &camera->paramData.spec9.rwData;
s32 pad4;
STACK_PAD(s32);
BgCamFuncData* bgCamFuncData;
playerYOffset = Player_GetHeight(camera->player);
@ -7472,14 +7470,14 @@ void Camera_Destroy(Camera* camera) {
}
}
void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState* play) {
void Camera_Init(Camera* camera, UNUSED View* view, UNUSED CollisionContext* colCtx, PlayState* play) {
Camera* camP;
s16 curUID;
s16 j;
memset(camera, 0, sizeof(Camera));
if (sInitRegs) {
s32 i;
UNUSED_NDEBUG s32 i;
#if DEBUG_FEATURES
for (i = 0; i < sOREGInitCnt; i++) {
@ -7587,7 +7585,7 @@ void func_80057FC4(Camera* camera) {
}
}
void Camera_Stub80058140(Camera* camera) {
void Camera_Stub80058140(UNUSED Camera* camera) {
}
void Camera_InitDataUsingPlayer(Camera* camera, Player* player) {
@ -7632,7 +7630,7 @@ void Camera_InitDataUsingPlayer(Camera* camera, Player* player) {
}
{
s32 pad[2];
STACK_PADS(s32, 2);
camera->bgCamIndexBeforeUnderwater = -1;
camera->waterCamSetting = -1;
@ -7664,9 +7662,9 @@ void Camera_InitDataUsingPlayer(Camera* camera, Player* player) {
}
s16 Camera_ChangeStatus(Camera* camera, s16 status) {
CameraModeValue* values;
CameraModeValue* valueP;
s32 i;
UNUSED_NDEBUG CameraModeValue* values;
UNUSED_NDEBUG CameraModeValue* valueP;
UNUSED_NDEBUG s32 i;
#if DEBUG_FEATURES
if (PREG(82)) {
@ -7952,7 +7950,7 @@ void Camera_UpdateDistortion(Camera* camera) {
f32 speedFactor;
f32 depthPhaseStep;
f32 screenPlanePhaseStep;
s32 pad[5];
STACK_PADS(s32, 5);
f32 xScale;
f32 yScale;
f32 zScale;
@ -8604,7 +8602,7 @@ s32 Camera_RequestSetting(Camera* camera, s16 setting) {
s32 Camera_RequestBgCam(Camera* camera, s32 requestedBgCamIndex) {
s16 requestedCamSetting;
s16 settingChangeSuccessful;
UNUSED_NDEBUG s16 settingChangeSuccessful;
if ((requestedBgCamIndex == -1) || (requestedBgCamIndex == camera->bgCamIndex)) {
camera->behaviorFlags |= CAM_BEHAVIOR_BG_PROCESSED;
@ -8687,7 +8685,7 @@ s16 Camera_GetCamDirYaw(Camera* camera) {
return camDir.y;
}
s32 Camera_RequestQuake(Camera* camera, s32 unused, s16 y, s32 duration) {
s32 Camera_RequestQuake(Camera* camera, UNUSED s32 unused, s16 y, s32 duration) {
s16 quakeIndex;
quakeIndex = Quake_Request(camera, QUAKE_TYPE_3);
@ -8701,7 +8699,7 @@ s32 Camera_RequestQuake(Camera* camera, s32 unused, s16 y, s32 duration) {
}
s32 Camera_SetViewParam(Camera* camera, s32 viewFlag, void* param) {
s32 pad[3];
STACK_PADS(s32, 3);
if (param != NULL) {
switch (viewFlag) {
@ -8799,7 +8797,7 @@ s16 Camera_UnsetStateFlag(Camera* camera, s16 stateFlag) {
* A bgCamIndex of -1 uses the default door camera setting (CAM_SET_DOORC)
* Otherwise, change the door camera setting by reading the bgCam indexed at bgCamIndex
*/
s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 bgCamIndex, f32 arg3, s16 timer1, s16 timer2,
s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 bgCamIndex, UNUSED f32 arg3, s16 timer1, s16 timer2,
s16 timer3) {
DoorParams* doorParams = &camera->paramData.doorParams;
@ -8875,7 +8873,7 @@ Vec3f Camera_GetQuakeOffset(Camera* camera) {
}
void Camera_SetCameraData(Camera* camera, s16 setDataFlags, void* data0, void* data1, s16 data2, s16 data3,
UNK_TYPE arg6) {
UNUSED UNK_TYPE arg6) {
if (setDataFlags & 0x1) {
camera->data0 = data0;
}

View File

@ -1,4 +1,5 @@
#include "array_count.h"
#include "attributes.h"
#include "ultra64.h"
typedef struct CameraModeValue {

View File

@ -1,7 +1,9 @@
#include "gfx.h"
#include "attributes.h"
#include "printf.h"
#include "regs.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
#include "terminal.h"
@ -91,7 +93,7 @@ void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC,
}
#endif
s32 Collider_InitBase(PlayState* play, Collider* col) {
s32 Collider_InitBase(UNUSED PlayState* play, Collider* col) {
static Collider init = {
NULL, NULL, NULL, NULL, AT_NONE, AC_NONE, OC1_NONE, OC2_NONE, COL_MATERIAL_HIT3, COLSHAPE_MAX,
};
@ -100,14 +102,14 @@ s32 Collider_InitBase(PlayState* play, Collider* col) {
return true;
}
s32 Collider_DestroyBase(PlayState* play, Collider* col) {
s32 Collider_DestroyBase(UNUSED PlayState* play, UNUSED Collider* col) {
return true;
}
/**
* Uses default OC2_TYPE_1 and COL_MATERIAL_HIT0
*/
s32 Collider_SetBaseToActor(PlayState* play, Collider* col, ColliderInitToActor* src) {
s32 Collider_SetBaseToActor(UNUSED PlayState* play, Collider* col, ColliderInitToActor* src) {
col->actor = src->actor;
col->atFlags = src->atFlags;
col->acFlags = src->acFlags;
@ -120,7 +122,7 @@ s32 Collider_SetBaseToActor(PlayState* play, Collider* col, ColliderInitToActor*
/**
* Uses default OC2_TYPE_1
*/
s32 Collider_SetBaseType1(PlayState* play, Collider* col, Actor* actor, ColliderInitType1* src) {
s32 Collider_SetBaseType1(UNUSED PlayState* play, Collider* col, Actor* actor, ColliderInitType1* src) {
col->actor = actor;
col->colMaterial = src->colMaterial;
col->atFlags = src->atFlags;
@ -131,7 +133,7 @@ s32 Collider_SetBaseType1(PlayState* play, Collider* col, Actor* actor, Collider
return true;
}
s32 Collider_SetBase(PlayState* play, Collider* col, Actor* actor, ColliderInit* src) {
s32 Collider_SetBase(UNUSED PlayState* play, Collider* col, Actor* actor, ColliderInit* src) {
col->actor = actor;
col->colMaterial = src->colMaterial;
col->atFlags = src->atFlags;
@ -142,34 +144,34 @@ s32 Collider_SetBase(PlayState* play, Collider* col, Actor* actor, ColliderInit*
return true;
}
void Collider_ResetATBase(PlayState* play, Collider* col) {
void Collider_ResetATBase(UNUSED PlayState* play, Collider* col) {
col->at = NULL;
col->atFlags &= ~(AT_HIT | AT_BOUNCED);
}
void Collider_ResetACBase(PlayState* play, Collider* col) {
void Collider_ResetACBase(UNUSED PlayState* play, Collider* col) {
col->ac = NULL;
col->acFlags &= ~(AC_HIT | AC_BOUNCED);
}
void Collider_ResetOCBase(PlayState* play, Collider* col) {
void Collider_ResetOCBase(UNUSED PlayState* play, Collider* col) {
col->oc = NULL;
col->ocFlags1 &= ~OC1_HIT;
col->ocFlags2 &= ~OC2_HIT_PLAYER;
}
s32 Collider_InitElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* atDmgInfo) {
s32 Collider_InitElementDamageInfoAT(UNUSED PlayState* play, ColliderElementDamageInfoAT* atDmgInfo) {
static ColliderElementDamageInfoAT init = { 0x00000000, 0, 0 };
*atDmgInfo = init;
return true;
}
s32 Collider_DestroyElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* atDmgInfo) {
s32 Collider_DestroyElementDamageInfoAT(UNUSED PlayState* play, UNUSED ColliderElementDamageInfoAT* atDmgInfo) {
return true;
}
s32 Collider_SetElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT* dest,
s32 Collider_SetElementDamageInfoAT(UNUSED PlayState* play, ColliderElementDamageInfoAT* dest,
ColliderElementDamageInfoAT* src) {
dest->dmgFlags = src->dmgFlags;
dest->effect = src->effect;
@ -177,21 +179,21 @@ s32 Collider_SetElementDamageInfoAT(PlayState* play, ColliderElementDamageInfoAT
return true;
}
void Collider_ResetATElement_Unk(PlayState* play, ColliderElement* elem) {
void Collider_ResetATElement_Unk(UNUSED PlayState* play, UNUSED ColliderElement* elem) {
}
s32 Collider_InitElementDamageInfoAC(PlayState* play, ColliderElementDamageInfoAC* acDmgInfo) {
s32 Collider_InitElementDamageInfoAC(UNUSED PlayState* play, ColliderElementDamageInfoAC* acDmgInfo) {
static ColliderElementDamageInfoAC init = { 0xFFCFFFFF, 0, 0, { 0, 0, 0 } };
*acDmgInfo = init;
return true;
}
s32 Collider_DestroyElementDamageInfoAC(PlayState* play, ColliderElementDamageInfoAC* acDmgInfo) {
s32 Collider_DestroyElementDamageInfoAC(UNUSED PlayState* play, UNUSED ColliderElementDamageInfoAC* acDmgInfo) {
return true;
}
s32 Collider_SetElementDamageInfoAC(PlayState* play, ColliderElementDamageInfoAC* acDmgInfo,
s32 Collider_SetElementDamageInfoAC(UNUSED PlayState* play, ColliderElementDamageInfoAC* acDmgInfo,
ColliderElementDamageInfoACInit* init) {
acDmgInfo->dmgFlags = init->dmgFlags;
acDmgInfo->effect = init->effect;
@ -243,7 +245,7 @@ void Collider_ResetATElement(PlayState* play, ColliderElement* elem) {
Collider_ResetATElement_Unk(play, elem);
}
void Collider_ResetACElement(PlayState* play, ColliderElement* elem) {
void Collider_ResetACElement(UNUSED PlayState* play, ColliderElement* elem) {
elem->acDmgInfo.hitPos.x = elem->acDmgInfo.hitPos.y = elem->acDmgInfo.hitPos.z = 0;
elem->acElemFlags &= ~ACELEM_HIT;
elem->acElemFlags &= ~ACELEM_DRAW_HITMARK;
@ -251,11 +253,11 @@ void Collider_ResetACElement(PlayState* play, ColliderElement* elem) {
elem->acHitElem = NULL;
}
void Collider_ResetOCElement(PlayState* play, ColliderElement* elem) {
void Collider_ResetOCElement(UNUSED PlayState* play, ColliderElement* elem) {
elem->ocElemFlags &= ~OCELEM_HIT;
}
s32 Collider_InitJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dim) {
s32 Collider_InitJntSphElementDim(UNUSED PlayState* play, ColliderJntSphElementDim* dim) {
static ColliderJntSphElementDim init = {
{ { 0, 0, 0 }, 0 },
{ { 0, 0, 0 }, 0 },
@ -266,11 +268,12 @@ s32 Collider_InitJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dim
return true;
}
s32 Collider_DestroyJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dim) {
s32 Collider_DestroyJntSphElementDim(UNUSED PlayState* play, UNUSED ColliderJntSphElementDim* dim) {
return true;
}
s32 Collider_SetJntSphElementDim(PlayState* play, ColliderJntSphElementDim* dest, ColliderJntSphElementDimInit* src) {
s32 Collider_SetJntSphElementDim(UNUSED PlayState* play, ColliderJntSphElementDim* dest,
ColliderJntSphElementDimInit* src) {
dest->limb = src->limb;
dest->modelSphere = src->modelSphere;
dest->scale = src->scale * 0.01f;
@ -503,18 +506,18 @@ s32 Collider_ResetJntSphOC(PlayState* play, Collider* col) {
return true;
}
s32 Collider_InitCylinderDim(PlayState* play, Cylinder16* dim) {
s32 Collider_InitCylinderDim(UNUSED PlayState* play, Cylinder16* dim) {
Cylinder16 init = { 0, 0, 0, { 0, 0, 0 } };
*dim = init;
return true;
}
s32 Collider_DestroyCylinderDim(PlayState* play, Cylinder16* dim) {
s32 Collider_DestroyCylinderDim(UNUSED PlayState* play, UNUSED Cylinder16* dim) {
return true;
}
s32 Collider_SetCylinderDim(PlayState* play, Cylinder16* dest, Cylinder16* src) {
s32 Collider_SetCylinderDim(UNUSED PlayState* play, Cylinder16* dest, Cylinder16* src) {
*dest = *src;
return true;
}
@ -603,7 +606,7 @@ s32 Collider_ResetCylinderOC(PlayState* play, Collider* col) {
return true;
}
s32 Collider_InitTrisElementDim(PlayState* play, TriNorm* dim) {
s32 Collider_InitTrisElementDim(UNUSED PlayState* play, TriNorm* dim) {
static TriNorm init = {
{ { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ { 0.0f, 0.0f, 0.0f }, 0.0f },
@ -613,11 +616,11 @@ s32 Collider_InitTrisElementDim(PlayState* play, TriNorm* dim) {
return true;
}
s32 Collider_DestroyTrisElementDim(PlayState* play, TriNorm* dim) {
s32 Collider_DestroyTrisElementDim(UNUSED PlayState* play, UNUSED TriNorm* dim) {
return true;
}
s32 Collider_SetTrisElementDim(PlayState* play, TriNorm* dest, ColliderTrisElementDimInit* src) {
s32 Collider_SetTrisElementDim(UNUSED PlayState* play, TriNorm* dest, ColliderTrisElementDimInit* src) {
Vec3f* destVtx;
Vec3f* srcVtx;
f32 nx;
@ -834,7 +837,7 @@ s32 Collider_ResetTrisOC(PlayState* play, Collider* col) {
return true;
}
s32 Collider_InitQuadDim(PlayState* play, ColliderQuadDim* dim) {
s32 Collider_InitQuadDim(UNUSED PlayState* play, ColliderQuadDim* dim) {
static ColliderQuadDim init = {
{ { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0, 0, 0 },
@ -846,11 +849,11 @@ s32 Collider_InitQuadDim(PlayState* play, ColliderQuadDim* dim) {
return true;
}
s32 Collider_DestroyQuadDim(PlayState* play, ColliderQuadDim* dim) {
s32 Collider_DestroyQuadDim(UNUSED PlayState* play, UNUSED ColliderQuadDim* dim) {
return true;
}
s32 Collider_ResetQuadACDist(PlayState* play, ColliderQuadDim* dim) {
s32 Collider_ResetQuadACDist(UNUSED PlayState* play, ColliderQuadDim* dim) {
dim->acDistSq = 1.0e38f;
return true;
}
@ -864,7 +867,7 @@ void Collider_SetQuadMidpoints(ColliderQuadDim* dim) {
dim->baMid.z = (dim->quad[1].z + dim->quad[0].z) * 0.5f;
}
s32 Collider_SetQuadDim(PlayState* play, ColliderQuadDim* dest, ColliderQuadDimInit* src) {
s32 Collider_SetQuadDim(UNUSED PlayState* play, ColliderQuadDim* dest, ColliderQuadDimInit* src) {
dest->quad[0] = src->quad[0];
dest->quad[1] = src->quad[1];
dest->quad[2] = src->quad[2];
@ -977,7 +980,7 @@ s32 Collider_QuadSetNearestAC(PlayState* play, ColliderQuad* quad, Vec3f* hitPos
* Initializes an OcLine to default values
* OcLines are entirely unused.
*/
s32 Collider_InitLine(PlayState* play, OcLine* line) {
s32 Collider_InitLine(UNUSED PlayState* play, OcLine* line) {
Vec3f init = { 0.0f, 0.0f, 0.0f };
Math_Vec3f_Copy(&line->line.a, &init);
@ -989,7 +992,7 @@ s32 Collider_InitLine(PlayState* play, OcLine* line) {
* Destroys an OcLine
* OcLines are entirely unused.
*/
s32 Collider_DestroyLine(PlayState* play, OcLine* line) {
s32 Collider_DestroyLine(UNUSED PlayState* play, UNUSED OcLine* line) {
return true;
}
@ -997,7 +1000,7 @@ s32 Collider_DestroyLine(PlayState* play, OcLine* line) {
* Sets up an OcLine with endpoints a and b.
* OcLines are entirely unused.
*/
s32 Collider_SetLinePoints(PlayState* play, OcLine* ocLine, Vec3f* a, Vec3f* b) {
s32 Collider_SetLinePoints(UNUSED PlayState* play, OcLine* ocLine, Vec3f* a, Vec3f* b) {
Math_Vec3f_Copy(&ocLine->line.a, a);
Math_Vec3f_Copy(&ocLine->line.b, b);
return true;
@ -1017,7 +1020,7 @@ s32 Collider_SetLine(PlayState* play, OcLine* dest, OcLine* src) {
* Resets the OcLine's collision flags.
* OcLines are entirely unused.
*/
s32 Collider_ResetLineOC(PlayState* play, OcLine* line) {
s32 Collider_ResetLineOC(UNUSED PlayState* play, OcLine* line) {
line->ocFlags &= ~OCLINE_HIT;
return true;
}
@ -1036,13 +1039,13 @@ void CollisionCheck_InitContext(PlayState* play, CollisionCheckContext* colChkCt
#endif
}
void CollisionCheck_DestroyContext(PlayState* play, CollisionCheckContext* colChkCtx) {
void CollisionCheck_DestroyContext(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx) {
}
/**
* Clears all collider lists in CollisionCheckContext when not in SAC mode.
*/
void CollisionCheck_ClearContext(PlayState* play, CollisionCheckContext* colChkCtx) {
void CollisionCheck_ClearContext(UNUSED PlayState* play, CollisionCheckContext* colChkCtx) {
Collider** colP;
OcLine** lineP;
@ -1072,14 +1075,14 @@ void CollisionCheck_ClearContext(PlayState* play, CollisionCheckContext* colChkC
/**
* Enables SAC, an alternate collision check mode that allows direct management of collider lists. Unused.
*/
void CollisionCheck_EnableSAC(PlayState* play, CollisionCheckContext* colChkCtx) {
void CollisionCheck_EnableSAC(UNUSED PlayState* play, CollisionCheckContext* colChkCtx) {
colChkCtx->sacFlags |= SAC_ENABLE;
}
/**
* Disables SAC, an alternate collision check mode that allows direct management of collider lists. Unused.
*/
void CollisionCheck_DisableSAC(PlayState* play, CollisionCheckContext* colChkCtx) {
void CollisionCheck_DisableSAC(UNUSED PlayState* play, CollisionCheckContext* colChkCtx) {
colChkCtx->sacFlags &= ~SAC_ENABLE;
}
@ -1423,14 +1426,14 @@ s32 CollisionCheck_NoSharedFlags(ColliderElement* atElem, ColliderElement* acEle
* Spawns no blood drops.
* Used by collider types HIT1, HIT3, HIT5, METAL, NONE, WOOD, HARD, and TREE
*/
void CollisionCheck_NoBlood(PlayState* play, Collider* collider, Vec3f* v) {
void CollisionCheck_NoBlood(UNUSED PlayState* play, UNUSED Collider* collider, UNUSED Vec3f* v) {
}
/**
* Spawns blue blood drops.
* Used by collider types HIT0 and HIT8.
*/
void CollisionCheck_BlueBlood(PlayState* play, Collider* collider, Vec3f* v) {
void CollisionCheck_BlueBlood(PlayState* play, UNUSED Collider* collider, Vec3f* v) {
static EffectSparkInit sparkInit;
s32 effectIndex;
@ -1483,7 +1486,7 @@ void CollisionCheck_BlueBlood(PlayState* play, Collider* collider, Vec3f* v) {
* Spawns green blood drops.
* Used by collider types HIT2 and HIT6. No actor has type HIT2.
*/
void CollisionCheck_GreenBlood(PlayState* play, Collider* collider, Vec3f* v) {
void CollisionCheck_GreenBlood(PlayState* play, UNUSED Collider* collider, Vec3f* v) {
static EffectSparkInit sparkInit;
s32 effectIndex;
@ -1536,7 +1539,7 @@ void CollisionCheck_GreenBlood(PlayState* play, Collider* collider, Vec3f* v) {
* Spawns a burst of water.
* Used by collider type HIT4, which no actor has.
*/
void CollisionCheck_WaterBurst(PlayState* play, Collider* collider, Vec3f* pos) {
void CollisionCheck_WaterBurst(PlayState* play, UNUSED Collider* collider, Vec3f* pos) {
EffectSsSibuki_SpawnBurst(play, pos);
CollisionCheck_SpawnWaterDroplets(play, pos);
}
@ -1545,7 +1548,7 @@ void CollisionCheck_WaterBurst(PlayState* play, Collider* collider, Vec3f* pos)
* Spawns red blood drops.
* Used by collider type HIT7, which no actor has.
*/
void CollisionCheck_RedBlood(PlayState* play, Collider* collider, Vec3f* v) {
void CollisionCheck_RedBlood(PlayState* play, UNUSED Collider* collider, Vec3f* v) {
CollisionCheck_SpawnRedBlood(play, v);
}
@ -1553,7 +1556,7 @@ void CollisionCheck_RedBlood(PlayState* play, Collider* collider, Vec3f* v) {
* Spawns red blood drops.
* Unused.
*/
void CollisionCheck_RedBloodUnused(PlayState* play, Collider* collider, Vec3f* v) {
void CollisionCheck_RedBloodUnused(PlayState* play, UNUSED Collider* collider, Vec3f* v) {
CollisionCheck_SpawnRedBlood(play, v);
}
@ -1727,8 +1730,8 @@ void CollisionCheck_SetBounce(Collider* atCol, Collider* acCol) {
/**
* Performs the AC collision between the AT element and AC element that collided.
*/
s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement* atElem, Vec3f* atPos, Collider* acCol,
ColliderElement* acElem, Vec3f* acPos, Vec3f* hitPos) {
s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement* atElem, UNUSED Vec3f* atPos,
Collider* acCol, ColliderElement* acElem, UNUSED Vec3f* acPos, Vec3f* hitPos) {
if (acCol->acFlags & AC_HARD && atCol->actor != NULL && acCol->actor != NULL) {
CollisionCheck_SetBounce(atCol, acCol);
}
@ -1763,7 +1766,7 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement*
return true;
}
void CollisionCheck_ATJntSphVsACJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATJntSphVsACJntSph(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderJntSph* atJntSph = (ColliderJntSph*)atCol;
ColliderJntSphElement* atJntSphElem;
@ -1817,7 +1820,7 @@ void CollisionCheck_ATJntSphVsACJntSph(PlayState* play, CollisionCheckContext* c
}
}
void CollisionCheck_ATJntSphVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATJntSphVsACCyl(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderJntSph* atJntSph = (ColliderJntSph*)atCol;
ColliderJntSphElement* atJntSphElem;
@ -1875,7 +1878,7 @@ void CollisionCheck_ATJntSphVsACCyl(PlayState* play, CollisionCheckContext* colC
}
}
void CollisionCheck_ATCylVsACJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATCylVsACJntSph(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderCylinder* atCyl = (ColliderCylinder*)atCol;
ColliderJntSph* acJntSph = (ColliderJntSph*)acCol;
@ -1899,7 +1902,6 @@ void CollisionCheck_ATCylVsACJntSph(PlayState* play, CollisionCheckContext* colC
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
f32 acToHit;
atPos.x = atCyl->dim.pos.x;
atPos.y = atCyl->dim.pos.y;
@ -1936,7 +1938,7 @@ void CollisionCheck_ATCylVsACJntSph(PlayState* play, CollisionCheckContext* colC
}
}
void CollisionCheck_ATJntSphVsACTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATJntSphVsACTris(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderJntSph* atJntSph = (ColliderJntSph*)atCol;
ColliderJntSphElement* atJntSphElem;
@ -1978,7 +1980,7 @@ void CollisionCheck_ATJntSphVsACTris(PlayState* play, CollisionCheckContext* col
}
}
void CollisionCheck_ATTrisVsACJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATTrisVsACJntSph(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderTris* atTris = (ColliderTris*)atCol;
ColliderTrisElement* atTrisElem;
@ -2020,7 +2022,7 @@ void CollisionCheck_ATTrisVsACJntSph(PlayState* play, CollisionCheckContext* col
}
}
void CollisionCheck_ATJntSphVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATJntSphVsACQuad(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static TriNorm tri1;
static TriNorm tri2;
@ -2067,7 +2069,7 @@ void CollisionCheck_ATJntSphVsACQuad(PlayState* play, CollisionCheckContext* col
}
}
void CollisionCheck_ATQuadVsACJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATQuadVsACJntSph(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static TriNorm tri1;
static TriNorm tri2;
@ -2119,7 +2121,8 @@ void CollisionCheck_ATQuadVsACJntSph(PlayState* play, CollisionCheckContext* col
}
}
void CollisionCheck_ATCylVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
void CollisionCheck_ATCylVsACCyl(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderCylinder* atCyl = (ColliderCylinder*)atCol;
ColliderCylinder* acCyl = (ColliderCylinder*)acCol;
f32 overlapSize;
@ -2157,7 +2160,8 @@ void CollisionCheck_ATCylVsACCyl(PlayState* play, CollisionCheckContext* colChkC
}
}
void CollisionCheck_ATCylVsACTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
void CollisionCheck_ATCylVsACTris(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
ColliderCylinder* atCyl = (ColliderCylinder*)atCol;
ColliderTris* acTris = (ColliderTris*)acCol;
ColliderTrisElement* acTrisElem;
@ -2191,7 +2195,8 @@ void CollisionCheck_ATCylVsACTris(PlayState* play, CollisionCheckContext* colChk
}
}
void CollisionCheck_ATTrisVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
void CollisionCheck_ATTrisVsACCyl(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static Vec3f hitPos;
ColliderTris* atTris = (ColliderTris*)atCol;
ColliderTrisElement* atTrisElem;
@ -2228,7 +2233,8 @@ void CollisionCheck_ATTrisVsACCyl(PlayState* play, CollisionCheckContext* colChk
#pragma increment_block_number "gc-eu:252 gc-eu-mq:252 gc-jp:252 gc-jp-ce:252 gc-jp-mq:252 gc-us:252 gc-us-mq:252" \
"ique-cn:252 ntsc-1.0:252 ntsc-1.1:252 ntsc-1.2:252 pal-1.0:252 pal-1.1:252"
void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
void CollisionCheck_ATCylVsACQuad(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static TriNorm tri1;
static TriNorm tri2;
static Vec3f hitPos;
@ -2281,7 +2287,8 @@ void CollisionCheck_ATCylVsACQuad(PlayState* play, CollisionCheckContext* colChk
}
}
void CollisionCheck_ATQuadVsACCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol, Collider* acCol) {
void CollisionCheck_ATQuadVsACCyl(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static TriNorm tri1;
static TriNorm tri2;
static Vec3f hitPos;
@ -2341,11 +2348,11 @@ void CollisionCheck_ATQuadVsACCyl(PlayState* play, CollisionCheckContext* colChk
}
#if DEBUG_FEATURES
static s8 sBssDummy3;
static s8 sBssDummy4;
UNUSED static s8 sBssDummy3;
UNUSED static s8 sBssDummy4;
#endif
void CollisionCheck_ATTrisVsACTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATTrisVsACTris(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static Vec3f hitPos;
ColliderTris* atTris = (ColliderTris*)atCol;
@ -2390,7 +2397,7 @@ void CollisionCheck_ATTrisVsACTris(PlayState* play, CollisionCheckContext* colCh
}
}
void CollisionCheck_ATTrisVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATTrisVsACQuad(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static Vec3f hitPos;
static TriNorm tri1;
@ -2437,7 +2444,7 @@ void CollisionCheck_ATTrisVsACQuad(PlayState* play, CollisionCheckContext* colCh
}
}
void CollisionCheck_ATQuadVsACTris(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATQuadVsACTris(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static Vec3f hitPos;
static TriNorm tri1;
@ -2489,7 +2496,7 @@ void CollisionCheck_ATQuadVsACTris(PlayState* play, CollisionCheckContext* colCh
}
}
void CollisionCheck_ATQuadVsACQuad(PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol,
void CollisionCheck_ATQuadVsACQuad(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* atCol,
Collider* acCol) {
static TriNorm acTris[2];
static Vec3f hitPos;
@ -2548,7 +2555,7 @@ void CollisionCheck_ATQuadVsACQuad(PlayState* play, CollisionCheckContext* colCh
}
}
void CollisionCheck_SetJntSphHitFX(PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
void CollisionCheck_SetJntSphHitFX(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* col) {
ColliderJntSph* jntSph = (ColliderJntSph*)col;
ColliderJntSphElement* jntSphElem;
@ -2566,7 +2573,7 @@ void CollisionCheck_SetJntSphHitFX(PlayState* play, CollisionCheckContext* colCh
}
}
void CollisionCheck_SetCylHitFX(PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
void CollisionCheck_SetCylHitFX(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* col) {
ColliderCylinder* cyl = (ColliderCylinder*)col;
if ((cyl->elem.acElemFlags & ACELEM_DRAW_HITMARK) && (cyl->elem.acHitElem != NULL) &&
@ -2579,7 +2586,7 @@ void CollisionCheck_SetCylHitFX(PlayState* play, CollisionCheckContext* colChkCt
}
}
void CollisionCheck_SetTrisHitFX(PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
void CollisionCheck_SetTrisHitFX(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* col) {
ColliderTris* tris = (ColliderTris*)col;
ColliderTrisElement* trisElem;
@ -2597,7 +2604,7 @@ void CollisionCheck_SetTrisHitFX(PlayState* play, CollisionCheckContext* colChkC
}
}
void CollisionCheck_SetQuadHitFX(PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
void CollisionCheck_SetQuadHitFX(PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* col) {
ColliderQuad* quad = (ColliderQuad*)col;
Vec3f hitPos;
@ -2742,7 +2749,7 @@ s32 CollisionCheck_GetMassType(u8 mass) {
*/
void CollisionCheck_SetOCvsOC(Collider* leftCol, ColliderElement* leftElem, Vec3f* leftPos, Collider* rightCol,
ColliderElement* rightElem, Vec3f* rightPos, f32 overlap) {
f32 pad;
STACK_PAD(s32);
f32 leftDispRatio;
f32 rightDispRatio;
f32 xzDist;
@ -2831,8 +2838,8 @@ void CollisionCheck_SetOCvsOC(Collider* leftCol, ColliderElement* leftElem, Vec3
}
}
void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol,
Collider* rightCol) {
void CollisionCheck_OC_JntSphVsJntSph(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx,
Collider* leftCol, Collider* rightCol) {
ColliderJntSph* leftJntSph = (ColliderJntSph*)leftCol;
ColliderJntSphElement* leftJntSphElem;
ColliderJntSph* rightJntSph = (ColliderJntSph*)rightCol;
@ -2866,7 +2873,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
}
}
void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol,
void CollisionCheck_OC_JntSphVsCyl(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* leftCol,
Collider* rightCol) {
ColliderJntSph* leftJntSph = (ColliderJntSph*)leftCol;
ColliderJntSphElement* leftJntSphElem;
@ -2899,7 +2906,7 @@ void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCh
CollisionCheck_OC_JntSphVsCyl(play, colChkCtx, rightCol, leftCol);
}
void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* leftCol,
void CollisionCheck_OC_CylVsCyl(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* leftCol,
Collider* rightCol) {
ColliderCylinder* leftCyl = (ColliderCylinder*)leftCol;
ColliderCylinder* rightCyl = (ColliderCylinder*)rightCol;
@ -3078,7 +3085,7 @@ void CollisionCheck_SetInfoGetDamageTable(CollisionCheckInfo* info, s32 index, C
/**
* Apply AC damage effect
*/
void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCtx, Collider* col,
void CollisionCheck_ApplyDamage(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* col,
ColliderElement* elem) {
DamageTable* tbl;
f32 damage;
@ -3190,8 +3197,8 @@ void CollisionCheck_Damage(PlayState* play, CollisionCheckContext* colChkCtx) {
/**
* Checks if the line ab intersects any of the ColliderJntSph's elements
*/
s32 CollisionCheck_LineOC_JntSph(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, Vec3f* a,
Vec3f* b) {
s32 CollisionCheck_LineOC_JntSph(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* collider,
Vec3f* a, Vec3f* b) {
static Linef lineSeg;
ColliderJntSph* jntSph = (ColliderJntSph*)collider;
s32 i;
@ -3214,8 +3221,8 @@ s32 CollisionCheck_LineOC_JntSph(PlayState* play, CollisionCheckContext* colChkC
/**
* Checks if the line segment ab intersects the ColliderCylinder
*/
s32 CollisionCheck_LineOC_Cyl(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, Vec3f* a,
Vec3f* b) {
s32 CollisionCheck_LineOC_Cyl(UNUSED PlayState* play, UNUSED CollisionCheckContext* colChkCtx, Collider* collider,
Vec3f* a, Vec3f* b) {
static Vec3f intersectA;
static Vec3f intersectB;
ColliderCylinder* cylinder = (ColliderCylinder*)collider;
@ -3600,8 +3607,7 @@ s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* a
f32 actorDotItemXZ;
f32 zero = 0.0f;
f32 closeDist;
s32 pad1;
s32 pad2;
STACK_PADS(s32, 2);
actorToItem.x = itemPos->x - actorPos->x;
actorToItem.y = itemPos->y - actorPos->y - offset;

View File

@ -1,4 +1,5 @@
#include "map.h"
#include "attributes.h"
#include "printf.h"
#include "regs.h"
#include "segment_symbols.h"
@ -711,6 +712,6 @@ void Regs_InitDataImpl(void) {
R_GAME_OVER_RUMBLE_DECREASE_RATE = -63;
}
void Regs_InitData(PlayState* play) {
void Regs_InitData(UNUSED PlayState* play) {
Regs_InitDataImpl();
}

View File

@ -1,4 +1,5 @@
#include "libc64/malloc.h"
#include "attributes.h"
#include "libu64/gfxprint.h"
#include "libu64/pad.h"
#include "array_count.h"
@ -8,6 +9,7 @@
#include "gfxalloc.h"
#include "regs.h"
#include "rumble.h"
#include "stack_pad.h"
#include "ultra64.h"
#include "debug.h"
@ -125,7 +127,7 @@ void Regs_Init(void) {
}
// Function is stubbed. Name is assumed by similarities in signature to `DebugCamera_ScreenTextColored` and usage.
void DebugCamera_ScreenText(u8 x, u8 y, const char* text) {
void DebugCamera_ScreenText(UNUSED u8 x, UNUSED u8 y, UNUSED const char* text) {
}
void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text) {
@ -264,7 +266,7 @@ void Regs_DrawEditor(GfxPrint* printer) {
s32 i;
s32 pageStart = (gRegEditor->regPage - 1) * REGS_PER_PAGE;
s32 pageDataStart = ((gRegEditor->regGroup * REG_PAGES) + gRegEditor->regPage - 1) * REGS_PER_PAGE;
s32 pad;
STACK_PAD(s32);
char regGroupName[3];
regGroupName[0] = 'R';
@ -295,7 +297,7 @@ void Debug_DrawText(GraphicsContext* gfxCtx) {
Gfx* gfx;
Gfx* opaStart;
GfxPrint printer;
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(gfxCtx, "../z_debug.c", 628);

View File

@ -3,6 +3,7 @@
#include "libu64/gfxprint.h"
#include "array_count.h"
#include "attributes.h"
#include "controller.h"
#include "gfx.h"
#include "gfxalloc.h"
@ -19,6 +20,7 @@
#include "seqcmd.h"
#include "sequence.h"
#include "sfx.h"
#include "stack_pad.h"
#include "translation.h"
#include "z_lib.h"
#include "audio.h"
@ -164,9 +166,9 @@ s16 sQuakeIndex;
void Cutscene_SetupScripted(PlayState* play, CutsceneContext* csCtx);
#if DEBUG_FEATURES
void Cutscene_DrawDebugInfo(PlayState* play, Gfx** dlist, CutsceneContext* csCtx) {
void Cutscene_DrawDebugInfo(UNUSED PlayState* play, Gfx** dlist, CutsceneContext* csCtx) {
GfxPrint printer;
s32 pad[2];
STACK_PADS(s32, 2);
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, *dlist);
@ -185,17 +187,17 @@ void Cutscene_DrawDebugInfo(PlayState* play, Gfx** dlist, CutsceneContext* csCtx
}
#endif
void Cutscene_InitContext(PlayState* play, CutsceneContext* csCtx) {
void Cutscene_InitContext(UNUSED PlayState* play, CutsceneContext* csCtx) {
csCtx->state = CS_STATE_IDLE;
csCtx->timer = 0.0f;
}
void Cutscene_StartManual(PlayState* play, CutsceneContext* csCtx) {
void Cutscene_StartManual(UNUSED PlayState* play, CutsceneContext* csCtx) {
csCtx->state = CS_STATE_START;
csCtx->playerCue = NULL;
}
void Cutscene_StopManual(PlayState* play, CutsceneContext* csCtx) {
void Cutscene_StopManual(UNUSED PlayState* play, CutsceneContext* csCtx) {
if (csCtx->state != CS_STATE_RUN_UNSTOPPABLE) {
csCtx->state = CS_STATE_STOP;
}
@ -243,10 +245,10 @@ void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx) {
}
}
void CutsceneHandler_DoNothing(PlayState* play, CutsceneContext* csCtx) {
void CutsceneHandler_DoNothing(UNUSED PlayState* play, UNUSED CutsceneContext* csCtx) {
}
u32 Cutscene_StepTimer(PlayState* play, CutsceneContext* csCtx, f32 target) {
u32 Cutscene_StepTimer(UNUSED PlayState* play, CutsceneContext* csCtx, f32 target) {
return Math_StepToF(&csCtx->timer, target, 0.1f);
}
@ -541,19 +543,19 @@ void CutsceneCmd_SetLightSetting(PlayState* play, CutsceneContext* csCtx, CsCmdL
}
}
void CutsceneCmd_StartSequence(PlayState* play, CutsceneContext* csCtx, CsCmdStartSeq* cmd) {
void CutsceneCmd_StartSequence(UNUSED PlayState* play, CutsceneContext* csCtx, CsCmdStartSeq* cmd) {
if (csCtx->curFrame == cmd->startFrame) {
Audio_PlaySequenceInCutscene(cmd->seqIdPlusOne - 1);
}
}
void CutsceneCmd_StopSequence(PlayState* play, CutsceneContext* csCtx, CsCmdStopSeq* cmd) {
void CutsceneCmd_StopSequence(UNUSED PlayState* play, CutsceneContext* csCtx, CsCmdStopSeq* cmd) {
if (csCtx->curFrame == cmd->startFrame) {
Audio_StopSequenceInCutscene(cmd->seqIdPlusOne - 1);
}
}
void CutsceneCmd_FadeOutSequence(PlayState* play, CutsceneContext* csCtx, CsCmdFadeOutSeq* cmd) {
void CutsceneCmd_FadeOutSequence(UNUSED PlayState* play, CutsceneContext* csCtx, CsCmdFadeOutSeq* cmd) {
u8 fadeOutDuration;
if ((csCtx->curFrame == cmd->startFrame) && (csCtx->curFrame < cmd->endFrame)) {
@ -567,13 +569,13 @@ void CutsceneCmd_FadeOutSequence(PlayState* play, CutsceneContext* csCtx, CsCmdF
}
}
void CutsceneCmd_RumbleController(PlayState* play, CutsceneContext* csCtx, CsCmdRumble* cmd) {
void CutsceneCmd_RumbleController(UNUSED PlayState* play, CutsceneContext* csCtx, CsCmdRumble* cmd) {
if (csCtx->curFrame == cmd->startFrame) {
Rumble_Request(0.0f, cmd->sourceStrength, cmd->duration, cmd->decreaseRate);
}
}
void CutsceneCmd_SetTime(PlayState* play, CutsceneContext* csCtx, CsCmdTime* cmd) {
void CutsceneCmd_SetTime(UNUSED PlayState* play, CutsceneContext* csCtx, CsCmdTime* cmd) {
s16 hours;
s16 minutes;
@ -1637,7 +1639,7 @@ s32 CutsceneCmd_UpdateCamAtSpline(PlayState* play, CutsceneContext* csCtx, u8* s
return size;
}
s32 CutsceneCmd_SetCamEye(PlayState* play, CutsceneContext* csCtx, u8* script, u8 unused) {
s32 CutsceneCmd_SetCamEye(PlayState* play, CutsceneContext* csCtx, u8* script, UNUSED u8 arg3) {
CsCmdCam* cmd = (CsCmdCam*)script;
s32 size;
Vec3f at;
@ -1686,7 +1688,7 @@ s32 CutsceneCmd_SetCamEye(PlayState* play, CutsceneContext* csCtx, u8* script, u
return size;
}
s32 CutsceneCmd_SetCamAt(PlayState* play, CutsceneContext* csCtx, u8* script, u8 unused) {
s32 CutsceneCmd_SetCamAt(PlayState* play, CutsceneContext* csCtx, u8* script, UNUSED u8 arg3) {
CsCmdCam* cmd = (CsCmdCam*)script;
s32 size;
Vec3f at;
@ -1734,7 +1736,7 @@ s32 CutsceneCmd_SetCamAt(PlayState* play, CutsceneContext* csCtx, u8* script, u8
void CutsceneCmd_Text(PlayState* play, CutsceneContext* csCtx, CsCmdText* cmd) {
u8 dialogState;
#if PLATFORM_N64
s32 pad;
STACK_PAD(s32);
#endif
s16 endFrame;
@ -2373,7 +2375,7 @@ u16 D_8015FCCC;
char D_8015FCD0[20]; // unreferenced
u8 D_8015FCE4; // only written to, never read
void func_80069048(PlayState* play) {
void func_80069048(UNUSED PlayState* play) {
s16 i;
D_8015FCCC = 0;
@ -2383,7 +2385,7 @@ void func_80069048(PlayState* play) {
D_8015FCE4 = 0;
}
void func_8006907C(PlayState* play) {
void func_8006907C(UNUSED PlayState* play) {
if (D_8015FCCC != 0) {
D_8015FCCC = 0;
}

View File

@ -1,5 +1,6 @@
#include "gfx.h"
#include "gfx_setupdl.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "draw.h"
#include "play_state.h"
@ -385,7 +386,7 @@ void GetItem_Draw(PlayState* play, s16 giDrawId) {
// All remaining functions in this file are draw functions referenced in the table and called by the function above
void GetItem_DrawMaskOrBombchu(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 556);
@ -397,7 +398,7 @@ void GetItem_DrawMaskOrBombchu(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawSoldOut(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 572);
@ -409,7 +410,7 @@ void GetItem_DrawSoldOut(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawBlueFire(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 588);
@ -433,7 +434,7 @@ void GetItem_DrawBlueFire(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawPoes(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 628);
@ -459,7 +460,7 @@ void GetItem_DrawPoes(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawFairy(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 670);
@ -484,7 +485,7 @@ void GetItem_DrawFairy(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawMirrorShield(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 712);
@ -504,7 +505,7 @@ void GetItem_DrawMirrorShield(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawSkullToken(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 742);
@ -537,7 +538,7 @@ void GetItem_DrawEggOrMedallion(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawCompass(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 811);
@ -553,7 +554,7 @@ void GetItem_DrawCompass(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawPotion(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 834);
@ -577,7 +578,7 @@ void GetItem_DrawPotion(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawGoronSword(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 868);
@ -593,7 +594,7 @@ void GetItem_DrawGoronSword(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawDekuNuts(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 890);
@ -609,7 +610,7 @@ void GetItem_DrawDekuNuts(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawRecoveryHeart(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 913);
@ -625,7 +626,7 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawFish(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 936);
@ -641,7 +642,7 @@ void GetItem_DrawFish(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawOpa0(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 959);
@ -653,7 +654,7 @@ void GetItem_DrawOpa0(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawOpa0Xlu1(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 975);
@ -682,7 +683,7 @@ void GetItem_DrawXlu01(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawOpa10Xlu2(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1015);
@ -699,7 +700,7 @@ void GetItem_DrawOpa10Xlu2(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawMagicArrow(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1039);
@ -716,7 +717,7 @@ void GetItem_DrawMagicArrow(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawMagicSpell(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1063);
@ -734,7 +735,7 @@ void GetItem_DrawMagicSpell(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawOpa1023(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1088);
@ -749,7 +750,7 @@ void GetItem_DrawOpa1023(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawOpa10Xlu32(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1108);
@ -767,7 +768,7 @@ void GetItem_DrawOpa10Xlu32(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawSmallRupee(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1133);
@ -787,7 +788,7 @@ void GetItem_DrawSmallRupee(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawScale(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1162);
@ -825,7 +826,7 @@ void GetItem_DrawBulletBag(PlayState* play, s16 giDrawId) {
}
void GetItem_DrawWallet(PlayState* play, s16 giDrawId) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_draw.c", 1214);

View File

@ -1,7 +1,9 @@
#include "libc64/math64.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
#include "stack_pad.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
#include "translation.h"
@ -189,7 +191,7 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) {
}
}
void EffectBlure_Destroy(void* thisx) {
void EffectBlure_Destroy(UNUSED void* thisx) {
}
s32 EffectBlure_Update(void* thisx) {
@ -379,7 +381,7 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
}
}
void EffectBlure_SetupSmooth(EffectBlure* this, GraphicsContext* gfxCtx) {
void EffectBlure_SetupSmooth(UNUSED EffectBlure* this, GraphicsContext* gfxCtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 809);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
@ -608,8 +610,7 @@ void EffectBlure_DrawElemHermiteInterpolation(EffectBlure* this, EffectBlureElem
f32 temp_f22 = temp_f2 - 2.0f * temp_f0 + temp_f28; // t^3 - 2t^2 + t
f32 temp_f24 = 2.0f * temp_f2 - temp_f0 * 3.0f + 1.0f; // 2t^3 - 3t^2 + 1
f32 temp_f26 = temp_f0 * 3.0f - 2.0f * temp_f2; // 3t^2 - 2t^3
s32 pad1;
s32 pad2;
STACK_PADS(s32, 2);
// p = (2t^3 - 3t^2 + 1)p0 + (3t^2 - 2t^3)p1 + (t^3 - 2t^2 + t)m0 + (t^3 - t^2)m1
spE0.x = (temp_f24 * sp1CC.x) + (temp_f26 * sp18C.x) + (temp_f22 * sp1B4.x) + (temp_f20 * sp174.x);
@ -711,7 +712,7 @@ void EffectBlure_DrawSmooth(EffectBlure* this2, GraphicsContext* gfxCtx) {
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1263);
}
void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, UNUSED EffectBlure* this, UNUSED Vtx* vtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1280);
POLY_XLU_DISP = Gfx_SetupDL(POLY_XLU_DISP, SETUPDL_38);
@ -719,7 +720,7 @@ void EffectBlure_SetupSimple(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vt
CLOSE_DISPS(gfxCtx, "../z_eff_blure.c", 1285);
}
void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, Vtx* vtx) {
void EffectBlure_SetupSimpleAlt(GraphicsContext* gfxCtx, EffectBlure* this, UNUSED Vtx* vtx) {
OPEN_DISPS(gfxCtx, "../z_eff_blure.c", 1294);
gDPPipeSync(POLY_XLU_DISP++);

View File

@ -1,5 +1,6 @@
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "printf.h"
@ -102,7 +103,7 @@ void EffectSpark_Init(void* thisx, void* initParamsx) {
}
}
void EffectSpark_Destroy(void* thisx) {
void EffectSpark_Destroy(UNUSED void* thisx) {
}
// original name: "EffectSparkInfo_proc"

View File

@ -1,4 +1,5 @@
#include "gfx.h"
#include "stack_pad.h"
#include "z_lib.h"
#include "play_state.h"
@ -53,7 +54,7 @@ void func_80026400(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
}
void func_80026608(PlayState* play) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 159);
@ -108,7 +109,7 @@ void func_80026860(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
}
void func_80026A6C(PlayState* play) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 217);

View File

@ -1,4 +1,5 @@
#include "gfx.h"
#include "attributes.h"
#include "printf.h"
#include "translation.h"
#include "effect.h"
@ -215,7 +216,7 @@ void Effect_UpdateAll(PlayState* play) {
}
}
void Effect_Delete(PlayState* play, s32 index) {
void Effect_Delete(UNUSED PlayState* play, s32 index) {
if (index == TOTAL_EFFECT_COUNT) {
return;
}
@ -241,7 +242,7 @@ void Effect_Delete(PlayState* play, s32 index) {
}
}
void Effect_DeleteAll(PlayState* play) {
void Effect_DeleteAll(UNUSED PlayState* play) {
s32 i;
PRINTF(T("エフェクト総て解放\n", "All effects release\n"));

View File

@ -1,5 +1,6 @@
#include "libu64/overlay.h"
#include "array_count.h"
#include "attributes.h"
#include "printf.h"
#include "sfx.h"
#include "terminal.h"
@ -43,7 +44,7 @@ void EffectSs_InitInfo(PlayState* play, s32 tableSize) {
}
}
void EffectSs_ClearAll(PlayState* play) {
void EffectSs_ClearAll(UNUSED PlayState* play) {
u32 i;
EffectSs* effectSs;
EffectSsOverlay* overlay;

View File

@ -1,11 +1,13 @@
#include "libc64/qrand.h"
#include "array_count.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "rand.h"
#include "regs.h"
#include "segmented_address.h"
#include "sfx.h"
#include "stack_pad.h"
#include "z_lib.h"
#include "effect.h"
#include "play_state.h"
@ -60,7 +62,7 @@ void EffectSs_DrawGEffect(PlayState* play, EffectSs* this, void* texture) {
MtxF mfScale;
MtxF mfResult;
MtxF mfTransBillboard;
s32 pad1;
STACK_PAD(s32);
Mtx* mtx;
void* objectPtr = play->objectCtx.slots[this->rgObjectSlot].segment;
@ -692,8 +694,8 @@ void EffectSsSibuki_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a
void EffectSsSibuki_SpawnBurst(PlayState* play, Vec3f* pos) {
s16 i;
Vec3f unusedZeroVec1 = { 0.0f, 0.0f, 0.0f };
Vec3f unusedZeroVec2 = { 0.0f, 0.0f, 0.0f };
UNUSED Vec3f zeroVec1 = { 0.0f, 0.0f, 0.0f };
UNUSED Vec3f zeroVec2 = { 0.0f, 0.0f, 0.0f };
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
s16 randDirection = Rand_ZeroOne() * 1.99f;

View File

@ -1,7 +1,9 @@
#include "z_en_a_obj.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "z_lib.h"
#include "play_state.h"
@ -83,7 +85,7 @@ void EnAObj_SetupAction(EnAObj* this, EnAObjActionFunc actionFunc) {
void EnAObj_Init(Actor* thisx, PlayState* play) {
CollisionHeader* colHeader = NULL;
s32 pad;
STACK_PAD(s32);
EnAObj* this = (EnAObj*)thisx;
f32 shadowScale = 6.0f;
@ -200,7 +202,7 @@ void EnAObj_WaitFinishedTalking(EnAObj* this, PlayState* play) {
}
}
void EnAObj_SetupWaitTalk(EnAObj* this, s16 type) {
void EnAObj_SetupWaitTalk(EnAObj* this, UNUSED s16 type) {
EnAObj_SetupAction(this, EnAObj_WaitTalk);
}
@ -220,7 +222,7 @@ void EnAObj_WaitTalk(EnAObj* this, PlayState* play) {
}
}
void EnAObj_SetupBlockRot(EnAObj* this, s16 type) {
void EnAObj_SetupBlockRot(EnAObj* this, UNUSED s16 type) {
this->rotateState = 0;
this->rotateWaitTimer = 10;
this->dyna.actor.world.rot.y = 0;
@ -228,7 +230,7 @@ void EnAObj_SetupBlockRot(EnAObj* this, s16 type) {
EnAObj_SetupAction(this, EnAObj_BlockRot);
}
void EnAObj_BlockRot(EnAObj* this, PlayState* play) {
void EnAObj_BlockRot(EnAObj* this, UNUSED PlayState* play) {
if (this->rotateState == 0) {
if (this->dyna.interactFlags != 0) {
this->rotateState++;
@ -267,11 +269,11 @@ void EnAObj_BlockRot(EnAObj* this, PlayState* play) {
}
}
void EnAObj_SetupBoulderFragment(EnAObj* this, s16 type) {
void EnAObj_SetupBoulderFragment(EnAObj* this, UNUSED s16 type) {
EnAObj_SetupAction(this, EnAObj_BoulderFragment);
}
void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
void EnAObj_BoulderFragment(EnAObj* this, UNUSED PlayState* play) {
Math_SmoothStepToF(&this->dyna.actor.speed, 1.0f, 1.0f, 0.5f, 0.0f);
this->dyna.actor.shape.rot.x += this->dyna.actor.world.rot.x >> 1;
this->dyna.actor.shape.rot.z += this->dyna.actor.world.rot.z >> 1;
@ -294,13 +296,13 @@ void EnAObj_BoulderFragment(EnAObj* this, PlayState* play) {
}
}
void EnAObj_SetupBlock(EnAObj* this, s16 type) {
void EnAObj_SetupBlock(EnAObj* this, UNUSED s16 type) {
this->dyna.actor.cullingVolumeDownward = 1200.0f;
this->dyna.actor.cullingVolumeScale = 720.0f;
EnAObj_SetupAction(this, EnAObj_Block);
}
void EnAObj_Block(EnAObj* this, PlayState* play) {
void EnAObj_Block(EnAObj* this, UNUSED PlayState* play) {
this->dyna.actor.speed += this->dyna.unk_150;
this->dyna.actor.world.rot.y = this->dyna.unk_158;
this->dyna.actor.speed = CLAMP(this->dyna.actor.speed, -2.5f, 2.5f);

View File

@ -10,6 +10,7 @@
#include "rand.h"
#include "segmented_address.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "z_lib.h"
#include "draw.h"
@ -388,12 +389,12 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) {
void EnItem00_Init(Actor* thisx, PlayState* play) {
EnItem00* this = (EnItem00*)thisx;
s32 pad;
STACK_PAD(s32);
f32 yOffset = 980.0f;
f32 shadowScale = 6.0f;
s32 getItemId = GI_NONE;
s16 spawnParam8000 = PARAMS_GET_NOSHIFT(this->actor.params, 15, 1);
s32 pad1;
STACK_PAD(s32);
this->collectibleFlag = PARAMS_GET_S(this->actor.params, 8, 6);
@ -614,7 +615,7 @@ void EnItem00_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
}
void func_8001DFC8(EnItem00* this, PlayState* play) {
void func_8001DFC8(EnItem00* this, UNUSED PlayState* play) {
if ((this->actor.params <= ITEM00_RUPEE_RED) ||
((this->actor.params == ITEM00_RECOVERY_HEART) && (this->despawnTimer < 0)) ||
(this->actor.params == ITEM00_HEART_PIECE)) {
@ -690,7 +691,7 @@ void func_8001E1C8(EnItem00* this, PlayState* play) {
}
void func_8001E304(EnItem00* this, PlayState* play) {
s32 pad;
STACK_PAD(s32);
Vec3f pos;
s32 rotOffset;
@ -787,7 +788,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
s16 i;
u32* temp;
EnItem00* this = (EnItem00*)thisx;
s32 pad;
STACK_PAD(s32);
if (this->despawnTimer > 0) {
this->despawnTimer--;
@ -1067,7 +1068,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
* Draw Function used for Rupee types of En_Item00.
*/
void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
s32 pad;
STACK_PAD(s32);
s32 texIndex;
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1546);
@ -1120,7 +1121,7 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
* Draw Function used for the Heart Container type of En_Item00.
*/
void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1623);
@ -1141,7 +1142,7 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
* Draw Function used for the Piece of Heart type of En_Item00.
*/
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(play->state.gfxCtx, "../z_en_item00.c", 1658);
@ -1192,7 +1193,7 @@ s16 func_8001F404(s16 dropId) {
// External functions used by other actors to drop collectibles, which usually results in spawning an En_Item00 actor.
EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
s32 pad[2];
STACK_PADS(s32, 2);
EnItem00* spawnedActor = NULL;
s16 param4000 = params & 0x4000;
s16 param8000 = params & 0x8000;
@ -1236,7 +1237,7 @@ EnItem00* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, s16 params) {
EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
EnItem00* spawnedActor = NULL;
s32 pad;
STACK_PAD(s32);
s16 param4000 = params & 0x4000;
s16 param8000 = params & 0x8000;
s16 param3F00 = params & 0x3F00;
@ -1268,7 +1269,7 @@ EnItem00* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s16 params) {
}
void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnPos, s16 params) {
s32 pad;
STACK_PAD(s32);
EnItem00* spawnedActor;
s16 dropQuantity;
s16 param8000;

View File

@ -11,6 +11,7 @@
*/
#include "transition_tile.h"
#include "attributes.h"
#include "libc64/malloc.h"
#include "libc64/sleep.h"
#include "libu64/debug.h"
@ -258,9 +259,9 @@ void TransitionTile_Suck(TransitionTile* this) {
}
}
void TransitionTile_Update(TransitionTile* this) {
void TransitionTile_Update(UNUSED TransitionTile* this) {
}
s32 func_800B23F0(TransitionTile* this) {
s32 func_800B23F0(UNUSED TransitionTile* this) {
return 0;
}

View File

@ -1,5 +1,6 @@
#include "transition_circle.h"
#include "attributes.h"
#include "color.h"
#include "gfx.h"
#include "sfx.h"
@ -84,7 +85,7 @@ void* TransitionCircle_Init(void* thisx) {
return this;
}
void TransitionCircle_Destroy(void* thisx) {
void TransitionCircle_Destroy(UNUSED void* thisx) {
}
void TransitionCircle_Update(void* thisx, s32 updateRate) {

View File

@ -1,5 +1,6 @@
#include "transition_fade.h"
#include "attributes.h"
#include "main.h"
#include "printf.h"
#include "regs.h"
@ -57,7 +58,7 @@ void* TransitionFade_Init(void* thisx) {
return this;
}
void TransitionFade_Destroy(void* thisx) {
void TransitionFade_Destroy(UNUSED void* thisx) {
}
void TransitionFade_Update(void* thisx, s32 updateRate) {

View File

@ -1,6 +1,8 @@
#include "transition_triforce.h"
#include "attributes.h"
#include "printf.h"
#include "stack_pad.h"
#include "z_math.h"
#include "transition_instances.h"
@ -34,7 +36,7 @@ void* TransitionTriforce_Init(void* thisx) {
return this;
}
void TransitionTriforce_Destroy(void* thisx) {
void TransitionTriforce_Destroy(UNUSED void* thisx) {
}
void TransitionTriforce_Update(void* thisx, s32 updateRate) {
@ -78,7 +80,7 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) {
Mtx* modelView;
f32 scale;
TransitionTriforce* this = (TransitionTriforce*)thisx;
s32 pad;
STACK_PAD(s32);
f32 rotation = this->transPos * 360.0f;
modelView = this->modelView[this->frame];

View File

@ -1,7 +1,9 @@
#include "transition_wipe.h"
#include "attributes.h"
#include "gfx.h"
#include "save.h"
#include "stack_pad.h"
#include "transition_instances.h"
typedef enum TransitionWipeDirection {
@ -39,7 +41,7 @@ void* TransitionWipe_Init(void* thisx) {
return this;
}
void TransitionWipe_Destroy(void* thisx) {
void TransitionWipe_Destroy(UNUSED void* thisx) {
}
void TransitionWipe_Update(void* thisx, s32 updateRate) {
@ -65,7 +67,7 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) {
Mtx* modelView;
TransitionWipe* this = (TransitionWipe*)thisx;
Color_RGBA8_u32* color;
s32 pad[3];
STACK_PADS(s32, 3);
Gfx* texScroll;
modelView = this->modelView[this->frame];

View File

@ -26,9 +26,11 @@
*/
#include "gfx.h"
#include "attributes.h"
#include "printf.h"
#include "regs.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "translation.h"
#include "zelda_arena.h"
@ -52,9 +54,9 @@ void SkelCurve_Clear(SkelCurve* skelCurve) {
*
* @return bool always true
*/
s32 SkelCurve_Init(PlayState* play, SkelCurve* skelCurve, CurveSkeletonHeader* skeletonHeaderSeg,
CurveAnimationHeader* animation) {
SkelCurveLimb** limbs;
s32 SkelCurve_Init(UNUSED PlayState* play, SkelCurve* skelCurve, CurveSkeletonHeader* skeletonHeaderSeg,
UNUSED CurveAnimationHeader* animation) {
STACK_PAD(s32);
CurveSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelCurve->limbCount = skeletonHeader->limbCount;
@ -70,7 +72,7 @@ s32 SkelCurve_Init(PlayState* play, SkelCurve* skelCurve, CurveSkeletonHeader* s
/**
* Frees the joint table.
*/
void SkelCurve_Destroy(PlayState* play, SkelCurve* skelCurve) {
void SkelCurve_Destroy(UNUSED PlayState* play, SkelCurve* skelCurve) {
if (skelCurve->jointTable != NULL) {
ZELDA_ARENA_FREE(skelCurve->jointTable, "../z_fcurve_data_skelanime.c", 146);
}
@ -100,7 +102,7 @@ typedef enum SkelCurveVecType {
*
* @return bool true when the animation has finished.
*/
s32 SkelCurve_Update(PlayState* play, SkelCurve* skelCurve) {
s32 SkelCurve_Update(UNUSED PlayState* play, SkelCurve* skelCurve) {
s16* jointData;
u8* knotCounts;
CurveAnimationHeader* animation;
@ -196,7 +198,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelCurve* skelCurve, Ov
Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY);
if (lod == 0) {
s32 pad1;
STACK_PAD(s32);
dList = limb->dList[0];
if (dList != NULL) {
@ -204,7 +206,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelCurve* skelCurve, Ov
gSPDisplayList(POLY_OPA_DISP++, dList);
}
} else if (lod == 1) {
s32 pad2;
STACK_PAD(s32);
dList = limb->dList[0];
if (dList != NULL) {
@ -238,7 +240,7 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelCurve* skelCurve, Ov
CLOSE_DISPS(play->state.gfxCtx, "../z_fcurve_data_skelanime.c", 371);
}
void SkelCurve_Draw(Actor* actor, PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
void SkelCurve_Draw(UNUSED Actor* actor, PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
PostCurveLimbDraw postLimbDraw, s32 lod, void* data) {
if (skelCurve->jointTable != NULL) {
SkelCurve_DrawLimb(play, 0, skelCurve, overrideLimbDraw, postLimbDraw, lod, data);

View File

@ -1,4 +1,6 @@
#include "array_count.h"
#include "attributes.h"
#include "stack_pad.h"
#include "terminal.h"
#include "z_lib.h"
#include "printf.h"
@ -33,7 +35,7 @@ s32 Horse_CanSpawn(s32 sceneId) {
/**
* Sets horseData to a neutral spawn in Hyrule Field
*/
void Horse_ResetHorseData(PlayState* play) {
void Horse_ResetHorseData(UNUSED PlayState* play) {
gSaveContext.save.info.horseData.sceneId = SCENE_HYRULE_FIELD;
gSaveContext.save.info.horseData.pos.x = -1840;
gSaveContext.save.info.horseData.pos.y = 72;
@ -45,7 +47,7 @@ void Horse_ResetHorseData(PlayState* play) {
* Forces the player horse to spawn in a safe spot if the current spawn is in Lake Hylia
* This prevents the horse from spawning underwater after obtaining the Water Medallion
*/
void Horse_FixLakeHyliaPosition(PlayState* play) {
void Horse_FixLakeHyliaPosition(UNUSED PlayState* play) {
if (gSaveContext.save.info.horseData.sceneId == SCENE_LAKE_HYLIA) {
gSaveContext.save.info.horseData.sceneId = SCENE_LAKE_HYLIA;
gSaveContext.save.info.horseData.pos.x = -2065;
@ -98,7 +100,7 @@ void Horse_SetupInGameplay(PlayState* play, Player* player) {
} else if ((gSaveContext.save.entranceIndex == ENTR_LON_LON_RANCH_7) &&
GET_EVENTCHKINF(EVENTCHKINF_EPONA_OBTAINED)) {
// Completed Horse Race
Actor* horseActor =
UNUSED_NDEBUG Actor* horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, HORSE_PTYPE_1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 389);
} else if ((play->sceneId == gSaveContext.save.info.horseData.sceneId) &&
@ -129,7 +131,7 @@ void Horse_SetupInGameplay(PlayState* play, Player* player) {
} else if ((play->sceneId == SCENE_LON_LON_RANCH) &&
!(Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED)) {
// Player spawns in Lon-Lon Ranch without owning Epona
Actor* horseActor =
UNUSED_NDEBUG Actor* horseActor =
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, 0.0f, 0.0f, -500.0f, 0, 0, 0, HORSE_PTYPE_1);
ASSERT(horseActor != NULL, "horse_actor != NULL", "../z_horse.c", 443);
} else if (Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) || R_DEBUG_FORCE_EPONA_OBTAINED) {
@ -174,7 +176,7 @@ void Horse_SetupInCutscene(PlayState* play, Player* player) {
{ SCENE_HYRULE_FIELD, 0xFFF6, { -4043, 313, 6933 }, 0x0000, HORSE_PTYPE_7 }, // Unused. Hopping Lon Lon
// Ranch North Gate
};
s32 pad;
STACK_PAD(s32);
s32 i;
if ((gSaveContext.save.entranceIndex == ENTR_HYRULE_FIELD_11 ||

View File

@ -1,5 +1,6 @@
#include "ultra64.h"
#include "printf.h"
#include "stack_pad.h"
#include "translation.h"
#include "play_state.h"
#include "player.h"
@ -288,7 +289,7 @@ void Inventory_ChangeEquipment(s16 equipment, u16 value) {
u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) {
Player* player = GET_PLAYER(play);
s32 pad;
STACK_PAD(s32);
u16 equipValue = gSaveContext.save.info.equips.equipment & gEquipMasks[equipment];
PRINTF(T("装備アイテム抹消 = %d zzz=%d\n", "Erasing equipment item = %d zzz=%d\n"), equipment, equipValue);

View File

@ -4,6 +4,7 @@
#include "attributes.h"
#include "gfx.h"
#include "printf.h"
#include "stack_pad.h"
#include "sys_ucode.h"
#include "terminal.h"
#include "translation.h"
@ -46,7 +47,7 @@ void Jpeg_ScheduleDecoderTask(JpegContext* ctx) {
};
JpegWork* workBuf = ctx->workBuf;
s32 pad[2];
STACK_PADS(s32, 2);
workBuf->taskData.address = OS_K0_TO_PHYSICAL(&workBuf->data);
workBuf->taskData.mode = ctx->mode;
@ -238,7 +239,7 @@ void Jpeg_ParseMarkers(u8* ptr, JpegContext* ctx) {
}
}
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, u32 workSize) {
s32 Jpeg_Decode(void* data, void* zbuffer, void* work, UNUSED_NDEBUG u32 workSize) {
s32 y;
s32 x;
u32 j;

View File

@ -1,3 +1,4 @@
#include "attributes.h"
#include "controller.h"
#include "letterbox.h"
#if PLATFORM_N64
@ -5,6 +6,7 @@
#endif
#include "printf.h"
#include "regs.h"
#include "stack_pad.h"
#include "audio.h"
#include "play_state.h"
#include "save.h"
@ -67,7 +69,7 @@ void KaleidoSetup_Update(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx;
Input* input = &play->state.input[0];
#if PLATFORM_N64
s32 pad;
STACK_PAD(s32);
#endif
if (!IS_PAUSED(pauseCtx) && play->gameOverCtx.state == GAMEOVER_INACTIVE &&
@ -189,7 +191,7 @@ void KaleidoSetup_Init(PlayState* play) {
#endif
}
void KaleidoSetup_Destroy(PlayState* play) {
void KaleidoSetup_Destroy(UNUSED PlayState* play) {
#if PLATFORM_N64
if ((B_80121220 != NULL) && (B_80121220->unk_40 != NULL)) {
B_80121220->unk_40();

View File

@ -1,4 +1,5 @@
#include "kanread.h"
#include "attributes.h"
#include "message_data_static.h"
#include "printf.h"
#include "segment_symbols.h"
@ -12,11 +13,13 @@
* Loads a texture from kanji for the requested `character` into the character texture buffer
* at `codePointIndex`. The value of `character` is the SHIFT-JIS encoding of the character.
*/
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
#if OOT_NTSC
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex) {
DMA_REQUEST_SYNC(&font->charTexBuf[codePointIndex],
(uintptr_t)_kanjiSegmentRomStart + Kanji_OffsetFromShiftJIS(character), FONT_CHAR_TEX_SIZE,
"../z_kanfont.c", UNK_LINE);
#else
void Font_LoadCharWide(UNUSED Font* font, UNUSED u16 character, UNUSED u16 codePointIndex) {
#endif
}
@ -63,7 +66,9 @@ void Font_LoadOrderedFont(Font* font) {
s32 fontBufIndex;
u32 offset;
const char* messageDataStart;
#if PLATFORM_IQUE
u16* msgBufWide;
#endif
#if OOT_NTSC && !PLATFORM_IQUE
messageDataStart = (const char*)_jpn_message_data_staticSegmentStart;

View File

@ -4,6 +4,7 @@
#include "libc64/qrand.h"
#include "libu64/gfxprint.h"
#include "array_count.h"
#include "attributes.h"
#include "buffers.h"
#include "gfx.h"
#include "gfx_setupdl.h"
@ -17,6 +18,7 @@
#include "seqcmd.h"
#include "sequence.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_math.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
@ -273,14 +275,14 @@ u16 Environment_GetPixelDepth(s32 x, s32 y) {
return pixelDepth;
}
void Environment_GraphCallback(GraphicsContext* gfxCtx, void* param) {
void Environment_GraphCallback(UNUSED GraphicsContext* gfxCtx, void* param) {
PlayState* play = (PlayState*)param;
sSunScreenDepth = Environment_GetPixelDepth(sSunDepthTestX, sSunDepthTestY);
Lights_GlowCheck(play);
}
void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused) {
void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, UNUSED s32 arg2) {
u8 i;
PlayState* play = play2;
@ -630,7 +632,7 @@ f32 Environment_LerpWeightAccelDecel(u16 endFrame, u16 startFrame, u16 curFrame,
return ret;
}
void Environment_UpdateStorm(EnvironmentContext* envCtx, u8 unused) {
void Environment_UpdateStorm(EnvironmentContext* envCtx, UNUSED u8 arg1) {
if (envCtx->stormRequest != STORM_REQUEST_NONE) {
switch (envCtx->stormState) {
case STORM_STATE_OFF:
@ -860,9 +862,9 @@ void Environment_DisableUnderwaterLights(PlayState* play) {
}
#if DEBUG_FEATURES
void Environment_PrintDebugInfo(PlayState* play, Gfx** gfx) {
void Environment_PrintDebugInfo(UNUSED PlayState* play, Gfx** gfx) {
GfxPrint printer;
s32 pad[2];
STACK_PADS(s32, 2);
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, *gfx);
@ -920,7 +922,7 @@ void Environment_PlayTimeBasedSequence(PlayState* play);
void Environment_UpdateRain(PlayState* play);
void Environment_Update(PlayState* play, EnvironmentContext* envCtx, LightContext* lightCtx, PauseContext* pauseCtx,
MessageContext* msgCtx, GameOverContext* gameOverCtx, GraphicsContext* gfxCtx) {
MessageContext* msgCtx, GameOverContext* gameOverCtx, UNUSED GraphicsContext* gfxCtx) {
f32 timeChangeBlend;
f32 configChangeBlend = 0.0f;
u16 i;
@ -1507,8 +1509,8 @@ void Environment_DrawSunAndMoon(PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_kankyo.c", 2429);
}
void Environment_DrawSunLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx,
Vec3f pos, s32 unused) {
void Environment_DrawSunLensFlare(PlayState* play, UNUSED EnvironmentContext* envCtx, UNUSED View* view,
UNUSED GraphicsContext* gfxCtx, Vec3f pos, UNUSED s32 arg5) {
if ((play->envCtx.precipitation[PRECIP_RAIN_CUR] == 0) && (play->envCtx.skyboxConfig == 0)) {
Environment_DrawLensFlare(play, &play->envCtx, &play->view, play->state.gfxCtx, pos, 2000, 370,
Math_CosS(((void)0, gSaveContext.save.dayTime) - CLOCK_TIME(12, 0)) * 120.0f, 400,
@ -1525,7 +1527,7 @@ typedef enum LensFlareType {
} LensFlareType;
void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View* view, GraphicsContext* gfxCtx,
Vec3f pos, s32 unused, s16 scale, f32 colorIntensity, s16 glareStrength, u8 isSun) {
Vec3f pos, UNUSED s32 arg5, s16 scale, f32 colorIntensity, s16 glareStrength, u8 isSun) {
s16 i;
f32 tempX;
f32 tempY;
@ -1545,7 +1547,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
f32 halfPosY;
f32 halfPosZ;
f32 cosAngle;
s32 pad;
STACK_PAD(s32);
f32 lensFlareAlphaScaleTarget;
u32 isOffScreen = false;
f32 alpha;
@ -1738,7 +1740,7 @@ f32 Environment_RandCentered(void) {
void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx) {
s16 i;
s32 pad;
STACK_PAD(s32);
Vec3f vec;
f32 temp1;
f32 temp2;
@ -1751,7 +1753,7 @@ void Environment_DrawRain(PlayState* play, View* view, GraphicsContext* gfxCtx)
f32 z50;
f32 x280;
f32 z280;
Vec3f unused = { 0.0f, 0.0f, 0.0f };
UNUSED Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
Vec3f windDirection = { 0.0f, 0.0f, 0.0f };
Player* player = GET_PLAYER(play);
@ -1996,7 +1998,7 @@ void Environment_UpdateLightningStrike(PlayState* play) {
* Request the number of lightning bolts specified by `num`
* Note: only 3 lightning bolts can be active at the same time.
*/
void Environment_AddLightningBolts(PlayState* play, u8 num) {
void Environment_AddLightningBolts(UNUSED PlayState* play, u8 num) {
s16 boltsAdded = 0;
s16 i;
@ -2015,7 +2017,7 @@ void Environment_AddLightningBolts(PlayState* play, u8 num) {
/**
* Draw any active lightning bolt entries contained in `sLightningBolts`
*/
void Environment_DrawLightning(PlayState* play, s32 unused) {
void Environment_DrawLightning(PlayState* play, UNUSED s32 arg1) {
static void* lightningTextures[] = {
gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex,
gEffLightning4Tex, gEffLightning5Tex, gEffLightning6Tex,
@ -2026,9 +2028,9 @@ void Environment_DrawLightning(PlayState* play, s32 unused) {
f32 dz;
f32 x;
f32 z;
s32 pad[2];
Vec3f unused1 = { 0.0f, 0.0f, 0.0f };
Vec3f unused2 = { 0.0f, 0.0f, 0.0f };
STACK_PADS(s32, 2);
UNUSED Vec3f zeroVec1 = { 0.0f, 0.0f, 0.0f };
UNUSED Vec3f zeroVec2 = { 0.0f, 0.0f, 0.0f };
OPEN_DISPS(play->state.gfxCtx, "../z_kankyo.c", 3253);
@ -2258,7 +2260,7 @@ void Environment_DrawCustomLensFlare(PlayState* play) {
}
void Environment_InitGameOverLights(PlayState* play) {
s32 pad;
STACK_PAD(s32);
Player* player = GET_PLAYER(play);
sGameOverLightsIntensity = 0;
@ -2418,7 +2420,7 @@ void Environment_DrawSandstorm(PlayState* play, u8 sandstormState) {
s32 envA = play->envCtx.sandstormEnvA;
Color_RGBA8 primColor;
Color_RGBA8 envColor;
s32 pad;
STACK_PAD(s32);
f32 sp98;
switch (sandstormState) {

View File

@ -1,6 +1,7 @@
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "z_lib.h"
#include "lifemeter.h"
@ -305,7 +306,7 @@ static void* sHeartDDTextures[] = {
};
void Health_DrawMeter(PlayState* play) {
s32 pad[5];
STACK_PADS(s32, 5);
void* heartBgImg;
u32 curColorSet;
f32 offsetX;
@ -321,7 +322,7 @@ void Health_DrawMeter(PlayState* play) {
s32 curHeartFraction = gSaveContext.save.info.playerData.health % 0x10;
s16 totalHeartCount = gSaveContext.save.info.playerData.healthCapacity / 0x10;
s16 fullHeartCount = gSaveContext.save.info.playerData.health / 0x10;
s32 pad2;
STACK_PAD(s32);
f32 beatingHeartPulsingSize = interfaceCtx->beatingHeartOscillator * 0.1f;
s32 curCombineModeSet = 0;
u8* curBgImgLoaded = NULL;

View File

@ -1,7 +1,9 @@
#include "avoid_ub.h"
#include "attributes.h"
#include "buffers.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "light.h"
#include "play_state.h"
@ -132,7 +134,7 @@ void Lights_BindPoint(Lights* lights, LightParams* params, Vec3f* vec) {
}
}
void Lights_BindDirectional(Lights* lights, LightParams* params, Vec3f* vec) {
void Lights_BindDirectional(Lights* lights, LightParams* params, UNUSED Vec3f* vec) {
Light* light = Lights_FindSlot(lights);
if (light != NULL) {
@ -225,7 +227,7 @@ Lights* LightContext_NewLights(LightContext* lightCtx, GraphicsContext* gfxCtx)
return Lights_New(gfxCtx, lightCtx->ambientColor[0], lightCtx->ambientColor[1], lightCtx->ambientColor[2]);
}
void LightContext_InitList(PlayState* play, LightContext* lightCtx) {
void LightContext_InitList(UNUSED PlayState* play, LightContext* lightCtx) {
lightCtx->listHead = NULL;
}
@ -242,7 +244,7 @@ void LightContext_DestroyList(PlayState* play, LightContext* lightCtx) {
* Note: Due to the limited number of slots in a Lights group, inserting too many lights in the
* list may result in older entries not being bound to a Light when calling Lights_BindAll
*/
LightNode* LightContext_InsertLight(PlayState* play, LightContext* lightCtx, LightInfo* info) {
LightNode* LightContext_InsertLight(UNUSED PlayState* play, LightContext* lightCtx, LightInfo* info) {
LightNode* node;
node = Lights_FindBufSlot();
@ -262,7 +264,7 @@ LightNode* LightContext_InsertLight(PlayState* play, LightContext* lightCtx, Lig
return node;
}
void LightContext_RemoveLight(PlayState* play, LightContext* lightCtx, LightNode* node) {
void LightContext_RemoveLight(UNUSED PlayState* play, LightContext* lightCtx, LightNode* node) {
if (node != NULL) {
if (node->prev != NULL) {
node->prev->next = node->next;
@ -364,7 +366,7 @@ void Lights_GlowCheck(PlayState* play) {
}
void Lights_DrawGlow(PlayState* play) {
s32 pad;
STACK_PAD(s32);
LightNode* node = play->lightCtx.listHead;
OPEN_DISPS(play->state.gfxCtx, "../z_lights.c", 887);
@ -376,7 +378,7 @@ void Lights_DrawGlow(PlayState* play) {
while (node != NULL) {
if ((node->info->type == LIGHT_POINT_GLOW)) {
s32 pad[6];
STACK_PADS(s32, 6);
LightPoint* params = &node->info->params.point;
if (params->drawGlow) {

View File

@ -9,6 +9,7 @@
#include "regs.h"
#include "segment_symbols.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "translation.h"
@ -361,7 +362,7 @@ void Map_Init(PlayState* play) {
}
void Minimap_DrawCompassIcons(PlayState* play) {
s32 pad;
STACK_PAD(s32);
Player* player = GET_PLAYER(play);
s16 tempX, tempZ;
@ -408,7 +409,7 @@ void Minimap_DrawCompassIcons(PlayState* play) {
}
void Minimap_Draw(PlayState* play) {
s32 pad[2];
STACK_PADS(s32, 2);
InterfaceContext* interfaceCtx = &play->interfaceCtx;
s32 mapIndex = gSaveContext.mapIndex;

View File

@ -1,4 +1,5 @@
#include "libu64/debug.h"
#include "attributes.h"
#include "libu64/overlay.h"
#include "map.h"
#include "printf.h"
@ -74,7 +75,7 @@ void MapMark_Init(PlayState* play) {
#endif
}
void MapMark_ClearPointers(PlayState* play) {
void MapMark_ClearPointers(UNUSED PlayState* play) {
#if PLATFORM_N64
if ((B_80121220 != NULL) && (B_80121220->unk_30 != NULL)) {
B_80121220->unk_30(&sLoadedMarkDataTable);

View File

@ -14,6 +14,7 @@
#include "printf.h"
#include "segment_symbols.h"
#include "sequence.h"
#include "stack_pad.h"
#include "regs.h"
#include "terminal.h"
#include "translation.h"
@ -416,7 +417,7 @@ void Message_DrawTextChar(PlayState* play, void* textureImage, Gfx** p) {
Gfx* gfx = *p;
s16 x = msgCtx->textPosX;
s16 y = msgCtx->textPosY;
s32 pad;
STACK_PAD(s32);
gDPPipeSync(gfx++);
@ -1007,7 +1008,7 @@ f32 sFontWidths[144] = {
};
u16 Message_DrawItemIcon(PlayState* play, u16 itemId, Gfx** p, u16 i) {
s32 pad;
STACK_PAD(s32);
Gfx* gfx = *p;
MessageContext* msgCtx = &play->msgCtx;
@ -1433,7 +1434,7 @@ void Message_DrawTextWide(PlayState* play, Gfx** gfxP) {
*/
void Message_DrawText(PlayState* play, Gfx** gfxP) {
MessageContext* msgCtx = &play->msgCtx;
s16 pad;
STACK_PAD(s16);
u8 character;
u16 j;
u16 i;
@ -1768,19 +1769,27 @@ void Message_Decode(PlayState* play) {
s32 charTexIdx = 0;
s16 i;
#if !(PLATFORM_GC && OOT_PAL)
#if OOT_NTSC
s16 j;
#else
STACK_PAD(s16);
#endif
#endif
s16 decodedBufPos = 0;
s16 numLines = 0;
s16 digits[4];
s32 pad;
STACK_PAD(s32);
s16 playerNameLen;
s16 loadChar;
u16 value;
u8 curChar;
#if !(PLATFORM_GC && OOT_PAL)
#if OOT_NTSC
u16 curCharWide;
u8* fontBuf;
#else
STACK_PADS(s32, 2);
#endif
#endif
msgCtx->textDelayTimer = 0;
@ -2783,7 +2792,7 @@ void Message_ContinueTextbox(PlayState* play, u16 textId) {
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
#if PLATFORM_N64
s32 pad2[3];
STACK_PADS(s32, 3);
#endif
PRINTF_COLOR_GREEN();
@ -4046,7 +4055,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
static s16 sVarLastValue = 0;
static s16 sFillTimer = 0;
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(gfxCtx, "../z_message_PAL.c", 3485);
@ -4073,9 +4082,9 @@ void Message_DrawDebugVariableChanged(s16* var, GraphicsContext* gfxCtx) {
}
void Message_DrawDebugText(PlayState* play, Gfx** p) {
s32 pad;
STACK_PAD(s32);
GfxPrint printer;
s32 pad1;
STACK_PAD(s32);
GfxPrint_Init(&printer);
GfxPrint_Open(&printer, *p);
@ -4095,7 +4104,7 @@ void Message_Draw(PlayState* play) {
Gfx* plusOne;
Gfx* polyOpaP;
#if OOT_VERSION < GC_US
s32 pad;
STACK_PAD(s32);
#endif
#if DEBUG_FEATURES
s16 watchVar;
@ -4141,31 +4150,30 @@ void Message_Update(PlayState* play) {
static s16 sTextboxEndIconYOffset[] = {
59, 59, 59, 59, 34, 59,
};
static s16 D_80153D3C[] = {
// additional unreferenced data
UNUSED static s16 D_80153D3C[] = {
0x0400, 0x0400, 0x0200, 0x0000, 0x1038, 0x0008, 0x200A, 0x088B, 0x0007, 0x0009, 0x000A, 0x107E, 0x2008, 0x2007,
0x0015, 0x0016, 0x0017, 0x0003, 0x0000, 0x270B, 0x00C8, 0x012C, 0x012D, 0xFFDA, 0x0014, 0x0016, 0x0014, 0x0016,
};
#if OOT_VERSION < GC_US
static s32 sUnknown = 0;
UNUSED static s32 sUnknown = 0;
#elif PLATFORM_IQUE
static u16 sUnknown = 0;
UNUSED static u16 sUnknown = 0;
#endif
static char D_80153D74 = 0;
MessageContext* msgCtx = &play->msgCtx;
InterfaceContext* interfaceCtx = &play->interfaceCtx;
Player* player = GET_PLAYER(play);
Input* input = &play->state.input[0];
UNUSED_NDEBUG Input* input = &play->state.input[0];
s16 var;
s16 focusScreenPosX;
s16 averageY;
s16 playerFocusScreenPosY;
s16 actorFocusScreenPosY;
#if OOT_VERSION < GC_US
s32 pad1;
STACK_PAD(s32);
#endif
#if OOT_NTSC && OOT_VERSION < GC_US
s32 pad2;
STACK_PAD(s32);
#endif
#if DEBUG_FEATURES

View File

@ -4,6 +4,7 @@
#include "gfx.h"
#include "printf.h"
#include "stack_pad.h"
// how big to draw the characters on screen
#define DISP_CHAR_WIDTH 8
@ -61,7 +62,7 @@ void Moji_SetPosition(s32 gridX, s32 gridY) {
}
void Moji_DrawChar(GraphicsContext* gfxCtx, char c) {
s32 pad[2];
STACK_PADS(s32, 2);
OPEN_DISPS(gfxCtx, "../z_moji.c", 86);

View File

@ -1,5 +1,6 @@
#include "one_point_cutscene.h"
#include "attributes.h"
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "array_count.h"
@ -62,7 +63,7 @@ static CutsceneCameraPoint sCrawlspaceForwardsEyePoints[9] = {
{ CS_CAM_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
{ CS_CAM_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
};
static s16 sCrawlspaceUnused = 9;
UNUSED static s16 sCrawlspaceUnused = 9;
static s16 sCrawlspaceTimer = 90;
static s16 sCrawlspaceActionParam = 1;
static CutsceneCameraPoint sCrawlspaceBackwardsEyePoints[10] = {
@ -133,7 +134,7 @@ static CutsceneCameraPoint D_80120820[12] = {
{ CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CAM_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
{ CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CAM_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
};
static s16 D_801208E0 = 12;
UNUSED static s16 D_801208E0 = 12;
static s16 D_801208E4 = 90;
static s16 D_801208E8 = 8;
@ -5390,5 +5391,5 @@ s32 OnePointCutscene_CheckForCategory(PlayState* play, s32 actorCategory) {
}
// unused, also empty.
void OnePointCutscene_Noop(PlayState* play, s32 arg1) {
void OnePointCutscene_Noop(UNUSED PlayState* play, UNUSED s32 arg1) {
}

View File

@ -13,6 +13,7 @@
#include "segmented_address.h"
#include "sequence.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "translation.h"
@ -1125,9 +1126,9 @@ void Interface_SetSceneRestrictions(PlayState* play) {
InterfaceContext* interfaceCtx = &play->interfaceCtx;
s16 i = 0;
u8 sceneId;
s32 pad1;
s32 pad2;
s32 pad3;
#if OOT_VERSION != IQUE_CN
STACK_PADS(s32, 3);
#endif
interfaceCtx->restrictions.all = 0;
interfaceCtx->restrictions.dinsNayrus = 0;
@ -2236,7 +2237,7 @@ void Interface_LoadActionLabelB(PlayState* play, u16 action) {
/**
* @return false if player is out of health
*/
s32 Health_ChangeBy(PlayState* play, s16 amount) {
s32 Health_ChangeBy(UNUSED PlayState* play, s16 amount) {
u16 heartCount;
UNUSED_NDEBUG u16 healthLevel;
@ -2349,7 +2350,7 @@ void Inventory_ChangeAmmo(s16 item, s16 ammoChange) {
PRINTF(T("合計 = (%d)\n", "Total = (%d)\n"), AMMO(item));
}
void Magic_Fill(PlayState* play) {
void Magic_Fill(UNUSED PlayState* play) {
if (gSaveContext.save.info.playerData.isMagicAcquired) {
gSaveContext.prevMagicState = gSaveContext.magicState;
gSaveContext.magicFillTarget =
@ -2358,7 +2359,7 @@ void Magic_Fill(PlayState* play) {
}
}
void Magic_Reset(PlayState* play) {
void Magic_Reset(UNUSED PlayState* play) {
if ((gSaveContext.magicState != MAGIC_STATE_STEP_CAPACITY) && (gSaveContext.magicState != MAGIC_STATE_FILL)) {
if (gSaveContext.magicState == MAGIC_STATE_ADD) {
gSaveContext.prevMagicState = gSaveContext.magicState;
@ -2772,7 +2773,7 @@ void Interface_SetSubTimer(s16 seconds) {
/**
* Set the subTimer to 1 second left
*/
void Interface_SetSubTimerToFinalSecond(PlayState* play) {
void Interface_SetSubTimerToFinalSecond(UNUSED PlayState* play) {
if (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) {
if (GET_EVENTINF(EVENTINF_MARATHON_ACTIVE)) {
// The running-man race counts up and finished at MARATHON_TIME_LIMIT
@ -2813,6 +2814,9 @@ void Interface_DrawActionLabel(GraphicsContext* gfxCtx, void* texture) {
void Interface_DrawItemButtons(PlayState* play) {
static void* cUpLabelTextures[] = LANGUAGE_ARRAY(gNaviCUpJPNTex, gNaviCUpENGTex, gNaviCUpENGTex, gNaviCUpENGTex);
#if OOT_VERSION >= PAL_1_0
#if OOT_NTSC
UNUSED
#endif
static s16 startButtonLeftPos[] = { 132, 130, 130 };
#endif
InterfaceContext* interfaceCtx = &play->interfaceCtx;
@ -3192,14 +3196,14 @@ void Interface_Draw(PlayState* play) {
static s16 timerDigitLeftPos[] = { 16, 25, 34, 42, 51 };
static s16 sDigitWidths[] = { 9, 9, 8, 9, 9 };
// unused, most likely colors
static s16 D_80125B1C[][3] = {
UNUSED static s16 D_80125B1C[][3] = {
{ 0, 150, 0 }, { 100, 255, 0 }, { 255, 255, 255 }, { 0, 0, 0 }, { 255, 255, 255 },
};
static s16 rupeeDigitsFirst[] = { 1, 0, 0 };
static s16 rupeeDigitsCount[] = { 2, 3, 3 };
static s16 spoilingItemEntrances[] = { ENTR_LOST_WOODS_2, ENTR_ZORAS_DOMAIN_3, ENTR_ZORAS_DOMAIN_3 };
static f32 D_80125B54[] = { -40.0f, -35.0f }; // unused
static s16 D_80125B5C[] = { 91, 91 }; // unused
UNUSED static f32 D_80125B54[] = { -40.0f, -35.0f };
UNUSED static s16 D_80125B5C[] = { 91, 91 };
static s16 sTimerNextSecondTimer;
static s16 sTimerStateTimer;
static s16 sSubTimerNextSecondTimer;

View File

@ -1,4 +1,5 @@
#include "libc64/malloc.h"
#include "attributes.h"
#include "libc64/qrand.h"
#include "libu64/debug.h"
#include "array_count.h"
@ -23,6 +24,7 @@
#include "segmented_address.h"
#include "sequence.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
#include "terminal.h"
@ -297,7 +299,7 @@ void Play_Init(GameState* thisx) {
s32 playerStartBgCamIndex;
s32 i;
u8 baseSceneLayer;
s32 pad[2];
STACK_PADS(s32, 2);
if (gSaveContext.save.entranceIndex == ENTR_LOAD_OPENING) {
gSaveContext.save.entranceIndex = 0;
@ -551,7 +553,7 @@ void Play_Init(GameState* thisx) {
void Play_Update(PlayState* this) {
Input* input = this->state.input;
s32 isPaused;
s32 pad1;
STACK_PAD(s32);
#if DEBUG_FEATURES
if ((SREG(1) < 0) || (DREG(0) != 0)) {
@ -563,7 +565,7 @@ void Play_Update(PlayState* this) {
if ((R_HREG_MODE == HREG_MODE_PRINT_OBJECT_TABLE) && (R_PRINT_OBJECT_TABLE_TRIGGER < 0)) {
u32 i;
s32 pad2;
STACK_PAD(s32);
R_PRINT_OBJECT_TABLE_TRIGGER = 0;
PRINTF("object_exchange_rom_address %u\n", gObjectTableSize);
@ -1124,7 +1126,7 @@ skip:
void Play_DrawOverlayElements(PlayState* this) {
#if PLATFORM_N64
s32 pad;
STACK_PAD(s32);
#endif
if (IS_PAUSED(&this->pauseCtx)) {
@ -1472,7 +1474,7 @@ f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos) {
f32 nx = COLPOLY_GET_NORMAL(poly.normal.x);
f32 ny = COLPOLY_GET_NORMAL(poly.normal.y);
f32 nz = COLPOLY_GET_NORMAL(poly.normal.z);
s32 pad[5];
STACK_PADS(s32, 5);
temp1 = sqrtf(1.0f - SQ(nx));

View File

@ -1,8 +1,10 @@
#include "libc64/math64.h"
#include "attributes.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "regs.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "versions.h"
#include "z_lib.h"
@ -800,7 +802,7 @@ s32 func_8008EF44(PlayState* play, s32 ammo) {
int Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 yRange) {
Player* this = GET_PLAYER(play);
Vec3f diff;
s32 pad;
STACK_PAD(s32);
if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_860 != 0)) {
Math_Vec3f_Diff(MELEE_WEAPON_INFO_TIP(&this->meleeWeaponInfo[0]), pos, &diff);
@ -848,7 +850,7 @@ int Player_HasMirrorShieldSetToDraw(PlayState* play) {
return (this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && (this->currentShield == PLAYER_SHIELD_MIRROR);
}
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction) {
s32 Player_ActionToMagicSpell(UNUSED Player* this, s32 itemAction) {
s32 magicSpell = itemAction - PLAYER_IA_MAGIC_SPELL_15;
if ((magicSpell >= 0) && (magicSpell < 6)) {
@ -893,7 +895,7 @@ int Player_HoldsBrokenKnife(Player* this) {
(gSaveContext.save.info.playerData.swordHealth <= 0.0f);
}
s32 Player_ActionToBottle(Player* this, s32 itemAction) {
s32 Player_ActionToBottle(UNUSED Player* this, s32 itemAction) {
s32 bottle = itemAction - PLAYER_IA_BOTTLE;
if ((bottle >= 0) && (bottle < 13)) {
@ -907,7 +909,7 @@ s32 Player_GetBottleHeld(Player* this) {
return Player_ActionToBottle(this, this->heldItemAction);
}
s32 Player_ActionToExplosive(Player* this, s32 itemAction) {
s32 Player_ActionToExplosive(UNUSED Player* this, s32 itemAction) {
s32 explosive = itemAction - PLAYER_IA_BOMB;
if ((explosive >= 0) && (explosive < 2)) {
@ -921,7 +923,7 @@ s32 Player_GetExplosiveHeld(Player* this) {
return Player_ActionToExplosive(this, this->heldItemAction);
}
s32 func_8008F2BC(Player* this, s32 itemAction) {
s32 func_8008F2BC(UNUSED Player* this, s32 itemAction) {
s32 sword = 0;
if (itemAction != PLAYER_IA_SWORD_CS) {
@ -1204,7 +1206,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & PLAYER_STATE1_DEAD) &&
(Player_ActionToMagicSpell(this, this->itemAction) < 0)) {
s32 pad;
STACK_PAD(s32);
sp7C = D_80126058[(void)0, gSaveContext.save.linkAge];
sp78 = D_80126060[(void)0, gSaveContext.save.linkAge];
@ -1333,12 +1335,12 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
Matrix_RotateZ(BINANG_TO_RAD(this->upperLimbRot.z), MTXMODE_APPLY);
}
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
s32 pad;
STACK_PAD(s32);
func_8008F87C(play, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN,
PLAYER_LIMB_L_FOOT);
} else if (limbIndex == PLAYER_LIMB_R_THIGH) {
s32 pad;
STACK_PAD(s32);
func_8008F87C(play, this, &this->skelAnime, pos, rot, PLAYER_LIMB_R_THIGH, PLAYER_LIMB_R_SHIN,
PLAYER_LIMB_R_FOOT);
@ -1651,7 +1653,7 @@ Color_RGB8 sBottleColors[] = {
{ 80, 80, 255 }, // Fairy
};
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, UNUSED Vec3s* rot, void* thisx) {
Player* this = (Player*)thisx;
if (*dList != NULL) {
@ -1814,7 +1816,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
if (heldActor != NULL) {
static Vec3f D_80126190 = { 100.0f, 1640.0f, 0.0f };
MtxF sp44;
s32 pad;
STACK_PAD(s32);
Matrix_MultVec3f(&D_80126190, &heldActor->world.pos);
Matrix_RotateZYX(0, -0x4000, -0x4000, MTXMODE_APPLY);
@ -1916,7 +1918,8 @@ u8 sPauseModelGroupBySword[] = {
PLAYER_MODELGROUP_BGS, // PLAYER_SWORD_BIGGORON
};
s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) {
s32 Player_OverrideLimbDrawPause(UNUSED PlayState* play, s32 limbIndex, Gfx** dList, UNUSED Vec3f* pos,
UNUSED Vec3s* rot, void* arg) {
u8* playerSwordAndShield = arg;
//! @bug `playerSwordAndShield[0]` can be 0 (`PLAYER_SWORD_NONE`), which indexes `sPauseModelGroupBySword[-1]`.
//! The result happens to be 0 (`PLAYER_MODELGROUP_0`) in vanilla, but weird values are likely to cause a crash.
@ -1999,7 +2002,7 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
// Also matches if some of the previous graphics commands are moved inside this block too. Possible macro?
if (1) {
s32 pad[2];
STACK_PADS(s32, 2);
gSPLoadGeometryMode(POLY_OPA_DISP++, G_ZBUFFER | G_SHADE | G_CULL_BACK | G_LIGHTING | G_SHADING_SMOOTH);
}

View File

@ -1,4 +1,5 @@
#include "gfx.h"
#include "attributes.h"
#include "gfx_setupdl.h"
#include "prenmi_state.h"
#include "printf.h"
@ -61,7 +62,7 @@ void PreNMI_Main(GameState* thisx) {
this->state.inPreNMIState = true;
}
void PreNMI_Destroy(GameState* thisx) {
void PreNMI_Destroy(UNUSED GameState* thisx) {
}
void PreNMI_Init(GameState* thisx) {

View File

@ -2,6 +2,7 @@
#include "array_count.h"
#include "printf.h"
#include "quake.h"
#include "stack_pad.h"
#include "terminal.h"
#include "z_lib.h"
#include "olib.h"
@ -83,7 +84,7 @@ void Quake_UpdateShakeInfo(QuakeRequest* req, ShakeInfo* shake, f32 y, f32 x) {
}
s16 Quake_CallbackType1(QuakeRequest* req, ShakeInfo* shake) {
s32 pad;
STACK_PAD(s32);
if (req->timer > 0) {
f32 xyOffset = Math_SinS(req->speed * req->timer);
@ -105,7 +106,7 @@ s16 Quake_CallbackType5(QuakeRequest* req, ShakeInfo* shake) {
}
s16 Quake_CallbackType6(QuakeRequest* req, ShakeInfo* shake) {
s32 pad;
STACK_PAD(s32);
f32 xyOffset;
req->timer--;

View File

@ -1,4 +1,6 @@
#include "libu64/debug.h"
#include "attributes.h"
#include "stack_pad.h"
#include "ultra64/gs2dex.h"
#include "array_count.h"
#include "buffers.h"
@ -53,7 +55,7 @@ void (*sRoomDrawHandlers[ROOM_SHAPE_TYPE_MAX])(PlayState* play, Room* room, u32
Room_DrawCullable, // ROOM_SHAPE_TYPE_CULLABLE
};
void func_80095AA0(PlayState* play, Room* room, Input* input, s32 arg3) {
void func_80095AA0(UNUSED PlayState* play, UNUSED Room* room, UNUSED Input* input, UNUSED s32 arg3) {
}
void Room_DrawNormal(PlayState* play, Room* room, u32 flags) {
@ -123,14 +125,14 @@ void Room_DrawCullable(PlayState* play, Room* room, u32 flags) {
RoomShapeCullableEntryLinked* head = NULL;
RoomShapeCullableEntryLinked* tail = NULL;
RoomShapeCullableEntryLinked* iter;
s32 pad;
STACK_PAD(s32);
RoomShapeCullableEntryLinked* insert;
s32 j;
s32 i;
Vec3f pos;
Vec3f projectedPos;
f32 projectedW;
s32 pad2;
STACK_PAD(s32);
RoomShapeCullableEntry* roomShapeCullableEntries;
RoomShapeCullableEntry* roomShapeCullableEntryIter;
f32 entryBoundsNearZ;
@ -572,7 +574,7 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) {
}
}
void Room_Init(PlayState* play, Room* room) {
void Room_Init(UNUSED PlayState* play, Room* room) {
room->num = -1;
room->segment = NULL;
}
@ -592,7 +594,7 @@ u32 Room_SetupFirstRoom(PlayState* play, RoomContext* roomCtx) {
u32 frontRoomSize;
u32 backRoomSize;
u32 cumulRoomSize;
s32 pad;
STACK_PAD(s32);
// Set roomBufferSize to the largest room
{

View File

@ -12,10 +12,11 @@
* @note Original filename is likely z_vibrate.c or similar as it is ordered after z_ss_sram.c and before z_view.c
*/
#include "rumble.h"
#include "attributes.h"
#include "padmgr.h"
#include "z_math.h"
static s32 sUnused[4];
UNUSED static s32 sUnused[4];
RumbleMgr sRumbleMgr;
/**
@ -23,7 +24,7 @@ RumbleMgr sRumbleMgr;
*
* Unlike every other function in this file, this runs on the padmgr thread.
*/
void Rumble_Update(PadMgr* padMgr, void* arg) {
void Rumble_Update(PadMgr* padMgr, UNUSED void* arg) {
RumbleMgr_Update(&sRumbleMgr);
PadMgr_RumbleSet(padMgr, sRumbleMgr.rumbleEnable);
}

View File

@ -1,4 +1,5 @@
#include "gfx.h"
#include "attributes.h"
#include "gfx_setupdl.h"
#include "controller.h"
#include "regs.h"
@ -53,7 +54,7 @@ void Sample_Main(GameState* thisx) {
Sample_HandleStateChange(this);
}
void Sample_Destroy(GameState* thisx) {
void Sample_Destroy(UNUSED GameState* thisx) {
}
void Sample_SetupView(SampleState* this) {

View File

@ -1,4 +1,5 @@
#include "array_count.h"
#include "attributes.h"
#include "avoid_ub.h"
#include "printf.h"
#include "regs.h"
@ -6,6 +7,7 @@
#include "seqcmd.h"
#include "segment_symbols.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "terminal.h"
#include "translation.h"
#include "versions.h"
@ -72,7 +74,7 @@ s32 Object_SpawnPersistent(ObjectContext* objectCtx, s16 objectId) {
void Object_InitContext(PlayState* play, ObjectContext* objectCtx) {
PlayState* play2 = play;
s32 pad;
STACK_PAD(s32);
u32 spaceSize;
s32 i;
@ -356,7 +358,7 @@ BAD_RETURN(s32) Scene_CommandTransitionActorEntryList(PlayState* play, SceneCmd*
play->transitionActors.list = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.data);
}
void Scene_ResetTransitionActorList(GameState* state, TransitionActorList* transitionActors) {
void Scene_ResetTransitionActorList(UNUSED GameState* state, TransitionActorList* transitionActors) {
transitionActors->count = 0;
}
@ -438,7 +440,7 @@ BAD_RETURN(s32) Scene_CommandExitList(PlayState* play, SceneCmd* cmd) {
play->exitList = SEGMENTED_TO_VIRTUAL(cmd->exitList.data);
}
BAD_RETURN(s32) Scene_CommandUndefined9(PlayState* play, SceneCmd* cmd) {
BAD_RETURN(s32) Scene_CommandUndefined9(UNUSED PlayState* play, UNUSED SceneCmd* cmd) {
}
BAD_RETURN(s32) Scene_CommandSoundSettings(PlayState* play, SceneCmd* cmd) {

View File

@ -8,6 +8,7 @@
#include "segment_symbols.h"
#include "segmented_address.h"
#include "sfx.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "versions.h"
#include "z_lib.h"
@ -276,7 +277,7 @@ void* sDCLavaFloorTextures[] = {
void Scene_DrawConfigDodongosCavern(PlayState* play) {
u32 gameplayFrames;
s32 pad;
STACK_PAD(s32);
Gfx* displayListHead = GRAPH_ALLOC(play->state.gfxCtx, 2 * sizeof(Gfx[3]));
OPEN_DISPS(play->state.gfxCtx, "../z_scene_table.c", 4905);

View File

@ -1,10 +1,12 @@
#include "libu64/debug.h"
#include "attributes.h"
#include "avoid_ub.h"
#include "gfx.h"
#include "printf.h"
#include "regs.h"
#include "segmented_address.h"
#include "segment_symbols.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "translation.h"
@ -78,7 +80,7 @@ void SkelAnime_DrawLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3
void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw,
PostLimbDrawOpa postLimbDraw, void* arg, s32 lod) {
LodLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* dList;
Vec3f pos;
Vec3s rot;
@ -189,7 +191,7 @@ void SkelAnime_DrawFlexLimbLod(PlayState* play, s32 limbIndex, void** skeleton,
void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg, s32 lod) {
LodLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* newDList;
Gfx* limbDList;
Vec3f pos;
@ -294,7 +296,7 @@ void SkelAnime_DrawLimbOpa(PlayState* play, s32 limbIndex, void** skeleton, Vec3
void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw,
PostLimbDrawOpa postLimbDraw, void* arg) {
StandardLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* dList;
Vec3f pos;
Vec3s rot;
@ -405,7 +407,7 @@ void SkelAnime_DrawFlexLimbOpa(PlayState* play, s32 limbIndex, void** skeleton,
void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg) {
StandardLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* newDList;
Gfx* limbDList;
Vec3f pos;
@ -560,7 +562,7 @@ Gfx* SkelAnime_DrawLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec3s*
Gfx* SkelAnime_Draw(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw,
PostLimbDraw postLimbDraw, void* arg, Gfx* gfx) {
StandardLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* dList;
Vec3f pos;
Vec3s rot;
@ -666,7 +668,7 @@ Gfx* SkelAnime_DrawFlexLimb(PlayState* play, s32 limbIndex, void** skeleton, Vec
Gfx* SkelAnime_DrawFlex(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* arg, Gfx* gfx) {
StandardLimb* rootLimb;
s32 pad;
STACK_PAD(s32);
Gfx* newDList;
Gfx* limbDList;
Vec3f pos;
@ -822,7 +824,7 @@ void AnimTaskQueue_Reset(AnimTaskQueue* animTaskQueue) {
* Every time the group number changes, a single bit moves 1 position to the left. This is an implementation detail
* that allows for `sDisabledTransformTaskGroups` to compare against a set of bit flags.
*/
void AnimTaskQueue_SetNextGroup(PlayState* play) {
void AnimTaskQueue_SetNextGroup(UNUSED PlayState* play) {
sCurAnimTaskGroup <<= 1;
}
@ -834,7 +836,7 @@ void AnimTaskQueue_SetNextGroup(PlayState* play) {
* LoadPlayerFrame and ActorMovement, which don't alter the appearance of an existing animation,
* will always run even if a group has its transformative tasks disabled.
*/
void AnimTaskQueue_DisableTransformTasksForGroup(PlayState* play) {
void AnimTaskQueue_DisableTransformTasksForGroup(UNUSED PlayState* play) {
sDisabledTransformTaskGroups |= sCurAnimTaskGroup;
}
@ -882,7 +884,7 @@ void AnimTaskQueue_AddLoadPlayerFrame(PlayState* play, LinkAnimationHeader* anim
if (task != NULL) {
LinkAnimationHeader* linkAnimHeader = SEGMENTED_TO_VIRTUAL(animation);
s32 pad;
STACK_PAD(s32);
osCreateMesgQueue(&task->data.loadPlayerFrame.msgQueue, &task->data.loadPlayerFrame.msg, 1);
DMA_REQUEST_ASYNC(&task->data.loadPlayerFrame.req, frameTable,
@ -986,7 +988,7 @@ void AnimTaskQueue_AddActorMovement(PlayState* play, Actor* actor, SkelAnime* sk
/**
* Wait for the DMA request submitted by `AnimTaskQueue_AddLoadPlayerFrame` to complete.
*/
void AnimTask_LoadPlayerFrame(PlayState* play, AnimTaskData* data) {
void AnimTask_LoadPlayerFrame(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskLoadPlayerFrame* task = &data->loadPlayerFrame;
osRecvMesg(&task->msgQueue, NULL, OS_MESG_BLOCK);
@ -995,7 +997,7 @@ void AnimTask_LoadPlayerFrame(PlayState* play, AnimTaskData* data) {
/**
* Copy all data from the `src` frame table to the `dest` table.
*/
void AnimTask_Copy(PlayState* play, AnimTaskData* data) {
void AnimTask_Copy(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskCopy* task = &data->copy;
if (!(task->group & sDisabledTransformTaskGroups)) {
@ -1012,7 +1014,7 @@ void AnimTask_Copy(PlayState* play, AnimTaskData* data) {
/**
* Interpolate between the `base` and `mod` frame tables.
*/
void AnimTask_Interp(PlayState* play, AnimTaskData* data) {
void AnimTask_Interp(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskInterp* task = &data->interp;
if (!(task->group & sDisabledTransformTaskGroups)) {
@ -1023,7 +1025,7 @@ void AnimTask_Interp(PlayState* play, AnimTaskData* data) {
/**
* Copy all data from the `src` frame table to the `dest` table according to the copy map.
*/
void AnimTask_CopyUsingMap(PlayState* play, AnimTaskData* data) {
void AnimTask_CopyUsingMap(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskCopyUsingMap* task = &data->copyUsingMap;
if (!(task->group & sDisabledTransformTaskGroups)) {
@ -1043,7 +1045,7 @@ void AnimTask_CopyUsingMap(PlayState* play, AnimTaskData* data) {
/**
* Copy all data from the `src` frame table to the `dest` table according to the inverted copy map.
*/
void AnimTask_CopyUsingMapInverted(PlayState* play, AnimTaskData* data) {
void AnimTask_CopyUsingMapInverted(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskCopyUsingMapInverted* task = &data->copyUsingMapInverted;
if (!(task->group & sDisabledTransformTaskGroups)) {
@ -1064,7 +1066,7 @@ void AnimTask_CopyUsingMapInverted(PlayState* play, AnimTaskData* data) {
* Move an actor according to the translation of its root limb for the current animation frame.
* The actor's current shape yaw will factor into the resulting movement.
*/
void AnimTask_ActorMovement(PlayState* play, AnimTaskData* data) {
void AnimTask_ActorMovement(UNUSED PlayState* play, AnimTaskData* data) {
AnimTaskActorMovement* task = &data->actorMovement;
Actor* actor = task->actor;
Vec3f diff;
@ -1105,7 +1107,7 @@ void AnimTaskQueue_Update(PlayState* play, AnimTaskQueue* animTaskQueue) {
*/
void SkelAnime_InitLink(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
LinkAnimationHeader* animation, s32 flags, Vec3s* jointTable, Vec3s* morphTable,
s32 limbBufCount) {
UNUSED_NDEBUG s32 limbBufCount) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
s32 headerJointCount = skeletonHeader->sh.limbCount;
s32 limbCount;
@ -1251,7 +1253,7 @@ s32 LinkAnimation_Once(PlayState* play, SkelAnime* skelAnime) {
/**
* Sets a new morph and resets the morph weight for the current animation.
*/
void Animation_SetMorph(PlayState* play, SkelAnime* skelAnime, f32 morphFrames) {
void Animation_SetMorph(UNUSED PlayState* play, SkelAnime* skelAnime, f32 morphFrames) {
skelAnime->morphWeight = 1.0f;
skelAnime->morphRate = 1.0f / morphFrames;
}
@ -1439,8 +1441,9 @@ s32 LinkAnimation_OnFrame(SkelAnime* skelAnime, f32 frame) {
/**
* Initializes a normal skeleton to a looping animation, dynamically allocating the frame tables if not provided.
*/
BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
BAD_RETURN(s32) SkelAnime_Init(UNUSED PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable,
UNUSED_NDEBUG s32 limbCount) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->limbCount + 1;
@ -1469,8 +1472,9 @@ BAD_RETURN(s32) SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHe
/**
* Initializes a flex skeleton to a looping animation, dynamically allocating the frame tables if not given.
*/
BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable, s32 limbCount) {
BAD_RETURN(s32) SkelAnime_InitFlex(UNUSED PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation, Vec3s* jointTable, Vec3s* morphTable,
UNUSED_NDEBUG s32 limbCount) {
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
skelAnime->limbCount = skeletonHeader->sh.limbCount + 1;
@ -1503,7 +1507,7 @@ BAD_RETURN(s32) SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSk
/**
* Initializes a skeleton with SkinLimbs to a looping animation, dynamically allocating the frame tables.
*/
BAD_RETURN(s32) SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
BAD_RETURN(s32) SkelAnime_InitSkin(UNUSED PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skeletonHeaderSeg,
AnimationHeader* animation) {
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
@ -1905,7 +1909,7 @@ s32 Animation_OnFrame(SkelAnime* skelAnime, f32 frame) {
/**
* Frees the frame tables for a skelAnime with dynamically allocated tables.
*/
void SkelAnime_Free(SkelAnime* skelAnime, PlayState* play) {
void SkelAnime_Free(SkelAnime* skelAnime, UNUSED PlayState* play) {
if (skelAnime->jointTable != NULL) {
ZELDA_ARENA_FREE(skelAnime->jointTable, "../z_skelanime.c", 3729);
} else {

View File

@ -1,5 +1,7 @@
#include "gfx.h"
#include "attributes.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "z_math.h"
#include "play_state.h"
@ -50,7 +52,7 @@ void Skin_UpdateVertices(MtxF* mtx, SkinVertex* skinVertices, SkinLimbModif* mod
void Skin_ApplyLimbModifications(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s32 arg3) {
s32 modifCount;
SkinLimb** skeleton;
SkinLimb* limb;
STACK_PAD(s32);
SkinAnimatedLimbData* data;
SkinLimbModif* modif;
SkinLimbVtx* vtxEntry;
@ -164,10 +166,10 @@ void Skin_DrawAnimatedLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, s
/**
* Draw a limb of type SKIN_LIMB_TYPE_NORMAL, of the skeleton `skin` at index `limbIndex`
*/
void Skin_DrawLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, s32 drawFlags) {
void Skin_DrawLimb(GraphicsContext* gfxCtx, Skin* skin, s32 limbIndex, Gfx* dlistOverride, UNUSED s32 drawFlags) {
Gfx* gfx = dlistOverride;
SkinLimb** skeleton;
s32 pad;
STACK_PAD(s32);
OPEN_DISPS(gfxCtx, "../z_skin.c", 395);

View File

@ -1,5 +1,7 @@
#include "array_count.h"
#include "attributes.h"
#include "segmented_address.h"
#include "stack_pad.h"
#include "zelda_arena.h"
#include "actor.h"
#include "play_state.h"
@ -11,7 +13,7 @@
/**
* Initialises the Vtx buffers used for limb at index `limbIndex`
*/
void Skin_InitAnimatedLimb(PlayState* play, Skin* skin, s32 limbIndex) {
void Skin_InitAnimatedLimb(UNUSED PlayState* play, Skin* skin, s32 limbIndex) {
s32 i;
SkinLimb** skeleton = SEGMENTED_TO_VIRTUAL(skin->skeletonHeader->segment);
SkinAnimatedLimbData* animatedLimbData =
@ -116,7 +118,7 @@ void Skin_Free(PlayState* play, Skin* skin) {
}
s32 func_800A698C(Skin* skin, SkinLimb** skeleton, MtxF* limbMatrices, u8 parentIndex, u8 limbIndex) {
s32 pad;
STACK_PAD(s32);
SkinLimb* limb = SEGMENTED_TO_VIRTUAL(skeleton[limbIndex]);
MtxF* mtx;
s32 ret;
@ -153,7 +155,7 @@ s32 func_800A698C(Skin* skin, SkinLimb** skeleton, MtxF* limbMatrices, u8 parent
*/
s32 Skin_ApplyAnimTransformations(Skin* skin, MtxF* limbMatrices, Actor* actor, s32 setTranslation) {
s32 i;
s32 pad;
STACK_PAD(s32);
f32 yRot;
f32 xRot;
f32 zRot;

View File

@ -2,6 +2,7 @@
#include "gfx.h"
#include "printf.h"
#include "stack_pad.h"
#include "terminal.h"
#include "translation.h"
#include "z_lib.h"
@ -616,7 +617,7 @@ void SkinMatrix_SetRotateAxis(MtxF* mf, s16 angle, f32 axisX, f32 axisY, f32 axi
f32 xy;
f32 yz;
f32 xz;
f32 pad;
STACK_PAD(s32);
sinA = Math_SinS(angle);
cosA = Math_CosS(angle);

View File

@ -1,6 +1,7 @@
#include "sram.h"
#include "array_count.h"
#include "attributes.h"
#include "file_select_state.h"
#include "controller.h"
#include "memory_utils.h"
@ -603,7 +604,7 @@ void Sram_OpenSave(SramContext* sramCtx) {
* Write the contents of the Save Context to a main and backup slot in SRAM.
* Note: The whole Save Context is written even though only the `save` substruct is read back later
*/
void Sram_WriteSave(SramContext* sramCtx) {
void Sram_WriteSave(UNUSED SramContext* sramCtx) {
u16 offset;
u16 checksum;
u16 j;
@ -1012,7 +1013,7 @@ void Sram_WriteSramHeader(SramContext* sramCtx) {
SRAM_WRITE(OS_K1_TO_PHYSICAL(0xA8000000), sramCtx->readBuff, SRAM_HEADER_SIZE);
}
void Sram_InitSram(GameState* gameState, SramContext* sramCtx) {
void Sram_InitSram(UNUSED_NDEBUG GameState* gameState, SramContext* sramCtx) {
u16 i;
PRINTF("sram_initialize( Game *game, Sram *sram )\n");
@ -1072,5 +1073,5 @@ void Sram_Alloc(GameState* gameState, SramContext* sramCtx) {
ASSERT(sramCtx->readBuff != NULL, "sram->read_buff != NULL", "../z_sram.c", 1295);
}
void Sram_Init(GameState* gameState, SramContext* sramCtx) {
void Sram_Init(UNUSED GameState* gameState, UNUSED SramContext* sramCtx) {
}

View File

@ -8,6 +8,7 @@
#include "main.h"
#include "printf.h"
#include "regs.h"
#include "stack_pad.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "translation.h"
@ -159,7 +160,7 @@ void View_ApplyLetterbox(View* view) {
s32 uly;
s32 lrx;
s32 lry;
s32 pad;
STACK_PAD(s32);
letterboxSize = Letterbox_GetSize();
@ -486,14 +487,14 @@ s32 View_ApplyOrthoToOverlay(View* view) {
*/
s32 View_ApplyPerspectiveToOverlay(View* view) {
GraphicsContext* gfxCtx = view->gfxCtx;
s32 pad;
STACK_PAD(s32);
f32 aspect;
s32 width;
s32 height;
Vp* vp;
Mtx* projection;
Mtx* viewing;
s32 pad1;
STACK_PAD(s32);
OPEN_DISPS(gfxCtx, "../z_view.c", 816);

View File

@ -1,5 +1,6 @@
#include "vi_mode.h"
#include "attributes.h"
#include "libu64/debug.h"
#include "ultra64/viint.h"
#include "controller.h"
@ -245,7 +246,7 @@ void ViMode_Init(ViMode* viMode) {
ViMode_Save(viMode);
}
void ViMode_Destroy(ViMode* viMode) {
void ViMode_Destroy(UNUSED ViMode* viMode) {
}
void ViMode_ConfigureFeatures(ViMode* viMode, s32 viFeatures) {

View File

@ -21,6 +21,7 @@
*/
#include "gfx.h"
#include "attributes.h"
#include "vis.h"
/**
@ -101,7 +102,7 @@ void VisCvg_Init(VisCvg* this) {
this->vis.primColor.a = 255;
}
void VisCvg_Destroy(VisCvg* this) {
void VisCvg_Destroy(UNUSED VisCvg* this) {
}
void VisCvg_Draw(VisCvg* this, Gfx** gfxP) {

View File

@ -53,7 +53,7 @@ void VisMono_Destroy(VisMono* this) {
SYSTEM_ARENA_FREE(this->dList, "../z_vismono.c", 137);
}
void VisMono_DesaturateTLUT(VisMono* this, u16* tlut) {
void VisMono_DesaturateTLUT(UNUSED VisMono* this, u16* tlut) {
s32 i;
for (i = 0; i < 256; i++) {
@ -74,7 +74,7 @@ void VisMono_DesaturateTLUT(VisMono* this, u16* tlut) {
}
}
Gfx* VisMono_DesaturateDList(VisMono* this, Gfx* gfx) {
Gfx* VisMono_DesaturateDList(UNUSED VisMono* this, Gfx* gfx) {
s32 y;
s32 height = VISMONO_CFBFRAG_HEIGHT;
u16* cfbFrag = D_0F000000;

View File

@ -33,6 +33,8 @@
*/
#include "gfx.h"
#include "attributes.h"
#include "stack_pad.h"
#include "vis.h"
// Height of the fragments the z-buffer is split into.
@ -62,12 +64,12 @@ void VisZBuf_Init(VisZBuf* this) {
// clang-format on
}
void VisZBuf_Destroy(VisZBuf* this) {
void VisZBuf_Destroy(UNUSED VisZBuf* this) {
}
void VisZBuf_Draw(VisZBuf* this, Gfx** gfxP) {
Gfx* gfx = *gfxP;
s32 pad;
STACK_PAD(s32);
u16* zbufFrag = D_0E000000;
s32 fmt;
s32 y;

View File

@ -3,6 +3,7 @@
#include "array_count.h"
#include "printf.h"
#include "segment_symbols.h"
#include "stack_pad.h"
#include "terminal.h"
#include "ultra64.h"
#include "environment.h"
@ -86,7 +87,7 @@ s32 Skybox_CalculateFace256(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 roomVtxS
s32 zPoints[9 * 5];
s32 tcS[9 * 5];
s32 tcT[9 * 5];
s32 pad;
STACK_PAD(s32);
// Collect all vertex positions for this face
switch (faceNum) {
@ -250,7 +251,7 @@ s32 Skybox_CalculateFace128(SkyboxContext* skyboxCtx, Vtx* roomVtx, s32 roomVtxS
s32 zPoints[5 * 5];
s32 tcS[5 * 5];
s32 tcT[5 * 5];
s32 pad;
STACK_PAD(s32);
// Collect all vertex positions for this face
switch (faceNum) {
@ -466,7 +467,7 @@ void Skybox_Setup(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
s16 i;
u8 skybox1Index;
u8 skybox2Index;
s32 pad;
STACK_PAD(s32);
s32 skyboxConfig;
switch (skyboxId) {

Some files were not shown because too many files have changed in this diff Show More