Remove Variables.h; Decouple z64.h from global.h (#2507)

* progress

* z64.h issues sorted

* remove variables.h

* format

* n64 fix

* another fix

* did the wrong fix

* fix libleo

* fix bss

* review

* remove instead of comment
This commit is contained in:
fig02
2025-04-19 22:04:08 -04:00
committed by GitHub
parent 655ec77138
commit 2278bcb2c3
196 changed files with 273 additions and 218 deletions
-1
View File
@@ -1,7 +1,6 @@
#ifndef GLOBAL_H
#define GLOBAL_H
#include "variables.h"
#include "macros.h"
#include "versions.h"
-8
View File
@@ -89,14 +89,6 @@
#define PRINTF_RST() (void)0
#endif
#if DEBUG_FEATURES
#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSyncDebug(ram, vrom, size, file, line)
#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsyncDebug(req, ram, vrom, size, unk5, queue, msg, file, line)
#else
#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSync(ram, vrom, size)
#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsync(req, ram, vrom, size, unk5, queue, msg)
#endif
#if PLATFORM_N64 || DEBUG_FEATURES
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
#else
+3 -1
View File
@@ -1,8 +1,10 @@
#include "mbi.h"
#ifndef ULTRA64_GBI_H
#define ULTRA64_GBI_H
#include "mbi.h"
#include "ultratypes.h"
#ifdef GBI_DOWHILE
/* Private macro to wrap other macros in do {...} while (0) */
#define _DW(macro) do { macro } while (0)
+2
View File
@@ -1,6 +1,8 @@
#ifndef GS2DEX_H
#define GS2DEX_H
#include "ultratypes.h"
#ifdef _LANGUAGE_C_PLUS_PLUS
extern "C" {
#endif
-10
View File
@@ -1,10 +0,0 @@
#ifndef VARIABLES_H
#define VARIABLES_H
#include "z64.h"
// TODO:
// Plenty of files depend on this file to have access to z64.h.
// Fix those cases and then delete this file.
#endif
-1
View File
@@ -1256,7 +1256,6 @@ extern AudioSpec gAudioSpecs[18];
extern TempoData gTempoData;
extern AudioHeapInitSizes gAudioHeapInitSizes;
extern s16 gOcarinaSongItemMap[];
extern AudioTable gSequenceTable;
extern AudioTable gSoundFontTable;
+2 -1
View File
@@ -5,6 +5,7 @@
#include "z64math.h"
struct PlayState;
struct Actor;
typedef struct CurveInterpKnot {
/* 0x0 */ u16 flags; // Only the bottom two bits are used, although others are set in objects
@@ -56,7 +57,7 @@ void SkelCurve_Destroy(struct PlayState* play, SkelCurve* skelCurve);
void SkelCurve_SetAnim(SkelCurve* skelCurve, CurveAnimationHeader* animation, f32 arg2, f32 endFrame, f32 curFrame,
f32 playSpeed);
s32 SkelCurve_Update(struct PlayState* play, SkelCurve* skelCurve);
void SkelCurve_Draw(Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
void SkelCurve_Draw(struct Actor* actor, struct PlayState* play, SkelCurve* skelCurve, OverrideCurveLimbDraw overrideLimbDraw,
PostCurveLimbDraw postLimbDraw, s32 lod, void* data);
#endif
+8
View File
@@ -50,4 +50,12 @@ s32 DmaMgr_AudioDmaHandler(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction);
void DmaMgr_Init(void);
#if DEBUG_FEATURES
#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSyncDebug(ram, vrom, size, file, line)
#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsyncDebug(req, ram, vrom, size, unk5, queue, msg, file, line)
#else
#define DMA_REQUEST_SYNC(ram, vrom, size, file, line) DmaMgr_RequestSync(ram, vrom, size)
#define DMA_REQUEST_ASYNC(req, ram, vrom, size, unk5, queue, msg, file, line) DmaMgr_RequestAsync(req, ram, vrom, size, unk5, queue, msg)
#endif
#endif
+2
View File
@@ -203,4 +203,6 @@ void Message_Update(struct PlayState* play);
void Message_SetTables(void);
void Message_Init(struct PlayState* play);
extern s16 gOcarinaSongItemMap[];
#endif