MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / main

Function main

src/Player/ObEnginePlayer.cpp:21–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using namespace obe;
20
21int main(int argc, char** argv)
22{
23 const unsigned int surfaceWidth = sf::VideoMode::getDesktopMode().width;
24 const unsigned int surfaceHeight = sf::VideoMode::getDesktopMode().height;
25 try
26 {
27 InitEngine(surfaceWidth, surfaceHeight);
28 }
29 catch (Exception& e)
30 {
31 Debug::Log->error(e.what());
32 Debug::Log->error("Error occured while initializing ObEngine");
33 }
34
35 Debug::Log->info("<ObEngine> Screen surface resolution {0}x{1}",
36 Transform::UnitVector::Screen.w, Transform::UnitVector::Screen.h);
37 // Modes::startGame();
38 try
39 {
40 Modes::startGame();
41 }
42 catch (std::exception& e)
43 {
44 Debug::Log->error(e.what());
45 Debug::Log->error("Error occured while running ObEngine");
46 }
47 return 0;
48}

Callers

nothing calls this directly

Calls 5

InitEngineFunction · 0.85
startGameFunction · 0.85
infoMethod · 0.80
errorMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected