MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / Start

Method Start

olcPixelGameEngine.h:2525–2546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2523
2524#if !defined(PGE_USE_CUSTOM_START)
2525 olc::rcode PixelGameEngine::Start()
2526 {
2527 if (platform->ApplicationStartUp() != olc::OK) return olc::FAIL;
2528
2529 // Construct the window
2530 if (platform->CreateWindowPane({ 30,30 }, vWindowSize, bFullScreen) != olc::OK) return olc::FAIL;
2531 olc_UpdateWindowSize(vWindowSize.x, vWindowSize.y);
2532
2533 // Start the thread
2534 bAtomActive = true;
2535 std::thread t = std::thread(&PixelGameEngine::EngineThread, this);
2536
2537 // Some implementations may form an event loop here
2538 platform->StartSystemEventLoop();
2539
2540 // Wait for thread to be exited
2541 t.join();
2542
2543 if (platform->ApplicationCleanUp() != olc::OK) return olc::FAIL;
2544
2545 return olc::OK;
2546 }
2547#endif
2548
2549 void PixelGameEngine::SetDrawTarget(Sprite* target)

Callers 1

mainFunction · 0.45

Calls 7

ApplicationStartUpMethod · 0.45
CreateWindowPaneMethod · 0.45
StartSystemEventLoopMethod · 0.45
ApplicationCleanUpMethod · 0.45
ThreadStartUpMethod · 0.45
OnBeforeUserCreateMethod · 0.45
OnAfterUserCreateMethod · 0.45

Tested by

no test coverage detected