1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-04-08 23:56:26 +00:00
oot/include/z_game_dlftbls.h
mzxrules cf1a39c26f
Reduce dependencies on global.h (10) (#2490)
* reduce z64.h size

* fix z_cheap_proc.inc.c

* ,bss

* remove temp delcaration
2025-02-26 17:18:30 -05:00

36 lines
1.2 KiB
C

#ifndef Z_GAME_DLFTBLS_H
#define Z_GAME_DLFTBLS_H
#include "ultra64.h"
#include "romfile.h"
typedef struct GameStateOverlay {
/* 0x00 */ void* loadedRamAddr;
/* 0x04 */ RomFile file; // if applicable
/* 0x0C */ void* vramStart; // if applicable
/* 0x10 */ void* vramEnd; // if applicable
/* 0x14 */ void* unk_14;
/* 0x18 */ void* init; // initializes and executes the given context
/* 0x1C */ void* destroy; // deconstructs the context, and sets the next context to load
/* 0x20 */ void* unk_20;
/* 0x24 */ void* unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ u32 instanceSize;
} GameStateOverlay; // size = 0x30
// Used in Graph_GetNextGameState in graph.c
#define DEFINE_GAMESTATE_INTERNAL(typeName, enumName) enumName,
#define DEFINE_GAMESTATE(typeName, enumName, name) DEFINE_GAMESTATE_INTERNAL(typeName, enumName)
typedef enum GameStateId {
#include "tables/gamestate_table.h"
GAMESTATE_ID_MAX
} GameStateId;
#undef DEFINE_GAMESTATE
#undef DEFINE_GAMESTATE_INTERNAL
extern GameStateOverlay gGameStateOverlayTable[GAMESTATE_ID_MAX];
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
#endif