MCPcopy Create free account
hub / github.com/GRAnimated/MinecraftLCE / nnMain

Function nnMain

src/4JLibraries_Source/NX/Program/PRO_Main.cpp:213–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211
212// NON_MATCHING: Incomplete
213extern "C" void nnMain() {
214 sub_7100607FBC();
215 nn::oe::SetPerformanceConfiguration(nn::oe::PerformanceMode_Normal, 0x20004);
216 PERFORMANCE_MODE = nn::oe::GetPerformanceMode();
217 nn::oe::SetPerformanceModeChangedNotificationEnabled(true);
218 nn::oe::SetFocusHandlingMode(nn::oe::FocusHandlingMode_NoSuspend);
219 nn::oe::SetResumeNotificationEnabled(true);
220 nullsub_833();
221 nn::nifm::Initialize();
222 nn::time::Initialize();
223 nn::oe::Initialize();
224
225 size_t cacheSize;
226 nn::fs::QueryMountRomCacheSize(&cacheSize);
227 void* cache = operator new[](cacheSize, std::nothrow_t());
228 nn::fs::MountRom("GAME", cache, cacheSize);
229 nn::os::InitializeMessageQueue(MESSAGE_QUEUE, MESSAGE_QUEUE_BUFFER, 3);
230
231 InitializeCriticalSection(MAIN_MUTEX2);
232 C4JThreadImpl::SetMainThreadID();
233
234 Compression::CreateNewThreadStorage();
235 Renderer::sInstance->Initialise();
236 CProfile::sInstance->AwardManagerOnCreate();
237
238 CInput::sInstance->Initialise(1, 61, 23);
239 DefineActions();
240 CInput::sInstance->SetJoypadMapArraySetupComplete();
241 CInput::sInstance->SetKeyRepeatRate(0.3f, 0.2f);
242 CInput::sInstance->SetDeadzoneAndMovementRange(0, 20000, 0x7FFF);
243
244 CConsoleMinecraftApp::sInstance.loadMediaArchive();
245 CConsoleMinecraftApp::sInstance.InitialiseDLCInfo();
246
247 if (!CConsoleMinecraftApp::sInstance.ReadProductCodes())
248 CConsoleMinecraftApp::sInstance.FatalLoadError(L"ReadProductCodes"); // string from wii u
249
250 L10N::loadStringTable();
251 CInput::sInstance->SetCircleCrossSwapped(true);
252 int screenType = 1; // TODO: shove function that gets screenType, haven't done it so far because i'm
253 // unsure on how to name that func
254 gConsoleUIController.setResolutionChangeDisableFlag(IUIController::eRESOLUTION_DISABLE_FLAG::FLAG_0);
255
256 int screenWidth, screenHeight;
257 if (screenType == 1) {
258 screenHeight = 1080;
259 screenWidth = 1920;
260 } else {
261 screenWidth = 1280;
262 screenHeight = 720;
263 }
264
265 gConsoleUIController.init(screenWidth, screenHeight);
266 CConsoleMinecraftApp::sInstance.CommerceInit();
267 CConsoleMinecraftApp::sInstance.initTime();
268 // funny thing is that all args seems to be unused
269 // note: first 2 dwords correspond to constant empty string generated by compiler -Dexrn
270 CProfile::sInstance->Initialise(L"", L"", 33, 5, 4, &unk_71017C17BC, 7776, &dword_71017C0AB0);

Callers

nothing calls this directly

Calls 15

sub_7100607FBCFunction · 0.85
nullsub_833Function · 0.85
DefineActionsFunction · 0.85
PIXBeginNamedEventFunction · 0.85
PIXEndNamedEventFunction · 0.85
InitialiseMethod · 0.80
SetOnAwardHandlerMethod · 0.80
TickMethod · 0.80

Tested by

no test coverage detected