-
Notifications
You must be signed in to change notification settings - Fork 6
/
GameInit.c
40 lines (31 loc) · 863 Bytes
/
GameInit.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include "common-chax.h"
#include "debug-kit.h"
#include "combat-art.h"
#include "battle-system.h"
typedef void (*GameInitHookFunc_t)(void);
// extern const GameInitHookFunc_t gGameInitHookTable[];
extern GameInitHookFunc_t const *const gpGameInitHookTable;
extern const GameInitHookFunc_t *gpExternalGameInitHook;
LYN_REPLACE_CHECK(StartGame);
void StartGame(void)
{
const GameInitHookFunc_t *it;
struct GameCtrlProc *proc;
SetMainUpdateRoutine(OnMain);
SetInterrupt_LCDVBlank(OnVBlank);
proc = Proc_Start(gProcScr_GameControl, PROC_TREE_3);
proc->nextAction = GAME_ACTION_EVENT_RETURN;
proc->nextChapter = 0;
proc->idle_status = 0;
/* Internal hooks */
#if CHAX
LogInit();
#endif
/* External hooks */
for (it = gpGameInitHookTable; *it; it++)
(*it)();
it = gpExternalGameInitHook;
if (it)
(*it)();
}
void GameInitHookFuncPad(void) {}