NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_system.hpp
1#pragma once
2
3#include <game/sLib/s_Phase.hpp>
4#include <game/mLib/m_dvd.hpp>
5#include <lib/egg/core/eggHeap.h>
6#include <lib/egg/core/eggExpHeap.h>
7#include <nw4r/ut.h>
8
9/// @brief Main game handler class. Handles initialization and the main game loop.
10/// @ingroup bases
11class dSys_c {
12public:
13 static void beginFrame(); ///< Marks the beginning of a frame.
14 static void endFrame(); ///< Marks the end of a frame.
15 static void beginRender();
16 static void endRender();
17 static bool setBlack(bool makeBlack);
18 static void calcAudio();
19 static void setFrameRate(u8 rate);
20 static void setClearColor(nw4r::ut::Color color);
21 static nw4r::ut::Color getClearColor();
22 static void create(); ///< Initializes the game.
23 static void execute(); ///< Executes one frame of the game loop.
24
25 static EGG::Heap *ms_RootHeapMem1;
26 static EGG::Heap *ms_RootHeapMem2;
27};
28
29/// @brief System initialization and management functions.
30/// @ingroup bases
31namespace dSystem {
32 sPhase_c::METHOD_RESULT_e createFontManagerPhase(void *);
33 sPhase_c::METHOD_RESULT_e createMessageManagerPhase(void *);
34 sPhase_c::METHOD_RESULT_e createEffectManagerPhase1(void *);
35 sPhase_c::METHOD_RESULT_e createEffectManagerPhase2(void *);
36 void createEffectManagerHeap(EGG::Heap *heap1, EGG::Heap *heap2);
37
38 void fixArena();
39 void fixHeapsSub(EGG::ExpHeap *heap, int size);
40 void fixHeaps();
41
42 extern const char sc_EffectManagerHeap1Name[];
43 extern const char sc_EffectManagerHeap2Name[];
44 extern const char sc_FontManagerHeapName[];
45 extern const char sc_MessageManagerHeapName[];
46
47 extern mDvd_toMainRam_c *l_breffCommand;
48 extern mDvd_toMainRam_c *l_breftCommand;
49
50 extern EGG::Heap *s_FontManagerHeap;
51 extern EGG::Heap *s_EffectManagerHeap1;
52 extern EGG::Heap *s_EffectManagerHeap2;
53 extern EGG::Heap *s_MessageManagerHeap;
54
55 extern void *s_OrgMEM1ArenaLo;
56 extern void *s_NewMEM1ArenaLo;
57 extern void *s_OrgMEM1ArenaHi;
58 extern void *s_NewMEM1ArenaHi;
59}
Main game handler class. Handles initialization and the main game loop.
Definition d_system.hpp:11
static void beginFrame()
Marks the beginning of a frame.
Definition d_system.cpp:77
static void create()
Initializes the game.
Definition d_system.cpp:120
static void endFrame()
Marks the end of a frame.
Definition d_system.cpp:82
static void execute()
Executes one frame of the game loop.
Definition d_system.cpp:222
METHOD_RESULT_e
Return value of a phase method and callMethod().
Definition s_Phase.hpp:9
System initialization and management functions.
Definition d_system.hpp:31