1
0
mirror of https://github.com/blawar/ooot.git synced 2024-06-24 05:19:36 +00:00

cpp conversion

This commit is contained in:
Blake Warner 2022-02-12 14:50:06 -05:00
parent 5d661cff1b
commit b9c0619828
1351 changed files with 206650 additions and 209645 deletions

View File

@ -1,8 +1,9 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt.h"
#include "message_data_static.h"
#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
const char _message_##textId##_fra[sizeof(fraMessage)] = { fraMessage END };
const char _message_##textId##_fra[sizeof(fraMessage END)] = { fraMessage END };
#include "assets/text/message_data.enc.h"

View File

@ -1,8 +1,9 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt.h"
#include "message_data_static.h"
#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
const char _message_##textId##_ger[sizeof(gerMessage)] = { gerMessage END };
const char _message_##textId##_ger[sizeof(gerMessage END)] = { gerMessage END };
#include "assets/text/message_data.enc.h"

View File

@ -1,12 +1,14 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt.h"
#include "message_data_static.h"
#define DEFINE_MESSAGE(textId, type, yPos, nesMessage, gerMessage, fraMessage) \
const char _message_##textId##_nes[sizeof(nesMessage)] = { nesMessage END };
const char _message_##textId##_nes[sizeof(nesMessage END)] = { nesMessage END };
#define DEFINE_MESSAGE_FFFC
#include "assets/text/message_data.enc.h"
#undef DEFINE_MESSAGE_FFFC

View File

@ -1,8 +1,10 @@
#define MESSAGE_DATA_STATIC
#include "message_data_fmt.h"
#include "message_data_static.h"
#define DEFINE_MESSAGE(textId, type, yPos, staffMessage) \
const char _message_##textId##_staff[sizeof(staffMessage)] = { staffMessage END };
const char _message_##textId##_staff[sizeof(staffMessage END)] = { staffMessage END };
#include "assets/text/message_data_staff.enc.h"

View File

