SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
GameSystem.cpp
1#include "Game/System/GameSystem.hpp"
2#include "Game/System/GameSystemException.hpp"
3#include "Game/System/FileRipper.hpp"
4#include "Game/System/HeapMemoryWatcher.hpp"
5#include "Game/SingletonHolder.hpp"
6#include "nw4r/lyt/lyt_init.hpp"
7#include "Game/Util.hpp"
8
9
10void main(void) {
11 __asm {
12 li r3, 4
13 oris r3, r3, 4
14 mtspr 0x392, r3
15 li r3, 5
16 oris r3, r3, 5
17 mtspr 0x393, r3
18 li r3, 6
19 oris r3, r3, 6
20 mtspr 0x394, r3
21 li r3, 7
22 oris r3, r3, 7
23 mtspr 0x395, r3
24 };
25
26 DVDInit();
27 VIInit();
28 HeapMemoryWatcher::createRootHeap();
29 OSInitMutex(&MR::MutexHolder<0>::sMutex);
30 OSInitMutex(&MR::MutexHolder<1>::sMutex);
31 OSInitMutex(&MR::MutexHolder<2>::sMutex);
32 nw4r::lyt::LytInit();
33 /*MR::setLayoutDefaultAllocator();
34
35 if (!SingletonHolder<HeapMemoryWatcher>::sInstance) {
36 SingletonHolder<HeapMemoryWatcher>::sInstance = new HeapMemoryWatcher();
37 }
38
39 SingletonHolder<HeapMemoryWatcher>::sInstance->setCurrentHeapToStationedHeap();
40 JKRHeap* napaHeap = MR::getStationedHeapNapa();
41 //FileRipper::setup(0x20000, napaHeap);
42 //GameSystemException::init();
43 //MR::initAcosTable();
44
45 if (!SingletonHolder<GameSystem>::sInstance) {
46 SingletonHolder<GameSystem>::sInstance = new GameSystem();
47 }
48
49 SingletonHolder<GameSystem>::sInstance->init();
50 GameSystem* gameSystem = SingletonHolder<GameSystem>::sInstance;
51
52 while (true) {
53 gameSystem->frameLoop();
54 }*/
55}