summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorEllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>2021-10-12 14:25:20 +0100
committerGitHub <noreply@github.com>2021-10-12 10:25:20 -0300
commit4c43661cf34544a6ffc6817912021de5679e8f42 (patch)
tree47ffec353a34d2b77bca7f13756293e0b13e2d4c /src/code
parent94e6ebaec9b9a6949cd0e2edeb57a21a16bc388e (diff)
Decompile the GameStateOverlay table (#337)
* Decomp GameStateOverlayTable * spec * Review * gSchedContext * Format * Fix bss
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_game_dlftbls.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/code/z_game_dlftbls.c b/src/code/z_game_dlftbls.c
new file mode 100644
index 000000000..4e2590a6a
--- /dev/null
+++ b/src/code/z_game_dlftbls.c
@@ -0,0 +1,26 @@
+#include "global.h"
+#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
+#include "overlays/gamestates/ovl_file_choose/z_file_choose.h"
+#include "overlays/gamestates/ovl_opening/z_opening.h"
+#include "overlays/gamestates/ovl_select/z_select.h"
+#include "overlays/gamestates/ovl_title/z_title.h"
+
+#define GAMESTATE_OVERLAY(name, init, destroy, size) \
+ { \
+ NULL, SEGMENT_ROM_START(ovl_##name), SEGMENT_ROM_END(ovl_##name), SEGMENT_START(ovl_##name), \
+ SEGMENT_END(ovl_##name), 0, init, destroy, 0, 0, 0, size \
+ }
+#define GAMESTATE_OVERLAY_INTERNAL(init, destroy, size) \
+ { NULL, 0, 0, NULL, NULL, 0, init, destroy, 0, 0, 0, size }
+
+GameStateOverlay gGameStateOverlayTable[] = {
+ GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)),
+ GAMESTATE_OVERLAY(select, Select_Init, Select_Destroy, sizeof(SelectContext)),
+ GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)),
+ GAMESTATE_OVERLAY_INTERNAL(Play_Init, Play_Fini, sizeof(GlobalContext)),
+ GAMESTATE_OVERLAY(opening, Opening_Init, Opening_Destroy, sizeof(OpeningContext)),
+ GAMESTATE_OVERLAY(file_choose, FileChoose_Init, FileChoose_Destroy, sizeof(FileChooseContext)),
+ GAMESTATE_OVERLAY(daytelop, Daytelop_Init, Daytelop_Destroy, sizeof(DaytelopContext)),
+};
+
+s32 graphNumGameStates = ARRAY_COUNT(gGameStateOverlayTable);