@ -3,13 +3,13 @@
#include "sched.h"
#include "z64math.h"
typedef struct {
struct SoundSource {
/* 0x00 */ u16 countdown;
/* 0x04 */ Vec3f originPos;
/* 0x10 */ Vec3f relativePos;
} SoundSource; // size = 0x1C
}; // size = 0x1C
typedef struct {
struct AudioMgr {
/* 0x0000 */ IrqMgr* irqMgr;
/* 0x0004 */ SchedContext* sched;
/* 0x0008 */ OSScTask audioTask;
@ -25,7 +25,7 @@ typedef struct {
/* 0x00E0 */ OSMesg unk_E0;
/* 0x00E4 */ char unk_E4[0x04];
/* 0x00E8 */ OSThread unk_E8;
} AudioMgr; // size = 0x298
}; // size = 0x298
extern Vec3f D_801333D4;
extern f32 D_801333E0;

View File

@ -1,10 +1,10 @@
#pragma once
// Vis...
typedef struct {
struct struct_801664F0 {
/* 0x00 */ u32 type;
/* 0x04 */ u32 setScissor;
/* 0x08 */ Color_RGBA8_u32 color;
/* 0x0C */ Color_RGBA8_u32 envColor;
} struct_801664F0; // size = 0x10
}; // size = 0x10

View File

@ -1,12 +1,12 @@
#pragma once
typedef struct {
struct Color_RGB8 {
u8 r, g, b;
} Color_RGB8;
};
typedef struct {
struct Color_RGBA8 {
u8 r, g, b, a;
} Color_RGBA8;
};
// only use when necessary for alignment purposes
typedef union {
@ -16,9 +16,9 @@ typedef union {
u32 rgba;
} Color_RGBA8_u32;
typedef struct {
struct Color_RGBAf {
f32 r, g, b, a;
} Color_RGBAf;
};
typedef union {
struct {

View File

@ -57,6 +57,6 @@
#endif
#endif
#define CMD_PTR(a) (void*)(a)
#define CMD_PTR(a) (uintptr_t)(a)
#endif

View File

@ -1,44 +1,23 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_PRERENDER_C
void PreRender_Calc(PreRender* this);
void PreRender_Destroy(PreRender* this);
void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void func_800C0F28(PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_800C1258(PreRender* this, Gfx** gfxp);
void func_800C170C(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave, u32 r, u32 g, u32 b, u32 a);
void func_800C1AE8(PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave);
void func_800C1B24(PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave);
void func_800C1E9C(PreRender* this, Gfx** gfxp);
void func_800C1F20(PreRender* this, Gfx** gfxp);
void func_800C1FA4(PreRender* this, Gfx** gfxp);
void func_800C20B4(PreRender* this, Gfx** gfxp);
void func_800C2118(PreRender* this, Gfx** gfxp);
void func_800C213C(PreRender* this, Gfx** gfxp);
void func_800C24BC(PreRender* this, Gfx** gfxp);
void func_800C24E0(PreRender* this, Gfx** gfxp);
void func_800C2500(PreRender* this, s32 x, s32 y);
void func_800C2FE4(PreRender* this);
#else
void PreRender_Calc(struct PreRender* this);
void PreRender_Destroy(struct PreRender* this);
void PreRender_Init(struct PreRender* this);
void PreRender_SetValues(struct PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_SetValuesSave(struct PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void func_800C0F28(struct PreRender* this, Gfx** gfxp, void* buf, void* bufSave);
void func_800C1258(struct PreRender* this, Gfx** gfxp);
void func_800C170C(struct PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave, u32 r, u32 g, u32 b, u32 a);
void func_800C1AE8(struct PreRender* this, Gfx** gfxp, void* fbuf, void* fbufSave);
void func_800C1B24(struct PreRender* this, Gfx** gfxp, void* fbuf, void* cvgSave);
void func_800C1E9C(struct PreRender* this, Gfx** gfxp);
void func_800C1F20(struct PreRender* this, Gfx** gfxp);
void func_800C1FA4(struct PreRender* this, Gfx** gfxp);
void func_800C20B4(struct PreRender* this, Gfx** gfxp);
void func_800C2118(struct PreRender* this, Gfx** gfxp);
void func_800C213C(struct PreRender* this, Gfx** gfxp);
void func_800C24BC(struct PreRender* this, Gfx** gfxp);
void func_800C24E0(struct PreRender* this, Gfx** gfxp);
void func_800C2500(struct PreRender* this, s32 x, s32 y);
void func_800C2FE4(struct PreRender* this);
#endif
struct PreRender;
void PreRender_Calc(PreRender* pthis);
void PreRender_Destroy(PreRender* pthis);
void PreRender_Init(PreRender* pthis);
void PreRender_SetValues(PreRender* pthis, u32 width, u32 height, void* fbuf, void* zbuf);
void PreRender_SetValuesSave(PreRender* pthis, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void func_800C0F28(PreRender* pthis, Gfx** gfxp, void* buf, void* bufSave);
void func_800C1258(PreRender* pthis, Gfx** gfxp);
void func_800C170C(PreRender* pthis, Gfx** gfxp, void* fbuf, void* fbufSave, u32 r, u32 g, u32 b, u32 a);
void func_800C1AE8(PreRender* pthis, Gfx** gfxp, void* fbuf, void* fbufSave);
void func_800C1B24(PreRender* pthis, Gfx** gfxp, void* fbuf, void* cvgSave);
void func_800C1E9C(PreRender* pthis, Gfx** gfxp);
void func_800C1F20(PreRender* pthis, Gfx** gfxp);
void func_800C1FA4(PreRender* pthis, Gfx** gfxp);
void func_800C20B4(PreRender* pthis, Gfx** gfxp);
void func_800C2118(PreRender* pthis, Gfx** gfxp);
void func_800C213C(PreRender* pthis, Gfx** gfxp);
void func_800C24BC(PreRender* pthis, Gfx** gfxp);
void func_800C24E0(PreRender* pthis, Gfx** gfxp);
void func_800C2500(PreRender* pthis, s32 x, s32 y);
void func_800C2FE4(PreRender* pthis);

View File

@ -1,5 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_TWOHEADARENA_C
struct TwoHeadArena;
struct TwoHeadGfxArena;
void* THA_AllocEnd(TwoHeadArena* tha, u32 size);
void* THA_AllocEndAlign(TwoHeadArena* tha, u32 size, u32 mask);
void* THA_AllocEndAlign16(TwoHeadArena* tha, u32 size);
@ -29,34 +31,3 @@ Gfx* THGA_GetTail(TwoHeadGfxArena* thga);
void THGA_Init(TwoHeadGfxArena* thga);
u32 THGA_IsCrash(TwoHeadGfxArena* thga);
void THGA_SetHead(TwoHeadGfxArena* thga, Gfx* start);
#else
void* THA_AllocEnd(struct TwoHeadArena* tha, u32 size);
void* THA_AllocEndAlign(struct TwoHeadArena* tha, u32 size, u32 mask);
void* THA_AllocEndAlign16(struct TwoHeadArena* tha, u32 size);
void* THA_AllocStart(struct TwoHeadArena* tha, u32 size);
void* THA_AllocStart1(struct TwoHeadArena* tha);
void THA_Ct(struct TwoHeadArena* tha, void* ptr, u32 size);
void THA_Dt(struct TwoHeadArena* tha);
void* THA_GetHead(struct TwoHeadArena* tha);
s32 THA_GetSize(struct TwoHeadArena* tha);
void* THA_GetTail(struct TwoHeadArena* tha);
void THA_Init(struct TwoHeadArena* tha);
u32 THA_IsCrash(struct TwoHeadArena* tha);
void THA_SetHead(struct TwoHeadArena* tha, void* start);
Gfx* THGA_AllocEnd(struct TwoHeadGfxArena* thga, u32 size);
Gfx* THGA_AllocEnd16(struct TwoHeadGfxArena* thga);
Gfx* THGA_AllocEnd64(struct TwoHeadGfxArena* thga);
Gfx* THGA_AllocEndArray16(struct TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocEndArray64(struct TwoHeadGfxArena* thga, u32 count);
Gfx* THGA_AllocStart8(struct TwoHeadGfxArena* thga);
Gfx* THGA_AllocStart8Wrapper(struct TwoHeadGfxArena* thga);
Gfx* THGA_AllocStartArray8(struct TwoHeadGfxArena* thga, u32 count);
void THGA_Ct(struct TwoHeadGfxArena* thga, Gfx* start, u32 size);
void THGA_Dt(struct TwoHeadGfxArena* thga);
Gfx* THGA_GetHead(struct TwoHeadGfxArena* thga);
s32 THGA_GetSize(struct TwoHeadGfxArena* thga);
Gfx* THGA_GetTail(struct TwoHeadGfxArena* thga);
void THGA_Init(struct TwoHeadGfxArena* thga);
u32 THGA_IsCrash(struct TwoHeadGfxArena* thga);
void THGA_SetHead(struct TwoHeadGfxArena* thga, Gfx* start);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_AISETFREQ_C
s32 osAiSetFrequency(u32 frequency);
#else
s32 osAiSetFrequency(u32 frequency);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_AISETNEXTBUF_C
s32 osAiSetNextBuffer(void*, u32);
#else
s32 osAiSetNextBuffer(void*, u32);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_BOOT_ASSERT_C
void __assert(const char* exp, const char* file, s32 line);
#else
void __assert(const char* exp, const char* file, s32 line);
#endif

View File

@ -1,16 +1,11 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIOMGR_C
struct AudioMgr;
struct SchedContext;
struct IrqMgr;
void AudioMgr_HandlePRENMI(AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(AudioMgr* audioMgr);
void AudioMgr_Init(AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, SchedContext* sched, IrqMgr* irqMgr);
void AudioMgr_ThreadEntry(void* arg0);
void AudioMgr_Unlock(AudioMgr* audioMgr);
void func_800C3C80(AudioMgr* audioMgr);
#else
void AudioMgr_HandlePRENMI(struct AudioMgr* audioMgr);
void AudioMgr_HandleRetrace(struct AudioMgr* audioMgr);
void AudioMgr_Init(struct AudioMgr* audioMgr, void* stack, OSPri pri, OSId id, struct SchedContext* sched, struct IrqMgr* irqMgr);
void AudioMgr_ThreadEntry(void* arg0);
void AudioMgr_Unlock(struct AudioMgr* audioMgr);
void func_800C3C80(struct AudioMgr* audioMgr);
#endif

View File

@ -1,4 +1,5 @@
#pragma once
struct AdsrEnvelope;
extern s16 D_8012FBA8[];
extern f32 gBendPitchOneOctaveFrequencies[256];

View File

@ -1,5 +1,11 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIO_EFFECTS_C
struct AdsrEnvelope;
struct Portamento;
struct VibratoState;
struct Note;
struct SequenceChannel;
struct SequencePlayer;
void Audio_AdsrInit(AdsrState* adsr, AdsrEnvelope* envelope, s16* volOut);
f32 Audio_AdsrUpdate(AdsrState* adsr);
f32 Audio_GetPortamentoFreqScale(Portamento* p);
@ -10,15 +16,3 @@ void Audio_NoteVibratoInit(Note* note);
void Audio_NoteVibratoUpdate(Note* note);
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 b);
void Audio_SequencePlayerProcessSound(SequencePlayer* seqPlayer);
#else
void Audio_AdsrInit(AdsrState* adsr, struct AdsrEnvelope* envelope, s16* volOut);
f32 Audio_AdsrUpdate(AdsrState* adsr);
f32 Audio_GetPortamentoFreqScale(struct Portamento* p);
f32 Audio_GetVibratoFreqScale(struct VibratoState* vib);
s16 Audio_GetVibratoPitchChange(struct VibratoState* vib);
void Audio_NotePortamentoInit(struct Note* note);
void Audio_NoteVibratoInit(struct Note* note);
void Audio_NoteVibratoUpdate(struct Note* note);
void Audio_SequenceChannelProcessSound(struct SequenceChannel* channel, s32 recalculateVolume, s32 b);
void Audio_SequencePlayerProcessSound(struct SequencePlayer* seqPlayer);
#endif

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIO_HEAP_C
struct AudioAllocPool;
struct AudioPersistentCache;
struct AudioTemporaryCache;
void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocAttemptExternal(AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id);
@ -24,29 +27,3 @@ void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
void AudioHeap_TemporaryCacheClear(AudioTemporaryCache* temporary);
void AudioHeap_WritebackDCache(void* mem, u32 size);
#else
void* AudioHeap_Alloc(struct AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocAttemptExternal(struct AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id);
void* AudioHeap_AllocDmaMemory(struct AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocDmaMemoryZeroed(struct AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size);
void AudioHeap_AllocPoolInit(struct AudioAllocPool* pool, void* mem, u32 size);
void* AudioHeap_AllocSampleCache(u32 size, s32 fontId, void* sampleAddr, s8 medium, s32 cache);
void* AudioHeap_AllocZeroed(struct AudioAllocPool* pool, u32 size);
void* AudioHeap_AllocZeroedAttemptExternal(struct AudioAllocPool* pool, u32 size);
void AudioHeap_ApplySampleBankCache(s32 sampleBankId);
void AudioHeap_DiscardFont(s32 fontId);
void AudioHeap_DiscardSequence(s32 seqId);
void AudioHeap_Init(void);
void AudioHeap_InitMainPools(s32 sizeForAudioInitPool);
void AudioHeap_LoadFilter(s16* filter, s32 filter1, s32 filter2);
void AudioHeap_PersistentCacheClear(struct AudioPersistentCache* persistent);
void AudioHeap_PopCache(s32 tableType);
s32 AudioHeap_ResetStep(void);
void* AudioHeap_SearchCaches(s32 tableType, s32 arg1, s32 id);
void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id);
void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id);
void AudioHeap_TemporaryCacheClear(struct AudioTemporaryCache* temporary);
void AudioHeap_WritebackDCache(void* mem, u32 size);
#endif

View File

@ -1,4 +1,9 @@
#pragma once
struct AudioContextInitSizes;
struct AudioContext;
struct AudioSpec;
extern const s16 D_8014A6C0[];
extern const AudioContextInitSizes D_8014A6C4;
extern AudioContext gAudioContext;
extern AudioSpec gAudioSpecs[18];

View File

@ -1,14 +1,14 @@
#pragma once
struct OSMesgQueue;
extern s32 gAudioContextInitalized;
#ifdef INTERNAL_SRC_CODE_AUDIO_LOAD_C
void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, OSMesgQueue* retQueue);
void AudioLoad_DecreaseSampleDmaTtls(void);
void AudioLoad_DiscardSeqFonts(s32 seqId);
void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium);
void* AudioLoad_DmaSampleData(Pointer devAddr, size_t size, s32 arg2, u8* dmaIndexRef, s32 medium);
u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* arg1);
void AudioLoad_Init(void* heap, u32 heapSize);
void AudioLoad_InitAsyncLoads(void);
@ -30,32 +30,3 @@ s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2);
s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 arg2);
s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId);
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1);
#else
void AudioLoad_AsyncLoadFont(s32 fontId, s32 arg1, s32 retData, struct OSMesgQueue* retQueue);
void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 arg1, s32 retData, struct OSMesgQueue* retQueue);
void AudioLoad_AsyncLoadSeq(s32 seqId, s32 arg1, s32 retData, struct OSMesgQueue* retQueue);
void AudioLoad_DecreaseSampleDmaTtls(void);
void AudioLoad_DiscardSeqFonts(s32 seqId);
void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, s32 arg2, u8* dmaIndexRef, s32 medium);
u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* arg1);
void AudioLoad_Init(void* heap, u32 heapSize);
void AudioLoad_InitAsyncLoads(void);
void AudioLoad_InitSampleDmaBuffers(s32 arg0);
void AudioLoad_InitScriptLoads(void);
void AudioLoad_InitSlowLoads(void);
s32 AudioLoad_IsFontLoadComplete(s32 fontId);
s32 AudioLoad_IsSeqLoadComplete(s32 seqId);
void AudioLoad_LoadPermanentSamples(void);
void AudioLoad_ProcessLoads(s32 resetStatus);
void AudioLoad_ProcessScriptLoads(void);
void AudioLoad_ScriptLoad(s32 tableType, s32 arg1, s8* arg2);
void AudioLoad_SetDmaHandler(DmaHandler callback);
void AudioLoad_SetFontLoadStatus(s32 fontId, s32 status);
void AudioLoad_SetSeqLoadStatus(s32 seqId, s32 status);
s32 AudioLoad_SlowLoadSample(s32 arg0, s32 arg1, s8* arg2);
s32 AudioLoad_SlowLoadSeq(s32 playerIdx, u8* ramAddr, s8* arg2);
s32 AudioLoad_SyncInitSeqPlayer(s32 playerIdx, s32 seqId, s32 arg2);
s32 AudioLoad_SyncInitSeqPlayerSkipTicks(s32 playerIdx, s32 seqId, s32 arg2);
s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId);
void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 arg1);
#endif

View File

