mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-07 17:11:50 +00:00
Cleanup includes in header files (#2540)
* Cleanup includes in header files * include libc headers without libc/ prefix * fix * fix2 * fix3 * fix4 * some bss lol * bss * fix
This commit is contained in:
parent
f7073a7837
commit
6d56b1b8e0
49 changed files with 62 additions and 49 deletions
|
@ -1,8 +1,6 @@
|
|||
#ifndef ATTRIBUTES_H
|
||||
#define ATTRIBUTES_H
|
||||
|
||||
#include "versions.h"
|
||||
|
||||
#if !defined(__GNUC__) && !defined(__attribute__)
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SOUNDFONT_FILE_H
|
||||
#define SOUNDFONT_FILE_H
|
||||
|
||||
#include "libc/stdbool.h"
|
||||
#include "stdbool.h"
|
||||
#include "alignment.h"
|
||||
#include "attributes.h"
|
||||
#include "z64audio.h"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef FACE_CHANGE_H
|
||||
#define FACE_CHANGE_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
typedef struct FaceChange {
|
||||
/* 0x00 */ s16 face;
|
||||
/* 0x02 */ s16 timer;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "ultra64.h"
|
||||
#include "ultra64/gbi.h"
|
||||
#include "alignment.h"
|
||||
#include "sched.h"
|
||||
#include "thga.h"
|
||||
#include "versions.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef INFLATE_H
|
||||
#define INFLATE_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IS_DEBUG_H
|
||||
#define IS_DEBUG_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "stddef.h"
|
||||
#include "attributes.h"
|
||||
|
||||
#if DEBUG_FEATURES
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef LIBC64_SPRINTF_H
|
||||
#define LIBC64_SPRINTF_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "stdarg.h"
|
||||
|
||||
int vsprintf(char* dst, const char* fmt, va_list args);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "libu64/pad.h"
|
||||
#include "irqmgr.h"
|
||||
#include "versions.h"
|
||||
|
||||
typedef enum ControllerPakType {
|
||||
CONT_PAK_NONE,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ROMFILE_H
|
||||
#define ROMFILE_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "stdint.h"
|
||||
|
||||
typedef struct RomFile {
|
||||
/* 0x00 */ uintptr_t vromStart;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "versions.h"
|
||||
#include "z64math.h"
|
||||
#include "libc/assert.h"
|
||||
#include "assert.h"
|
||||
|
||||
#define MAX_CHANNELS_PER_BANK 3
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define THA_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "alignment.h"
|
||||
|
||||
typedef struct TwoHeadArena {
|
||||
/* 0x00 */ size_t size;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef ULTRA64_H
|
||||
#define ULTRA64_H
|
||||
|
||||
#include "libc/assert.h"
|
||||
#include "libc/math.h"
|
||||
#include "libc/stdarg.h"
|
||||
#include "libc/stdbool.h"
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "libc/stdlib.h"
|
||||
#include "libc/string.h"
|
||||
#include "assert.h"
|
||||
#include "math.h"
|
||||
#include "stdarg.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "unk.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef YAZ0_H
|
||||
#define YAZ0_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define Z64ACTOR_H
|
||||
|
||||
#include "color.h"
|
||||
#include "romfile.h"
|
||||
#include "z64actor_profile.h"
|
||||
#include "z64animation.h"
|
||||
#include "z64math.h"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef Z64_CURVE_H
|
||||
#define Z64_CURVE_H
|
||||
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "z64math.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
struct PlayState;
|
||||
struct Actor;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "ultra64/ultratypes.h"
|
||||
#include "libu64/pad.h"
|
||||
#include "gamealloc.h"
|
||||
#include "romfile.h"
|
||||
#include "tha.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "ultra64.h"
|
||||
#include "ultra64/gbi.h"
|
||||
#include "z64math.h"
|
||||
#include "color.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
struct PlayState;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include "ultra64/ultratypes.h"
|
||||
#include "ultra64/gbi.h"
|
||||
|
||||
#include "romfile.h"
|
||||
#include "z64math.h"
|
||||
#include "z64dma.h" // for RomFile
|
||||
|
||||
struct GameState;
|
||||
struct GraphicsContext;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef Z64SS_SRAM_H
|
||||
#define Z64SS_SRAM_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "stddef.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
|
||||
void SsSram_Init(s32 addr, u8 handleType, u8 handleDomain, u8 handleLatency, u8 handlePageSize, u8 handleRelDuration,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define Z64TRANSITION_H
|
||||
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "ultra64/gbi.h" // for Gfx
|
||||
#include "ultra64/gbi.h"
|
||||
#include "transition_circle.h"
|
||||
#include "transition_fade.h"
|
||||
#include "transition_triforce.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef Z_LIB_H
|
||||
#define Z_LIB_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "stddef.h"
|
||||
#include "libu64/pad.h"
|
||||
#include "z64math.h"
|
||||
#include "color.h"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define Z_LOCALE_H
|
||||
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "region.h"
|
||||
|
||||
extern s32 gCurrentRegion;
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "alignment.h"
|
||||
#include "array_count.h"
|
||||
#include "buffers.h"
|
||||
#include "z64audio.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Original Filename: system.c
|
||||
*/
|
||||
|
||||
#include "alignment.h"
|
||||
#include "array_count.h"
|
||||
#include "attributes.h"
|
||||
#include "buffers.h"
|
||||
|
|
|
@ -98,8 +98,8 @@
|
|||
#include "inflate.h"
|
||||
|
||||
#include "ultra64/ultratypes.h"
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "alignment.h"
|
||||
#include "attributes.h"
|
||||
#include "z64dma.h"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "is_debug.h"
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "versions.h"
|
||||
|
||||
typedef struct ISVDbg {
|
||||
/* 0x00 */ u32 magic; // "IS64"
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
#include "z64dma.h"
|
||||
#include "z64thread.h"
|
||||
|
||||
#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:66" \
|
||||
"pal-1.0:64 pal-1.1:64"
|
||||
#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:86" \
|
||||
"pal-1.0:84 pal-1.1:84"
|
||||
|
||||
StackEntry sDmaMgrStackInfo;
|
||||
OSMesgQueue sDmaMgrMsgQueue;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* with identical lifetime.
|
||||
*/
|
||||
#include "tha.h"
|
||||
#include "alignment.h"
|
||||
|
||||
void* THA_GetHead(TwoHeadArena* tha) {
|
||||
return tha->head;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "gfx.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "alignment.h"
|
||||
|
||||
Gfx* Gfx_Open(Gfx* gfx) {
|
||||
return gfx + 1;
|
||||
|
|
|
@ -44,7 +44,7 @@ extern struct IrqMgr gIrqMgr;
|
|||
#include "z64thread.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ique-cn:0 ntsc-1.0:34 ntsc-1.1:34 ntsc-1.2:34 pal-1.0:32 pal-1.1:32"
|
||||
"ique-cn:0 ntsc-1.0:54 ntsc-1.1:54 ntsc-1.2:54 pal-1.0:52 pal-1.1:52"
|
||||
|
||||
extern u8 _buffersSegmentEnd[];
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "z64save.h"
|
||||
#include "z64transition.h"
|
||||
|
||||
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
|
||||
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
|
||||
|
||||
ALIGNED(16) SaveContext gSaveContext;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ultra64/leo.h"
|
||||
#include "ultra64/leoappli.h"
|
||||
#include "ultra64/leodrive.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "stdint.h"
|
||||
#include "attributes.h"
|
||||
|
||||
#include "ultra64.h"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "ultra64/leo.h"
|
||||
#include "ultra64/leoappli.h"
|
||||
#include "ultra64/leodrive.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "stdint.h"
|
||||
#include "attributes.h"
|
||||
|
||||
#include "ultra64.h"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
|
||||
// WARNING: THE FOLLOWING CONSTANT MUST BE KEPT IN SYNC WITH SCALING IN MICROCODE!!!
|
||||
#define SCALE 16384
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "libc/math.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "ultra64/convert.h"
|
||||
|
||||
#define EQPOWER_LENGTH 128
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stddef.h"
|
||||
|
||||
void alFilterNew(ALFilter* f, ALCmdHandler h, ALSetParam s, s32 type) {
|
||||
f->source = NULL;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stddef.h"
|
||||
|
||||
void* alHeapDBAlloc(u8* file, s32 line, ALHeap* hp, s32 num, s32 size) {
|
||||
s32 bytes;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#ifndef __LIB_AUDIO__
|
||||
#define __LIB_AUDIO__
|
||||
|
||||
#include "libc/stdbool.h"
|
||||
#include "libc/stddef.h"
|
||||
#include "libc/stdint.h"
|
||||
#include "ultra64/ultratypes.h"
|
||||
|
||||
#include "libaudio_abi.h"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "ultra64/R4300.h"
|
||||
|
||||
#ifndef MIN
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "ultra64/convert.h"
|
||||
|
||||
Acmd* alResamplePull(void* filter, s16* outp, s32 outCnt, s32 sampleOffset, Acmd* p) {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stdbool.h"
|
||||
#include "stddef.h"
|
||||
#include "stdint.h"
|
||||
#include "ultra64/convert.h"
|
||||
|
||||
#define RANGE 2.0
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "libaudio.h"
|
||||
#include "stddef.h"
|
||||
|
||||
ALGlobals* alGlobals = NULL;
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
|
||||
ALFxRef* alSynAllocFX(ALSynth* s, s16 bus, ALSynConfig* c, ALHeap* hp) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "synthInternals.h"
|
||||
#include "libaudio.h"
|
||||
#include "stddef.h"
|
||||
|
||||
void alSynDelete(ALSynth* drvr) {
|
||||
drvr->head = NULL;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "libaudio.h"
|
||||
#include "synthInternals.h"
|
||||
#include "stddef.h"
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "libc/stddef.h"
|
||||
#include "stddef.h"
|
||||
|
||||
int strcmp(const char* s, const char* t) {
|
||||
while (*s == *t) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "libc64/aprintf.h"
|
||||
#include "attributes.h"
|
||||
#include "array_count.h"
|
||||
#include "color.h"
|
||||
|
||||
// Draws text to framebuffer
|
||||
typedef struct struct_801CA704 {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "z64audio.h"
|
||||
#include "z64thread.h"
|
||||
|
||||
#pragma increment_block_number "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
|
||||
#pragma increment_block_number "ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
|
||||
|
||||
typedef struct struct_801D9C30 {
|
||||
/* 0x000 */ s32 unk_000; // disk start
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef FILE_SELECT_H
|
||||
#define FILE_SELECT_H
|
||||
|
||||
#include "libc/stddef.h"
|
||||
#include "stddef.h"
|
||||
#include "ultra64.h"
|
||||
#include "gfx.h"
|
||||
#include "versions.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue