MCPcopy Create free account
hub / github.com/doldecomp/mkdd / init

Function init

src/Osako/system.cpp:65–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64
65 void init() {
66#ifdef REGION_EU
67 switch(OSGetLanguage()) {
68 case OS_LANG_ENGLISH:
69 KartLocale::setCountry(UNITED_KINGDOM);
70 break;
71 case OS_LANG_FRENCH:
72 KartLocale::setCountry(FRANCE);
73 break;
74 case OS_LANG_GERMAN:
75 KartLocale::setCountry(GERMANY);
76 break;
77 case OS_LANG_ITALIAN:
78 KartLocale::setCountry(ITALY);
79 break;
80 case OS_LANG_SPANISH:
81 KartLocale::setCountry(SPAIN);
82 break;
83 default: // fallback for when gamecube is set to Dutch?
84 KartLocale::setCountry(UNITED_KINGDOM);
85 break;
86 }
87#endif
88 KartLocale::localize();
89
90 JFWSystem::setMaxStdHeap(SystemData::scNumStandardHeaps);
91 JFWSystem::setSysHeapSize(SystemData::scSystemHeapSize);
92 JFWSystem::setFifoBufSize(SystemData::scDefaultFifoSize);
93 JFWSystem::setAramAudioBufSize(SystemData::scAudioAramSize);
94 JFWSystem::setAramGraphBufSize(0xffffffff);
95 JFWSystem::setRenderMode(BOOT_RENDERMODE);
96 msRenderMode = NORMAL_RMODE;
97
98 JFWSystem::init();
99 PadMgr::init();
100 OSInitFastCast();
101
102 JKRAramStream::setTransBuffer(nullptr, 0x8000, JKRGetSystemHeap());
103 JUTException::setPreUserCallback(callbackException);
104#ifdef DEBUG
105 /*
106 don't make this a static name, since debugInfoS also exists
107 however if the "Debug Support" build gets found then change this
108 */
109 JUTException::appendMapFile("debugInfoM.MAP");
110#endif
111
112 mspSendTask = JKRTask::create(4, 1, 0x4000, nullptr);
113 mspRecvTask = JKRTask::create(4, 2, 0x4000, nullptr);
114 mspAramTask = JKRTask::create(64, 14, 0x4000, nullptr);
115 mspLoTask = JKRTask::create(64, 18, 0x4000, nullptr);
116 mspAudioHeap = JKRCreateSolidHeap(SystemData::scAudioHeapSize, JKRGetRootHeap(), false);
117
118 GetGameAudioMain()->bootDSP();
119 mspLoTask->request(startAudioTask, nullptr, nullptr);
120
121 SysDebug::createManager();
122

Callers

nothing calls this directly

Calls 15

OSGetLanguageFunction · 0.85
OSInitFastCastFunction · 0.85
JKRGetSystemHeapFunction · 0.85
JKRCreateSolidHeapFunction · 0.85
JKRGetRootHeapFunction · 0.85
getOrthoLFunction · 0.85
getOrthoTFunction · 0.85
getOrthoRFunction · 0.85
getOrthoBFunction · 0.85
TColorClass · 0.85
JKRCreateExpHeapFunction · 0.85
requestMethod · 0.80

Tested by

no test coverage detected