@ -1,5 +1,13 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIO_PLAYBACK_C
struct SequenceLayer;
struct Note;
struct NotePool;
struct AudioListItem;
struct Drum;
struct Instrument;
struct SoundFontSound;
struct NoteSubAttributes;
Note* Audio_AllocNote(SequenceLayer* layer);
Note* Audio_AllocNoteFromActive(NotePool* pool, SequenceLayer* layer);
Note* Audio_AllocNoteFromDecaying(NotePool* pool, SequenceLayer* layer);
@ -31,36 +39,3 @@ void Audio_SeqLayerNoteDecay(SequenceLayer* layer);
void Audio_SeqLayerNoteRelease(SequenceLayer* layer);
s32 Audio_SetFontInstrument(s32 instrumentType, s32 fontId, s32 index, void* value);
void func_800E82C0(Note* note, SequenceLayer* layer);
#else
struct Note* Audio_AllocNote(struct SequenceLayer* layer);
struct Note* Audio_AllocNoteFromActive(struct NotePool* pool, struct SequenceLayer* layer);
struct Note* Audio_AllocNoteFromDecaying(struct NotePool* pool, struct SequenceLayer* layer);
struct Note* Audio_AllocNoteFromDisabled(struct NotePool* pool, struct SequenceLayer* layer);
void Audio_AudioListPushFront(struct AudioListItem* list, struct AudioListItem* item);
void Audio_AudioListRemove(struct AudioListItem* item);
s32 Audio_BuildSyntheticWave(struct Note* note, struct SequenceLayer* layer, s32 waveId);
struct Note* Audio_FindNodeWithPrioLessThan(struct AudioListItem* list, s32 limit);
struct Drum* Audio_GetDrum(s32 fontId, s32 drumId);
struct Instrument* Audio_GetInstrumentInner(s32 fontId, s32 instId);
struct SoundFontSound* Audio_GetSfx(s32 fontId, s32 sfxId);
void Audio_InitNoteFreeList(void);
void Audio_InitNoteList(struct AudioListItem* list);
void Audio_InitNoteLists(struct NotePool* pool);
void Audio_InitNoteSub(struct Note* note, NoteSubEu* sub, struct NoteSubAttributes* attrs);
void Audio_InitSyntheticWave(struct Note* note, struct SequenceLayer* layer);
struct SoundFontSound* Audio_InstrumentGetSound(struct Instrument* instrument, s32 semitone);
void Audio_NoteDisable(struct Note* note);
void Audio_NoteInit(struct Note* note);
void Audio_NoteInitAll(void);
void Audio_NoteInitForLayer(struct Note* note, struct SequenceLayer* layer);
void Audio_NotePoolClear(struct NotePool* pool);
void Audio_NotePoolFill(struct NotePool* pool, s32 count);
void Audio_NoteReleaseAndTakeOwnership(struct Note* note, struct SequenceLayer* layer);
void Audio_NoteSetResamplingRate(NoteSubEu* noteSubEu, f32 resamplingRateInput);
void Audio_ProcessNotes(void);
void Audio_SeqLayerDecayRelease(struct SequenceLayer* layer, s32 target);
void Audio_SeqLayerNoteDecay(struct SequenceLayer* layer);
void Audio_SeqLayerNoteRelease(struct SequenceLayer* layer);
s32 Audio_SetFontInstrument(s32 instrumentType, s32 fontId, s32 index, void* value);
void func_800E82C0(struct Note* note, struct SequenceLayer* layer);
#endif

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIO_SEQPLAYER_C
struct AudioListItem;
struct SequencePlayer;
struct SequenceChannel;
void* AudioSeq_AudioListPopBack(AudioListItem* list);
void AudioSeq_AudioListPushBack(AudioListItem* list, AudioListItem* item);
void AudioSeq_InitSequencePlayerChannels(s32 playerIdx);
@ -10,15 +13,3 @@ void AudioSeq_SequenceChannelDisable(SequenceChannel* channel);
void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer);
void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer);
void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer);
#else
void* AudioSeq_AudioListPopBack(struct AudioListItem* list);
void AudioSeq_AudioListPushBack(struct AudioListItem* list, struct AudioListItem* item);
void AudioSeq_InitSequencePlayerChannels(s32 playerIdx);
void AudioSeq_InitSequencePlayers(void);
void AudioSeq_ProcessSequences(s32 arg0);
void AudioSeq_ResetSequencePlayer(struct SequencePlayer* seqPlayer);
void AudioSeq_SequenceChannelDisable(struct SequenceChannel* channel);
void AudioSeq_SequencePlayerDisable(struct SequencePlayer* seqPlayer);
void AudioSeq_SequencePlayerDisableAsFinished(struct SequencePlayer* seqPlayer);
void AudioSeq_SkipForwardSequence(struct SequencePlayer* seqPlayer);
#endif

View File

@ -1,3 +1,4 @@
#pragma once
struct SoundParams;
extern SoundParams* gSoundParams[7];

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_AUDIO_SYNTHESIS_C
Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
#else
Acmd* AudioSynth_Update(Acmd* cmdStart, s32* cmdCnt, s16* aiStart, s32 aiBufLen);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CARTROMINIT_C
struct OSPiHandle;
OSPiHandle* osCartRomInit(void);
#else
struct OSPiHandle* osCartRomInit(void);
#endif

View File

@ -1,8 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800430A0_C
struct CollisionContext;
struct Actor;
void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId);
s32 func_800433A4(CollisionContext* colCtx, s32 bgId, Actor* actor);
#else
void func_80043334(struct CollisionContext* colCtx, struct Actor* actor, s32 bgId);
s32 func_800433A4(struct CollisionContext* colCtx, s32 bgId, struct Actor* actor);
#endif

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_80043480_C
struct DynaPolyActor;
struct CollisionContext;
struct GlobalContext;
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
void func_800434A0(DynaPolyActor* dynaActor);
void func_800434A8(DynaPolyActor* dynaActor);
@ -11,16 +14,3 @@ s32 func_8004356C(DynaPolyActor* dynaActor);
s32 func_80043590(DynaPolyActor* dynaActor);
s32 func_800435B4(DynaPolyActor* dynaActor);
s32 func_800435D8(GlobalContext* globalCtx, DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
#else
void DynaPolyActor_Init(struct DynaPolyActor* dynaActor, s32 flags);
void func_800434A0(struct DynaPolyActor* dynaActor);
void func_800434A8(struct DynaPolyActor* dynaActor);
void func_800434C8(struct CollisionContext* colCtx, s32 floorBgId);
void func_80043508(struct CollisionContext* colCtx, s32 floorBgId);
void func_80043538(struct DynaPolyActor* dynaActor);
s32 func_80043548(struct DynaPolyActor* dynaActor);
s32 func_8004356C(struct DynaPolyActor* dynaActor);
s32 func_80043590(struct DynaPolyActor* dynaActor);
s32 func_800435B4(struct DynaPolyActor* dynaActor);
s32 func_800435D8(struct GlobalContext* globalCtx, struct DynaPolyActor* dynaActor, s16 arg2, s16 arg3, s16 arg4);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_80069420_C
void* MemCopy(void* dest, void* src, s32 size);
#else
void* MemCopy(void* dest, void* src, s32 size);
#endif

View File

@ -1,10 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_8006BA00_C
struct GlobalContext;
struct Vec3f;
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
void func_8006BA00(GlobalContext* globalCtx);
void func_8006BA30(GlobalContext* globalCtx);
#else
void Audio_PlaySoundAtPosition(struct GlobalContext* globalCtx, struct Vec3f* pos, s32 duration, u16 sfxId);
void func_8006BA00(struct GlobalContext* globalCtx);
void func_8006BA30(struct GlobalContext* globalCtx);
#endif

View File

@ -1,12 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_8006C3A0_C
struct GlobalContext;
s32 Flags_GetEnv(GlobalContext* globalCtx, s16 flag);
void Flags_SetEnv(GlobalContext* globalCtx, s16 flag);
void Flags_UnsetAllEnv(GlobalContext* globalCtx);
void Flags_UnsetEnv(GlobalContext* globalCtx, s16 flag);
#else
s32 Flags_GetEnv(struct GlobalContext* globalCtx, s16 flag);
void Flags_SetEnv(struct GlobalContext* globalCtx, s16 flag);
void Flags_UnsetAllEnv(struct GlobalContext* globalCtx);
void Flags_UnsetEnv(struct GlobalContext* globalCtx, s16 flag);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_8006C510_C
struct TransformData;
f32 func_8006C5A8(f32 target, TransformData* transData, s32 refIdx);
#else
f32 func_8006C5A8(f32 target, struct TransformData* transData, s32 refIdx);
#endif

View File

@ -1,4 +1,5 @@
#pragma once
struct GlobalContext;
extern u32 gBitFlags[32];
extern u16 gEquipMasks[4];
@ -7,21 +8,13 @@ extern u8 gEquipShifts[4];
extern u32 gGsFlagsMasks[4];
extern u32 gGsFlagsShifts[4];
extern void* gItemIcons[0x82];
#ifndef N64_VERSION
extern u8* gItemIconsGray[86][32*32];
extern void* gItemIconsCurrent[86];//Points to either the original or the grayscale version
#endif
extern void* gItemIconsCurrent[86];
extern void* gItemIconsGray[86][32*32];
extern u8 gItemSlots[56];
extern u16 gUpgradeCapacities[8][4];
extern u32 gUpgradeMasks[8];
extern u8 gUpgradeShifts[8];
#ifdef INTERNAL_SRC_CODE_CODE_80097A00_C
void Inventory_ChangeEquipment(s16 equipment, u16 value);
void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment);
#else
void Inventory_ChangeEquipment(s16 equipment, u16 value);
void Inventory_ChangeUpgrade(s16 upgrade, s16 value);
u8 Inventory_DeleteEquipment(struct GlobalContext* globalCtx, s16 equipment);
#endif

View File

@ -1,5 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800A9F30_C
struct PadMgr;
void func_800A9F30(PadMgr*, s32);
void func_800A9F6C(f32, u8, u8, u8);
void func_800AA000(f32, u8, u8, u8);
@ -9,14 +10,3 @@ u32 func_800AA148();
void func_800AA15C();
void func_800AA16C();
void func_800AA178(u32);
#else
void func_800A9F30(struct PadMgr*, s32);
void func_800A9F6C(f32, u8, u8, u8);
void func_800AA000(f32, u8, u8, u8);
void func_800AA0B4(void);
void func_800AA0F0(void);
u32 func_800AA148(void);
void func_800AA15C(void);
void func_800AA16C(void);
void func_800AA178(u32);
#endif

View File

@ -1,10 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800ACE70_C
void func_800ACE70(struct_801664F0* this);
void func_800ACE90(struct_801664F0* this);
void func_800ACE98(struct_801664F0* this, Gfx** gfxp);
#else
void func_800ACE70(struct struct_801664F0* this);
void func_800ACE90(struct struct_801664F0* this);
void func_800ACE98(struct struct_801664F0* this, Gfx** gfxp);
#endif
struct struct_801664F0;
void func_800ACE70(struct_801664F0* pthis);
void func_800ACE90(struct_801664F0* pthis);
void func_800ACE98(struct_801664F0* pthis, Gfx** gfxp);

