mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Generate gamestate overlay table with an include/tables/
header (#1504)
* Generate gamestate overlay table from an include/tables/ header * GameStateIndex -> GameStateId, move to z64.h, add GameStateId enum name field to the gamestate table, adjust and improve gamestate table comment * Shorten zeros in table definition * Generate linker symbols, other suggested changes * GAMESTATE_MAX -> GAMESTATE_ID_MAX like the others
This commit is contained in:
parent
100576edc9
commit
47ffb59f68
5 changed files with 66 additions and 38 deletions
|
@ -697,6 +697,16 @@ typedef struct {
|
|||
/* 0x10 */ GameAllocEntry* head;
|
||||
} GameAlloc; // size = 0x14
|
||||
|
||||
// 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 {
|
||||
#include "tables/gamestate_table.h"
|
||||
GAMESTATE_ID_MAX
|
||||
} GameStateId;
|
||||
#undef DEFINE_GAMESTATE
|
||||
#undef DEFINE_GAMESTATE_INTERNAL
|
||||
|
||||
struct GameState;
|
||||
|
||||
typedef void (*GameStateFunc)(struct GameState* gameState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue