Decompile game.c

This commit is contained in:
MMDecomp
2020-06-23 10:55:11 -04:00
committed by Kenix3
parent 2d191e301a
commit 7d61d4e6ff
16 changed files with 598 additions and 83 deletions
+10 -1
View File
@@ -1,6 +1,8 @@
#ifndef _MACROS_H_
#define _MACROS_H_
#include "convert.h"
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
@@ -12,4 +14,11 @@
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
#endif
// Currently most often called ctxt in MM, TODO: Refactor names when its used
#define ACTIVE_CAM globalCtx->cameraPtrs[globalCtx->activeCamera]
#define SET_NEXT_GAMESTATE(curState, newInit, newStruct) \
(curState)->nextGameStateInit = (GameStateFunc)newInit; \
(curState)->nextGameStateSize = sizeof(newStruct);
#endif // _MACROS_H_