View File

@ -1,10 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800AD920_C
void func_800AD920(struct_80166500* this);
void func_800AD950(struct_80166500* this);
void func_800AD958(struct_80166500* this, Gfx** gfxp);
#else
void func_800AD920(struct struct_80166500* this);
void func_800AD950(struct struct_80166500* this);
void func_800AD958(struct struct_80166500* this, Gfx** gfxp);
#endif
struct struct_80166500;
void func_800AD920(struct_80166500* pthis);
void func_800AD950(struct_80166500* pthis);
void func_800AD958(struct_80166500* pthis, Gfx** gfxp);

View File

@ -1,8 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800BB0A0_C
struct Vec3f;
struct CutsceneCameraPoint;
void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyframe, f32* curFrame);
#else
void func_800BB0A0(f32 u, struct Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
s32 func_800BB2B4(struct Vec3f* pos, f32* roll, f32* fov, struct CutsceneCameraPoint* point, s16* keyframe, f32* curFrame);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800C3C20_C
void func_800C3C20(void);
#else
void func_800C3C20(void);
#endif

View File

@ -1,10 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800D2E30_C
struct UnkRumbleStruct;
void func_800D2E30(UnkRumbleStruct* arg0);
void func_800D3140(UnkRumbleStruct* arg0);
void func_800D3178(UnkRumbleStruct* arg0);
#else
void func_800D2E30(struct UnkRumbleStruct* arg0);
void func_800D3140(struct UnkRumbleStruct* arg0);
void func_800D3178(struct UnkRumbleStruct* arg0);
#endif

View File

@ -2,12 +2,6 @@
extern u32 gIsCtrlr2Valid;
#ifdef INTERNAL_SRC_CODE_CODE_800D31A0_C
void func_800D31A0(void);
void func_800D31F0(void);
void func_800D3210(void);
#else
void func_800D31A0(void);
void func_800D31F0(void);
void func_800D3210(void);
#endif

View File

@ -1,5 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800E4FE0_C
struct AudioTask;
void Audio_InitMesgQueues(void);
u32 Audio_NextRandom(void);
void Audio_PreNMIInternal(void);
@ -14,19 +15,4 @@ u8* func_800E5E84(s32 arg0, u32* arg1);
s32 func_800E5EDC(void);
s32 func_800E5F88(s32 arg0);
s32 func_800E6680(void);
#else
void Audio_InitMesgQueues(void);
u32 Audio_NextRandom(void);
void Audio_PreNMIInternal(void);
void Audio_QueueCmdF32(u32 arg0, f32 arg1);
void Audio_QueueCmdS32(u32 arg0, s32 arg1);
void Audio_QueueCmdS8(u32 arg0, s8 arg1);
void Audio_QueueCmdU16(u32 arg0, u16 arg1);
s32 Audio_ScheduleProcessCmds(void);
struct AudioTask* func_800E4FE0(void);
u32 func_800E5E20(u32* arg0);
u8* func_800E5E84(s32 arg0, u32* arg1);
s32 func_800E5EDC(void);
s32 func_800E5F88(s32 arg0);
s32 func_800E6680(void);
#endif
u32 osGetCount(void);

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800E6840_C
void Audio_InvalDCache(void* buf, s32 size);
void Audio_WritebackDCache(void* mem, s32 size);
#else
void Audio_InvalDCache(void* buf, s32 size);
void Audio_WritebackDCache(void* mem, s32 size);
#endif

View File

@ -1,4 +1,8 @@
#pragma once
struct Vec3f;
struct OcarinaStaff;
struct OcarinaSongInfo;
struct OcarinaNote;
extern u8 gChannelsPerBank[4][7];
extern u8* gFrogsSongPtr;
@ -9,7 +13,6 @@ extern OcarinaNote* gScarecrowCustomSongPtr;
extern u8* gScarecrowSpawnSongPtr;
extern u8 gUsedChannelsPerBank[4][7];
#ifdef INTERNAL_SRC_CODE_CODE_800EC960_C
void AudioDebug_ScrPrt(const s8* str, u16 num);
void Audio_ClearSariaBgm(void);
void Audio_ClearSariaBgm2(void);
@ -84,79 +87,3 @@ void func_800F6D58(u8, u8, u8);
void func_800F6FB4(u8);
void func_800F7170(void);
void func_800F71BC(s32 arg0);
#else
void AudioDebug_ScrPrt(const s8* str, u16 num);
void Audio_ClearSariaBgm(void);
void Audio_ClearSariaBgm2(void);
void Audio_ClearSariaBgmAtPos(struct Vec3f* pos);
void Audio_Init(void);
void Audio_InitSound(void);
struct OcarinaStaff* Audio_OcaGetDisplayingStaff(void);
struct OcarinaStaff* Audio_OcaGetPlayingStaff(void);
struct OcarinaStaff* Audio_OcaGetRecordingStaff(void);
s32 Audio_OcaMemoryGameGenNote(void);
void Audio_OcaMemoryGameStart(u8 minigameIdx);
void Audio_OcaSetInstrument(u8);
void Audio_OcaSetRecordingState(u8);
void Audio_OcaSetSongPlayback(s8 songIdxPlusOne, s8 playbackState);
void Audio_PlayFanfare(u16);
void Audio_PlaySariaBgm(struct Vec3f* pos, u16 seqId, u16 distMax);
void Audio_PlaySoundIfNotInCutscene(u16 sfxId);
void Audio_PlaySoundIncreasinglyTransposed(struct Vec3f* pos, s16 sfxId, u8* semitones);
void Audio_PlaySoundRandom(struct Vec3f* pos, u16 baseSfxId, u8 randLim);
void Audio_PlaySoundRiver(struct Vec3f* pos, f32 freqScale);
void Audio_PlaySoundTransposed(struct Vec3f* pos, u16 sfxId, s8 semitone);
void Audio_PlaySoundWaterfall(struct Vec3f* pos, f32 freqScale);
void Audio_PreNMI(void);
void Audio_ResetIncreasingTranspose(void);
void Audio_SetBaseFilter(u8);
void Audio_SetBgmEnemyVolume(f32 dist);
void Audio_SetCodeReverb(s8 reverb);
void Audio_SetCutsceneFlag(s8 flag);
void Audio_SetEnvReverb(s8 reverb);
void Audio_SetExtraFilter(u8);
void Audio_SetSequenceMode(u8 seqMode);
void Audio_SetSoundProperties(u8 bankId, u8 entryIdx, u8 channelIdx);
void func_800ECC04(u16);
void func_800EE824(void);
void func_800F3054(void);
void func_800F3F3C(u8);
void func_800F4010(struct Vec3f* pos, u16 sfxId, f32);
void func_800F4138(struct Vec3f* pos, u16 sfxId, f32);
void func_800F4190(struct Vec3f* pos, u16 sfxId);
void func_800F4254(struct Vec3f* pos, u8 arg1);
void func_800F436C(struct Vec3f*, u16 sfxId, f32 arg2);
void func_800F4414(struct Vec3f*, u16 sfxId, f32 arg2);
void func_800F44EC(s8 arg0, s8 arg1);
void func_800F4524(struct Vec3f* pos, u16 sfxId, s8 arg2);
void func_800F47BC(void);
void func_800F47FC(void);
void func_800F483C(u8 targetVol, u8 volFadeTimer);
void func_800F4870(u8);
void func_800F4A54(u8);
void func_800F4C58(struct Vec3f* pos, u16 sfxId, u8);
void func_800F4E30(struct Vec3f* pos, f32);
void func_800F5510(u16 seqId);
void func_800F5550(u16 seqId);
void func_800F5718(void);
void func_800F574C(f32 arg0, u8 arg2);
void func_800F5918(void);
void func_800F595C(u16);
void func_800F59E8(u16);
s32 func_800F5A58(u8);
void func_800F5ACC(u16 bgmID);
void func_800F5B58(void);
void func_800F5BF0(u8 arg0);
void func_800F5C2C(void);
void func_800F5E18(u8 playerIdx, u16 seqId, u8 fadeTimer, s8 arg3, s8 arg4);
void func_800F6268(f32 dist, u16);
void func_800F64E0(u8 arg0);
void func_800F6584(u8 arg0);
void func_800F6700(s8 outputMode);
void func_800F6964(u16);
void func_800F6AB0(u16);
void func_800F6D58(u8, u8, u8);
void func_800F6FB4(u8);
void func_800F7170(void);
void func_800F71BC(s32 arg0);
#endif

View File

@ -1,4 +1,9 @@
#pragma once
struct Vec3f;
struct unk_D_8016E750;
struct ActiveSound;
struct AudioContext;
struct SoundBankEntry;
extern char D_80133390[];
extern char D_80133398[];
@ -19,7 +24,6 @@ extern u8 gSoundBankMuted[];
extern SoundBankEntry* gSoundBanks[7];
extern u32 sAudioSeqCmds[0x100];
#ifdef INTERNAL_SRC_CODE_CODE_800F7260_C
void Audio_ChooseActiveSounds(u8 bankId);
void Audio_ClearBGMMute(u8 channelIdx);
u8 Audio_IsSfxPlaying(u32 sfxId);
@ -38,23 +42,3 @@ void Audio_StopSfxByPosAndId(Vec3f* pos, u16 sfxId);
void Audio_StopSfxByTokenAndId(u8, u16);
void func_800F8884(u8, Vec3f*);
void func_800F8F88(void);
#else
void Audio_ChooseActiveSounds(u8 bankId);
void Audio_ClearBGMMute(u8 channelIdx);
u8 Audio_IsSfxPlaying(u32 sfxId);
void Audio_PlayActiveSounds(u8 bankId);
void Audio_PlaySoundGeneral(u16 sfxId, struct Vec3f* pos, u8 token, f32* freqScale, f32* a4, s8* reverbAdd);
void Audio_ProcessSoundRequest(void);
void Audio_ProcessSoundRequests(void);
void Audio_QueueSeqCmdMute(u8 channelIdx);
void Audio_ResetSounds(void);
void Audio_SetSoundBanksMute(u16 muteMask);
void Audio_StopSfxByBank(u8 bankId);
void Audio_StopSfxById(u32 sfxId);
void Audio_StopSfxByPos(struct Vec3f*);
void Audio_StopSfxByPosAndBank(u8, struct Vec3f*);
void Audio_StopSfxByPosAndId(struct Vec3f* pos, u16 sfxId);
void Audio_StopSfxByTokenAndId(u8, u16);
void func_800F8884(u8, struct Vec3f*);
void func_800F8F88(void);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800F9280_C
void Audio_ProcessSeqCmd(u32);
void Audio_ProcessSeqCmds(void);
void Audio_QueueSeqCmd(u32 bgmID);
@ -14,19 +14,3 @@ void func_800FA3DC(void);
u8 func_800FAD34(void);
void func_800FADF8(void);
void func_800FAEB4(void);
#else
void Audio_ProcessSeqCmd(u32);
void Audio_ProcessSeqCmds(void);
void Audio_QueueSeqCmd(u32 bgmID);
void Audio_SetVolScale(u8 playerIdx, u8 scaleIdx, u8 targetVol, u8 volFadeTimer);
void func_800F9280(u8 playerIdx, u8 seqId, u8 arg2, u16 fadeTimer);
void func_800F9474(u8, u16);
u16 func_800FA0B4(u8 a0);
s32 func_800FA11C(u32 arg0, u32 arg1);
void func_800FA174(u8);
void func_800FA18C(u8, u8);
void func_800FA3DC(void);
u8 func_800FAD34(void);
void func_800FADF8(void);
void func_800FAEB4(void);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800FBCE0_C
void func_800FBCE0();
void func_800FBFD8(void);
#else
void func_800FBCE0(void);
void func_800FBFD8(void);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800FC620_C
s32 Overlay_Load(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddress);
s32 Overlay_Load(Pointer vRomStart, Pointer vRomEnd, Pointer vRamStart, Pointer vRamEnd, Pointer allocatedVRamAddress);
void SystemHeap_Init(void* start, u32 size);
#else
s32 Overlay_Load(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd, void* allocatedVRamAddress);
void SystemHeap_Init(void* start, u32 size);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800FCE80_C
f32 Math_FAcosF(f32 x);
f32 Math_FAsinF(f32 x);
f32 Math_FAtan2F(f32 y, f32 x);
@ -10,15 +10,3 @@ f32 Math_FNearbyIntF(f32 x);
f32 Math_FRoundF(f32 x);
f32 Math_FTanF(f32 x);
f32 Math_FTruncF(f32 x);
#else
f32 Math_FAcosF(f32 x);
f32 Math_FAsinF(f32 x);
f32 Math_FAtan2F(f32 y, f32 x);
f32 Math_FAtanF(f32 x);
f32 Math_FCeilF(f32 x);
f32 Math_FFloorF(f32 x);
f32 Math_FNearbyIntF(f32 x);
f32 Math_FRoundF(f32 x);
f32 Math_FTanF(f32 x);
f32 Math_FTruncF(f32 x);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_800FD970_C
f32 Rand_Centered(void);
f32 Rand_Centered_Variable(u32* rndNum);
u32 Rand_Next(void);
@ -8,13 +8,3 @@ void Rand_Seed(u32 seed);
void Rand_Seed_Variable(u32* rndNum, u32 seed);
f32 Rand_ZeroOne(void);
f32 Rand_ZeroOne_Variable(u32* rndNum);
#else
f32 Rand_Centered(void);
f32 Rand_Centered_Variable(u32* rndNum);
u32 Rand_Next(void);
u32 Rand_Next_Variable(u32* rndNum);
void Rand_Seed(u32 seed);
void Rand_Seed_Variable(u32* rndNum, u32 seed);
f32 Rand_ZeroOne(void);
f32 Rand_ZeroOne_Variable(u32* rndNum);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_80106860_C
void* z_memset(void* ptr, s32 val, size_t size);
#else
void* z_memset(void* ptr, s32 val, size_t size);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_CODE_801068B0_C
void* func_801068B0(void* dst, void* src, size_t size);
#else
void* func_801068B0(void* dst, void* src, size_t size);
#endif

View File

@ -1,8 +1,10 @@
#pragma once
struct OSPfs;
struct __OSPackId;
struct __OSInode;
extern u8 __osPfsInodeCacheBank;
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTPFS_C
s32 __osCheckId(OSPfs* pfs);
s32 __osCheckPackId(OSPfs* pfs, __OSPackId* check);
s32 __osGetId(OSPfs* pfs);
@ -10,12 +12,3 @@ s32 __osIdCheckSum(u16* ptr, u16* csum, u16* icsum);
s32 __osPfsRWInode(OSPfs* pfs, __OSInode* inode, u8 flag, u8 bank);
s32 __osRepairPackId(OSPfs* pfs, __OSPackId* badid, __OSPackId* newid);
u16 __osSumcalc(u8* ptr, s32 length);
#else
s32 __osCheckId(struct OSPfs* pfs);
s32 __osCheckPackId(struct OSPfs* pfs, struct __OSPackId* check);
s32 __osGetId(struct OSPfs* pfs);
s32 __osIdCheckSum(u16* ptr, u16* csum, u16* icsum);
s32 __osPfsRWInode(struct OSPfs* pfs, struct __OSInode* inode, u8 flag, u8 bank);
s32 __osRepairPackId(struct OSPfs* pfs, struct __OSPackId* badid, struct __OSPackId* newid);
u16 __osSumcalc(u8* ptr, s32 length);
#endif

View File

@ -1,8 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTQUERY_C
struct OSContStatus;
struct OSMesgQueue;
void osContGetQuery(OSContStatus* data);
s32 osContStartQuery(OSMesgQueue* mq);
#else
void osContGetQuery(struct OSContStatus* data);
s32 osContStartQuery(struct OSMesgQueue* mq);
#endif

View File

@ -1,9 +1,6 @@
#pragma once
struct OSMesgQueue;
extern s32 __osPfsLastChannel;
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTRAMREAD_C
s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
#else
s32 __osContRamRead(struct OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTRAMWRITE_C
struct OSMesgQueue;
s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
#else
s32 __osContRamWrite(struct OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32 force);
#endif

View File

@ -1,10 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTREADDATA_C
struct OSContPad;
struct OSMesgQueue;
void __osPackReadData(void);
void osContGetReadData(OSContPad* pad);
s32 osContStartReadData(OSMesgQueue* mq);
#else
void __osPackReadData(void);
void osContGetReadData(struct OSContPad* pad);
s32 osContStartReadData(struct OSMesgQueue* mq);
#endif

View File

@ -1,15 +1,12 @@
#pragma once
struct OSContStatus;
struct OSMesgQueue;
struct OSPifRam;
extern u8 __osContLastPoll;
extern u8 __osMaxControllers;
extern OSPifRam __osPifInternalBuff;
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTROLLER_C
void __osContGetInitData(u8* ctl_present_bitfield, OSContStatus* status);
void __osPackRequestData(u8 poll);
s32 osContInit(OSMesgQueue* mq, u8* ctl_present_bitfield, OSContStatus* status);
#else
void __osContGetInitData(u8* ctl_present_bitfield, struct OSContStatus* status);
void __osPackRequestData(u8 poll);
s32 osContInit(struct OSMesgQueue* mq, u8* ctl_present_bitfield, struct OSContStatus* status);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CONTSETCH_C
s32 osContSetCh(u8 ch);
#else
s32 osContSetCh(u8 ch);
#endif

View File

@ -1,6 +1,2 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_COSF_C
f32 cosf(f32);
#else
f32 cosf(f32);
#endif
#include <math.h>

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_COSS_C
s16 coss(u16);
#else
s16 coss(u16);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_CRC_C
u8 __osContAddressCrc(u16 addr);
u8 __osContDataCrc(u8* data);
#else
u8 __osContAddressCrc(u16 addr);
u8 __osContDataCrc(u8* data);
#endif

View File

@ -1,12 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_DB_CAMERA_C
struct DbCamera;
struct Camera;
void DbCamera_Init(DbCamera* dbCamera, Camera* cameraPtr);
void DbCamera_Reset(Camera* cam, DbCamera* dbCam);
void DbCamera_Update(DbCamera* dbCamera, Camera* cam);
void DbgCamera_Enable(DbCamera* dbCamera, Camera* cam);
#else
void DbCamera_Init(struct DbCamera* dbCamera, struct Camera* cameraPtr);
void DbCamera_Reset(struct Camera* cam, struct DbCamera* dbCam);
void DbCamera_Update(struct DbCamera* dbCamera, struct Camera* cam);
void DbgCamera_Enable(struct DbCamera* dbCamera, struct Camera* cam);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_DEBUG_MALLOC_C
void* DebugArena_Calloc(u32 num, u32 size);
void DebugArena_Check(void);
void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
@ -16,21 +16,3 @@ void* DebugArena_MallocR(u32 size);
void* DebugArena_MallocRDebug(u32 size, const char* file, s32 line);
void* DebugArena_Realloc(void* ptr, u32 newSize);
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
#else
void* DebugArena_Calloc(u32 num, u32 size);
void DebugArena_Check(void);
void DebugArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
void DebugArena_Cleanup(void);
void DebugArena_Display(void);
void DebugArena_Free(void* ptr);
void DebugArena_FreeDebug(void* ptr, const char* file, s32 line);
void DebugArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
void DebugArena_Init(void* start, u32 size);
u8 DebugArena_IsInitalized(void);
void* DebugArena_Malloc(u32 size);
void* DebugArena_MallocDebug(u32 size, const char* file, s32 line);
void* DebugArena_MallocR(u32 size);
void* DebugArena_MallocRDebug(u32 size, const char* file, s32 line);
void* DebugArena_Realloc(void* ptr, u32 newSize);
void* DebugArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_DEVMGR_C
void __osDevMgrMain(void* arg);
#else
void __osDevMgrMain(void* arg);
#endif

View File

@ -1,3 +1,4 @@
#pragma once
struct DmaEntry;
extern DmaEntry gDmaDataTable[0x60C];

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_DPGETSTAT_C
u32 osDpGetStatus(void);
#else
u32 osDpGetStatus(void);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_DPSETSTAT_C
void osDpSetStatus(u32 status);
#else
void osDpSetStatus(u32 status);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_DRIVEROMINIT_C
struct OSPiHandle;
OSPiHandle* osDriveRomInit(void);
#else
struct OSPiHandle* osDriveRomInit(void);
#endif

View File

@ -1,6 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_EPIDMA_C
struct OSPiHandle;
struct OSIoMesg;
s32 osEPiStartDma(OSPiHandle* handle, OSIoMesg* mb, s32 direction);
#else
s32 osEPiStartDma(struct OSPiHandle* handle, struct OSIoMesg* mb, s32 direction);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_EPIRAWDMA_C
struct OSPiHandle;
s32 __osEPiRawStartDma(OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
#else
s32 __osEPiRawStartDma(struct OSPiHandle* handle, s32 direction, u32 cartAddr, void* dramAddr, size_t size);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_EPIRAWREAD_C
struct OSPiHandle;
s32 __osEPiRawReadIo(OSPiHandle* handle, u32 devAddr, u32* data);
#else
s32 __osEPiRawReadIo(struct OSPiHandle* handle, u32 devAddr, u32* data);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_EPIWRITE_C
struct OSPiHandle;
s32 osEPiWriteIo(OSPiHandle* handle, u32 devAddr, u32 data);
#else
s32 osEPiWriteIo(struct OSPiHandle* handle, u32 devAddr, u32 data);
#endif

View File

@ -1,8 +1,13 @@
#pragma once
struct FaultAddrConvClient;
struct FaultClient;
struct OSThread;
struct Input;
struct FaultClientContext;
struct FaultThreadStruct;
extern FaultThreadStruct gFaultStruct;
#ifdef INTERNAL_SRC_CODE_FAULT_C
void Fault_AddAddrConvClient(FaultAddrConvClient*, void*, void*);
void Fault_AddClient(FaultClient*, void*, void*, void*);
void Fault_AddHungupAndCrash(const char*, u32);
@ -45,47 +50,3 @@ void Fault_WaitForButtonCombo();
void Fault_WaitForInput();
u32 Fault_WaitForInputImpl();
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32* raPtr);
#else
void Fault_AddAddrConvClient(struct FaultAddrConvClient*, void*, void*);
void Fault_AddClient(struct FaultClient*, void*, void*, void*);
void Fault_AddHungupAndCrash(const char*, u32);
void Fault_AddHungupAndCrashImpl(const char*, const char*);
void Fault_ClientProcessThread(void* arg);
void Fault_CommitFB(void);
u32 Fault_ConvertAddress(struct FaultAddrConvClient*);
void Fault_DrawCornerRec(u16);
void Fault_DrawMemDump(u32, u32, u32, u32);
void Fault_DrawMemDumpPage(const char*, u32*, u32);
void Fault_DrawRec(s32, s32, s32, s32, u16);
void Fault_DrawStackTrace(struct OSThread* thread, s32 x, s32 y, s32 height);
void Fault_FillScreenBlack(void);
void Fault_FillScreenRed(void);
struct OSThread* Fault_FindFaultedThread(void);
void Fault_HangupFaultClient(const char*, const char*);
void Fault_Init(void);
void Fault_LogFPCR(u32);
void Fault_LogFReg(s32, f32*);
void Fault_LogStackTrace(struct OSThread* thread, s32 height);
void Fault_LogThreadContext(struct OSThread*);
void Fault_PadCallback(struct Input*);
void Fault_PrintFPCR(u32);
void Fault_PrintFReg(s32, f32*);
void Fault_PrintThreadContext(struct OSThread*);
u32 Fault_ProcessClient(u32, u32, u32);
void Fault_ProcessClientContext(struct FaultClientContext*);
void Fault_ProcessClients(void);
void Fault_RemoveAddrConvClient(struct FaultAddrConvClient*);
void Fault_RemoveClient(struct FaultClient*);
void Fault_ResumeThread(struct OSThread*);
void Fault_SetFB(void*, u16, u16);
void Fault_Sleep(u32);
void Fault_SleepImpl(u32);
void Fault_ThreadEntry(void*);
void Fault_UpdatePad(void);
void Fault_UpdatePadImpl(void);
void Fault_Wait5Seconds(void);
void Fault_WaitForButtonCombo(void);
void Fault_WaitForInput(void);
u32 Fault_WaitForInputImpl(void);
void Fault_WalkStack(u32* spPtr, u32* pcPtr, u32* raPtr);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_FAULT_DRAWER_C
s32 FaultDrawer_ColorToPrintColor(u16);
void FaultDrawer_DrawChar(char);
void FaultDrawer_DrawRecImpl(s32, s32, s32, s32, u16);
@ -14,25 +14,7 @@ void FaultDrawer_SetDefault();
void FaultDrawer_SetDrawerFB(void*, u16, u16);
void FaultDrawer_SetFontColor(u16);
void FaultDrawer_SetForeColor(u16);
void FaultDrawer_SetInputCallback(void (*)());
void FaultDrawer_SetOsSyncPrintfEnabled(u32);
void FaultDrawer_UpdatePrintColor();
void FaultDrawer_VPrintf(const char*, char*);
#else
s32 FaultDrawer_ColorToPrintColor(u16);
void FaultDrawer_DrawChar(char);
void FaultDrawer_DrawRecImpl(s32, s32, s32, s32, u16);
void FaultDrawer_DrawText(s32, s32, const char*, ...);
void FaultDrawer_FillScreen(void);
void* FaultDrawer_FormatStringFunc(void*, const char*, u32);
void FaultDrawer_Printf(const char*, ...);
void FaultDrawer_SetBackColor(u16);
void FaultDrawer_SetCharPad(s8, s8);
void FaultDrawer_SetCursor(s32, s32);
void FaultDrawer_SetDefault(void);
void FaultDrawer_SetDrawerFB(void*, u16, u16);
void FaultDrawer_SetFontColor(u16);
void FaultDrawer_SetForeColor(u16);
void FaultDrawer_SetOsSyncPrintfEnabled(u32);
void FaultDrawer_UpdatePrintColor(void);
void FaultDrawer_VPrintf(const char*, char*);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_FLG_SET_C
struct GlobalContext;
void FlagSet_Update(GlobalContext* globalCtx);
#else
void FlagSet_Update(struct GlobalContext* globalCtx);
#endif

View File

@ -1,11 +1,14 @@
#pragma once
struct GameState;
struct GraphicsContext;
struct OSViMode;
extern u32 gViConfigFeatures;
extern f32 gViConfigXScale;
extern f32 gViConfigYScale;
extern OSViMode osViModeNtscLan1;
#ifdef INTERNAL_SRC_CODE_GAME_C
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line);
void* GameState_Alloc(GameState* gameState, size_t size, const char* file, s32 line);
void GameState_Destroy(GameState* gameState);
void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx);
void GameState_DrawInputDisplay(u16 input, Gfx** gfx);
@ -19,19 +22,3 @@ void GameState_ReqPadData(GameState* gameState);
void GameState_SetFBFilter(Gfx** gfx);
void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
void GameState_Update(GameState* gameState);
#else
void* GameState_Alloc(struct GameState* gameState, size_t size, char* file, s32 line);
void GameState_Destroy(struct GameState* gameState);
void GameState_Draw(struct GameState* gameState, struct GraphicsContext* gfxCtx);
void GameState_DrawInputDisplay(u16 input, Gfx** gfx);
void GameState_FaultPrint(void);
GameStateFunc GameState_GetInit(struct GameState* gameState);
void GameState_Init(struct GameState* gameState, GameStateFunc init, struct GraphicsContext* gfxCtx);
void GameState_InitArena(struct GameState* gameState, size_t size);
u32 GameState_IsRunning(struct GameState* gameState);
void GameState_Realloc(struct GameState* gameState, size_t size);
void GameState_ReqPadData(struct GameState* gameState);
void GameState_SetFBFilter(Gfx** gfx);
void GameState_SetFrameBuffer(struct GraphicsContext* gfxCtx);
void GameState_Update(struct GameState* gameState);
#endif

