mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
scripting and UI improvements
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -85,7 +85,7 @@ int main(int argc, const char *argv[])
|
||||
Platform::init("OTClient");
|
||||
|
||||
// init random numbers
|
||||
srand(time(NULL));
|
||||
std::srand(std::time(NULL));
|
||||
|
||||
// init resources
|
||||
g_resources.init(argv[0]);
|
||||
@@ -120,21 +120,12 @@ int main(int argc, const char *argv[])
|
||||
// load script modules
|
||||
g_lua.loadAllModules();
|
||||
|
||||
if(!UIContainer::getRootContainer()->getChildCount())
|
||||
logFatal("FATAL ERROR: no ui loaded at all, no reason to continue running");
|
||||
|
||||
Platform::showWindow();
|
||||
//Platform::hideMouseCursor();
|
||||
|
||||
// main loop, run everything
|
||||
g_engine.run();
|
||||
|
||||
// destroy root ui
|
||||
UIContainer::getRootContainer()->destroy();
|
||||
|
||||
// poll remaning events
|
||||
g_engine.poll();
|
||||
|
||||
// terminate stuff
|
||||
g_engine.terminate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user