View File

@ -1,14 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_GAMEALLOC_C
void GameAlloc_Cleanup(GameAlloc* this);
void GameAlloc_Free(GameAlloc* this, void* data);
void GameAlloc_Init(GameAlloc* this);
void* GameAlloc_Malloc(GameAlloc* this, u32 size);
void* GameAlloc_MallocDebug(GameAlloc* this, u32 size, const char* file, s32 line);
#else
void GameAlloc_Cleanup(struct GameAlloc* this);
void GameAlloc_Free(struct GameAlloc* this, void* data);
void GameAlloc_Init(struct GameAlloc* this);
void* GameAlloc_Malloc(struct GameAlloc* this, u32 size);
void* GameAlloc_MallocDebug(struct GameAlloc* this, u32 size, const char* file, s32 line);
#endif
struct GameAlloc;
void GameAlloc_Cleanup(GameAlloc* pthis);
void GameAlloc_Free(GameAlloc* pthis, void* data);
void GameAlloc_Init(GameAlloc* pthis);
void* GameAlloc_Malloc(GameAlloc* pthis, u32 size);
void* GameAlloc_MallocDebug(GameAlloc* pthis, u32 size, const char* file, s32 line);

View File

@ -1,4 +1,5 @@
#pragma once
struct GfxPool;
extern GfxPool gGfxPools[2];
extern u64 gGfxSPTaskOutputBuffer[0x3000];

View File

@ -1,22 +1,12 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_GFXPRINT_C
Gfx* GfxPrint_Close(GfxPrint* this);
void GfxPrint_Destroy(GfxPrint* this);
void GfxPrint_Init(GfxPrint* this);
void GfxPrint_Open(GfxPrint* this, Gfx* dList);
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
#else
Gfx* GfxPrint_Close(struct GfxPrint* this);
void GfxPrint_Destroy(struct GfxPrint* this);
void GfxPrint_Init(struct GfxPrint* this);
void GfxPrint_Open(struct GfxPrint* this, Gfx* dList);
s32 GfxPrint_Printf(struct GfxPrint* this, const char* fmt, ...);
void GfxPrint_SetBasePosPx(struct GfxPrint* this, s32 x, s32 y);
void GfxPrint_SetColor(struct GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
void GfxPrint_SetPos(struct GfxPrint* this, s32 x, s32 y);
void GfxPrint_SetPosPx(struct GfxPrint* this, s32 x, s32 y);
#endif
struct GfxPrint;
Gfx* GfxPrint_Close(GfxPrint* pthis);
void GfxPrint_Destroy(GfxPrint* pthis);
void GfxPrint_Init(GfxPrint* pthis);
void GfxPrint_Open(GfxPrint* pthis, Gfx* dList);
s32 GfxPrint_Printf(GfxPrint* pthis, const char* fmt, ...);
void GfxPrint_SetBasePosPx(GfxPrint* pthis, s32 x, s32 y);
void GfxPrint_SetColor(GfxPrint* pthis, u32 r, u32 g, u32 b, u32 a);
void GfxPrint_SetPos(GfxPrint* pthis, s32 x, s32 y);
void GfxPrint_SetPosPx(GfxPrint* pthis, s32 x, s32 y);

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_GRAPH_C
struct GraphicsContext;
struct GameState;
struct GameStateOverlay;
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
Gfx* Graph_BranchDlist(Gfx* gfx, Gfx* dst);
@ -16,21 +19,3 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx);
void Graph_ThreadEntry(void*);
void Graph_UCodeFaultClient(Gfx* workBuf);
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState);
#else
void* Graph_Alloc(struct GraphicsContext* gfxCtx, size_t size);
void* Graph_Alloc2(struct GraphicsContext* gfxCtx, size_t size);
Gfx* Graph_BranchDlist(Gfx* gfx, Gfx* dst);
void Graph_CloseDisps(Gfx** dispRefs, struct GraphicsContext* gfxCtx, const char* file, s32 line);
void Graph_Destroy(struct GraphicsContext* gfxCtx);
void Graph_DisassembleUCode(Gfx* workBuf);
void* Graph_DlistAlloc(Gfx** gfx, u32 size);
struct GameStateOverlay* Graph_GetNextGameState(struct GameState* gameState);
Gfx* Graph_GfxPlusOne(Gfx* gfx);
void Graph_Init(struct GraphicsContext* gfxCtx);
void Graph_InitTHGA(struct GraphicsContext* gfxCtx);
void Graph_OpenDisps(Gfx** dispRefs, struct GraphicsContext* gfxCtx, const char* file, s32 line);
void Graph_TaskSet00(struct GraphicsContext* gfxCtx);
void Graph_ThreadEntry(void*);
void Graph_UCodeFaultClient(Gfx* workBuf);
void Graph_Update(struct GraphicsContext* gfxCtx, struct GameState* gameState);
#endif

View File

@ -1,4 +1,6 @@
#pragma once
struct OSMesgQueue;
struct OSViMode;
extern s8 D_80009430;
extern u8 D_80013960;
@ -10,10 +12,5 @@ extern vu8 gViConfigUseDefault;
extern f32 gViConfigXScale;
extern f32 gViConfigYScale;
#ifdef INTERNAL_SRC_BOOT_IDLE_C
void Idle_ThreadEntry(void* arg);
void Main_ThreadEntry(void* arg);
#else
void Idle_ThreadEntry(void* arg);
void Main_ThreadEntry(void* arg);
#endif

View File

@ -1,32 +1,20 @@
#pragma once
struct IrqMgr;
struct IrqMgrClient;
struct OSMesgQueue;
extern vu32 gIrqMgrResetStatus;
extern volatile OSTime gIrqMgrRetraceTime;
#ifdef INTERNAL_SRC_CODE_IRQMGR_C
void IrqMgr_AddClient(IrqMgr* this, IrqMgrClient* c, OSMesgQueue* msgQ);
void IrqMgr_AddClient(IrqMgr* pthis, IrqMgrClient* c, OSMesgQueue* msgQ);
void IrqMgr_CheckStack();
void IrqMgr_HandlePRENMI450(IrqMgr* this);
void IrqMgr_HandlePRENMI480(IrqMgr* this);
void IrqMgr_HandlePRENMI500(IrqMgr* this);
void IrqMgr_HandlePreNMI(IrqMgr* this);
void IrqMgr_HandleRetrace(IrqMgr* this);
void IrqMgr_Init(IrqMgr* this, void* stack, OSPri pri, u8 retraceCount);
void IrqMgr_JamMesgForClient(IrqMgr* this, OSMesg msg);
void IrqMgr_RemoveClient(IrqMgr* this, IrqMgrClient* c);
void IrqMgr_SendMesgForClient(IrqMgr* this, OSMesg msg);
void IrqMgr_HandlePRENMI450(IrqMgr* pthis);
void IrqMgr_HandlePRENMI480(IrqMgr* pthis);
void IrqMgr_HandlePRENMI500(IrqMgr* pthis);
void IrqMgr_HandlePreNMI(IrqMgr* pthis);
void IrqMgr_HandleRetrace(IrqMgr* pthis);
void IrqMgr_Init(IrqMgr* pthis, void* stack, OSPri pri, u8 retraceCount);
void IrqMgr_JamMesgForClient(IrqMgr* pthis, OSMesg msg);
void IrqMgr_RemoveClient(IrqMgr* pthis, IrqMgrClient* c);
void IrqMgr_SendMesgForClient(IrqMgr* pthis, OSMesg msg);
void IrqMgr_ThreadEntry(void* arg0);
#else
void IrqMgr_AddClient(struct IrqMgr* this, struct IrqMgrClient* c, struct OSMesgQueue* msgQ);
void IrqMgr_CheckStack(void);
void IrqMgr_HandlePRENMI450(struct IrqMgr* this);
void IrqMgr_HandlePRENMI480(struct IrqMgr* this);
void IrqMgr_HandlePRENMI500(struct IrqMgr* this);
void IrqMgr_HandlePreNMI(struct IrqMgr* this);
void IrqMgr_HandleRetrace(struct IrqMgr* this);
void IrqMgr_Init(struct IrqMgr* this, void* stack, OSPri pri, u8 retraceCount);
void IrqMgr_JamMesgForClient(struct IrqMgr* this, OSMesg msg);
void IrqMgr_RemoveClient(struct IrqMgr* this, struct IrqMgrClient* c);
void IrqMgr_SendMesgForClient(struct IrqMgr* this, OSMesg msg);
void IrqMgr_ThreadEntry(void* arg0);
#endif

View File

@ -1,12 +1,9 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_JPEGDECODER_C
struct JpegDecoder;
struct JpegDecoderState;
struct JpegHuffmanTable;
s32 JpegDecoder_Decode(JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, JpegDecoderState* state);
s32 JpegDecoder_ParseNextSymbol(JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
s32 JpegDecoder_ProcessMcu(JpegHuffmanTable* hTable0, JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
u16 JpegDecoder_ReadBits(u8 len);
#else
s32 JpegDecoder_Decode(struct JpegDecoder* decoder, u16* mcuBuff, s32 count, u8 isFollowing, struct JpegDecoderState* state);
s32 JpegDecoder_ParseNextSymbol(struct JpegHuffmanTable* hTable, s16* outCoeff, s8* outZeroCount);
s32 JpegDecoder_ProcessMcu(struct JpegHuffmanTable* hTable0, struct JpegHuffmanTable* hTable1, u16* mcu, s16* unk);
u16 JpegDecoder_ReadBits(u8 len);
#endif

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_JPEGUTILS_C
struct JpegHuffmanTable;
struct JpegHuffmanTableOld;
struct JpegQuantizationTable;
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths);
u32 JpegUtils_ProcessHuffmanTable(u8* dht, JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
@ -8,13 +11,3 @@ u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, JpegHuffmanTableOld* ht, u8* c
void JpegUtils_ProcessQuantizationTable(u8* dqt, JpegQuantizationTable* qt, u8 count);
s32 JpegUtils_SetHuffmanTable(u8* data, JpegHuffmanTable* ht, u16* codes);
void JpegUtils_SetHuffmanTableOld(u8* data, JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
#else
s32 JpegUtils_GetHuffmanCodes(u8* codesLengths, u16* codes);
s32 JpegUtils_ParseHuffmanCodesLengths(u8* ptr, u8* codesLengths);
u32 JpegUtils_ProcessHuffmanTable(u8* dht, struct JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 count);
u32 JpegUtils_ProcessHuffmanTableImpl(u8* data, struct JpegHuffmanTable* ht, u8* codesLengths, u16* codes, u8 isAc);
u32 JpegUtils_ProcessHuffmanTableImplOld(u8* dht, struct JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes);
void JpegUtils_ProcessQuantizationTable(u8* dqt, struct JpegQuantizationTable* qt, u8 count);
s32 JpegUtils_SetHuffmanTable(u8* data, struct JpegHuffmanTable* ht, u16* codes);
void JpegUtils_SetHuffmanTableOld(u8* data, struct JpegHuffmanTableOld* ht, u8* codesLengths, u16* codes, s16 count, u8 isAc);
#endif

View File

@ -1,12 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_LISTALLOC_C
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
void ListAlloc_Free(ListAlloc* this, void* data);
void ListAlloc_FreeAll(ListAlloc* this);
ListAlloc* ListAlloc_Init(ListAlloc* this);
#else
void* ListAlloc_Alloc(struct ListAlloc* this, u32 size);
void ListAlloc_Free(struct ListAlloc* this, void* data);
void ListAlloc_FreeAll(struct ListAlloc* this);
struct ListAlloc* ListAlloc_Init(struct ListAlloc* this);
#endif
struct ListAlloc;
void* ListAlloc_Alloc(ListAlloc* pthis, u32 size);
void ListAlloc_Free(ListAlloc* pthis, void* data);
void ListAlloc_FreeAll(ListAlloc* pthis);
ListAlloc* ListAlloc_Init(ListAlloc* pthis);

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_BOOT_LOGUTILS_C
void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, s32 line);
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min, const char* maxName, f32 max);
s32 LogUtils_CheckIntRange(const char* exp, s32 line, const char* valueName, s32 value, const char* minName, s32 min, const char* maxName, s32 max);
@ -10,15 +10,3 @@ void LogUtils_LogHexDump(void* ptr, s32 size0);
void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, s32 line);
void LogUtils_LogThreadId(const char* name, s32 line);
void LogUtils_ResetHungup(void);
#else
void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, s32 line);
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min, const char* maxName, f32 max);
s32 LogUtils_CheckIntRange(const char* exp, s32 line, const char* valueName, s32 value, const char* minName, s32 min, const char* maxName, s32 max);
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, s32 line);
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s32 line);
void LogUtils_HungupThread(const char* name, s32 line);
void LogUtils_LogHexDump(void* ptr, s32 size0);
void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, s32 line);
void LogUtils_LogThreadId(const char* name, s32 line);
void LogUtils_ResetHungup(void);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_LOOKAT_C
void guLookAt(Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
#else
void guLookAt(struct Mtx*, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp);
#endif

View File

@ -1,8 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_LOOKATHIL_C
struct LookAt;
void guLookAtHilite(Mtx* m, LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
#else
void guLookAtHilite(struct Mtx* m, struct LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
void guLookAtHiliteF(f32 mf[4][4], struct LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, f32 xl2, f32 yl2, f32 zl2, s32 hiliteWidth, s32 hiliteHeight);
#endif

View File

@ -1,5 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_MEMPAK_C
s32 Mempak_Alloc(s32 controllerNb, char* idx, s32 size);
s32 Mempak_DeleteFile(s32 controllerNb, char idx);
s32 Mempak_FindFile(s32 controllerNb, char start, char end);
@ -8,13 +8,3 @@ s32 Mempak_GetFreeBytes(s32 controllerNb);
s32 Mempak_Init(s32 controllerNb);
s32 Mempak_Read(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
s32 Mempak_Write(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
#else
s32 Mempak_Alloc(s32 controllerNb, char* idx, s32 size);
s32 Mempak_DeleteFile(s32 controllerNb, char idx);
s32 Mempak_FindFile(s32 controllerNb, char start, char end);
s32 Mempak_GetFileSize(s32 controllerNb, char idx);
s32 Mempak_GetFreeBytes(s32 controllerNb);
s32 Mempak_Init(s32 controllerNb);
s32 Mempak_Read(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
s32 Mempak_Write(s32 controllerNb, char idx, void* buffer, s32 offset, s32 size);
#endif

View File

@ -1,12 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_MTXF2L_C
void guMtxF2L(MtxF* m1, Mtx* m2);
void guMtxIdent(Mtx*);
void guMtxIdentF(f32 mf[4][4]);
void guMtxL2F(MtxF* m1, Mtx* m2);
#else
void guMtxF2L(MtxF* m1, struct Mtx* m2);
void guMtxIdent(struct Mtx*);
void guMtxIdentF(f32 mf[4][4]);
void guMtxL2F(MtxF* m1, struct Mtx* m2);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_MTXUTY_CVT_C
void MtxConv_F2L(Mtx* m1, MtxF* m2);
#else
void MtxConv_F2L(struct Mtx* m1, MtxF* m2);
#endif

View File

@ -1,6 +1,3 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_NORMALIZE_C
void guNormalize(f32* x, f32* y, f32* z);
#else
void guNormalize(f32* x, f32* y, f32* z);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_ORTHO_C
void guOrtho(Mtx*, f32, f32, f32, f32, f32, f32, f32);
void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
#else
void guOrtho(struct Mtx*, f32, f32, f32, f32, f32, f32, f32);
void guOrthoF(f32[4][4], f32, f32, f32, f32, f32, f32, f32);
#endif

View File

@ -1,5 +1,8 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_PADMGR_C
struct PadMgr;
struct OSMesgQueue;
struct IrqMgr;
void PadMgr_HandlePreNMI(PadMgr* padmgr);
void PadMgr_HandleRetraceMsg(PadMgr* padmgr);
void PadMgr_Init(PadMgr* padmgr, OSMesgQueue* siIntMsgQ, IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
@ -12,17 +15,3 @@ void PadMgr_RumbleSet(PadMgr* padmgr, u8* ctrlrRumbles);
void PadMgr_RumbleStop(PadMgr* padmgr);
void PadMgr_UnlockPadData(PadMgr* padmgr);
void PadMgr_UnlockSerialMesgQueue(PadMgr* padmgr, OSMesgQueue* ctrlrqueue);
#else
void PadMgr_HandlePreNMI(struct PadMgr* padmgr);
void PadMgr_HandleRetraceMsg(struct PadMgr* padmgr);
void PadMgr_Init(struct PadMgr* padmgr, struct OSMesgQueue* siIntMsgQ, struct IrqMgr* irqMgr, OSId id, OSPri priority, void* stack);
void PadMgr_LockPadData(struct PadMgr* padmgr);
struct OSMesgQueue* PadMgr_LockSerialMesgQueue(struct PadMgr* padmgr);
void PadMgr_ProcessInputs(struct PadMgr* padmgr);
void PadMgr_RumbleControl(struct PadMgr* padmgr);
void PadMgr_RumbleReset(struct PadMgr* padmgr);
void PadMgr_RumbleSet(struct PadMgr* padmgr, u8* ctrlrRumbles);
void PadMgr_RumbleStop(struct PadMgr* padmgr);
void PadMgr_UnlockPadData(struct PadMgr* padmgr);
void PadMgr_UnlockSerialMesgQueue(struct PadMgr* padmgr, struct OSMesgQueue* ctrlrqueue);
#endif

View File

@ -1,6 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_PADSETUP_C
struct OSMesgQueue;
struct OSContStatus;
s32 PadSetup_Init(OSMesgQueue* mq, u8* outMask, OSContStatus* status);
#else
s32 PadSetup_Init(struct OSMesgQueue* mq, u8* outMask, struct OSContStatus* status);
#endif

View File

@ -1,5 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_CODE_PADUTILS_C
struct Input;
u32 PadUtils_CheckCur(Input* input, u16 key);
u32 PadUtils_CheckCurExact(Input* input, u16 value);
u32 PadUtils_CheckPressed(Input* input, u16 key);
@ -17,22 +18,3 @@ void PadUtils_ResetPressRel(Input* input);
void PadUtils_SetRelXY(Input* input, s32 x, s32 y);
void PadUtils_UpdateRelXY(Input* input);
void func_800FCB70(void);
#else
u32 PadUtils_CheckCur(struct Input* input, u16 key);
u32 PadUtils_CheckCurExact(struct Input* input, u16 value);
u32 PadUtils_CheckPressed(struct Input* input, u16 key);
u32 PadUtils_CheckReleased(struct Input* input, u16 key);
u16 PadUtils_GetCurButton(struct Input* input);
s8 PadUtils_GetCurX(struct Input* input);
s8 PadUtils_GetCurY(struct Input* input);
u16 PadUtils_GetPressButton(struct Input* input);
s8 PadUtils_GetRelX(struct Input* input);
s8 PadUtils_GetRelXImpl(struct Input* input);
s8 PadUtils_GetRelY(struct Input* input);
s8 PadUtils_GetRelYImpl(struct Input* input);
void PadUtils_Init(struct Input* input);
void PadUtils_ResetPressRel(struct Input* input);
void PadUtils_SetRelXY(struct Input* input, s32 x, s32 y);
void PadUtils_UpdateRelXY(struct Input* input);
void func_800FCB70(void);
#endif

View File

@ -1,8 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_GU_PERSPECTIVE_C
void guPerspective(Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
#else
void guPerspective(struct Mtx* m, u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
void guPerspectiveF(f32 mf[4][4], u16* perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale);
#endif

View File

@ -1,8 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_PFSALLOCATEFILE_C
struct OSPfs;
struct __OSInode;
s32 __osPfsDeclearPage(OSPfs* pfs, __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, s32* finalPage);
s32 osPfsAllocateFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 length, s32* fileNo);
#else
s32 __osPfsDeclearPage(struct OSPfs* pfs, struct __OSInode* inode, s32 fileSizeInPages, s32* startPage, u8 bank, s32* decleared, s32* finalPage);
s32 osPfsAllocateFile(struct OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32 length, s32* fileNo);
#endif

View File

@ -1,10 +1,7 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_PFSCHECKER_C
struct OSPfs;
struct __OSInodeCache;
s32 func_80105788(OSPfs* pfs, __OSInodeCache* cache);
s32 func_80105A60(OSPfs* pfs, __OSInodeUnit fpage, __OSInodeCache* cache);
s32 osPfsChecker(OSPfs* pfs);
#else
s32 func_80105788(struct OSPfs* pfs, struct __OSInodeCache* cache);
s32 func_80105A60(struct OSPfs* pfs, __OSInodeUnit fpage, struct __OSInodeCache* cache);
s32 osPfsChecker(struct OSPfs* pfs);
#endif

View File

@ -1,8 +1,6 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_PFSDELETEFILE_C
struct OSPfs;
struct __OSInode;
s32 __osPfsReleasePages(OSPfs* pfs, __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
s32 osPfsDeleteFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName);
#else
s32 __osPfsReleasePages(struct OSPfs* pfs, struct __OSInode* inode, u8 initialPage, u8 bank, __OSInodeUnit* finalPage);
s32 osPfsDeleteFile(struct OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName);
#endif

View File

@ -1,6 +1,5 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_PFSFILESTATE_C
struct OSPfs;
struct OSPfsState;
s32 osPfsFileState(OSPfs* pfs, s32 fileNo, OSPfsState* state);
#else
s32 osPfsFileState(struct OSPfs* pfs, s32 fileNo, struct OSPfsState* state);
#endif

View File

@ -1,6 +1,4 @@
#pragma once
#ifdef INTERNAL_SRC_LIBULTRA_IO_PFSFINDFILE_C
struct OSPfs;
s32 osPfsFindFile(OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo);
#else
s32 osPfsFindFile(struct OSPfs* pfs, u16 companyCode, u32 gameCode, u8* gameName, u8* extName, s32* fileNo);
#endif

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