30 static std::shared_ptr<World>
gWorld;
36 int main(
int argc,
char* argv[]) {
39 command_option(&cmd,
"-c",
"--config <file>",
"select config file to use",
58 std::cout <<
"Could not initialize Window (" << error <<
")!" << std::endl;
64 std::cout <<
"Could not initialize OpenGL (" << error <<
")!" << std::endl;
71 std::cout <<
"Could not initialize TextureManager (" << error <<
")!" << std::endl;
78 std::string p = INSTALL_PREFIX;
81 p +=
"share/OpenRaider/";
91 std::cout <<
"Coult not load Splash Texture (" << error <<
")!" << std::endl;
98 std::cout <<
"Could not initialize Sound (" << error <<
")!" << std::endl;
105 std::cout <<
"Could not initialize Debug UI (" << error <<
")!" << std::endl;
112 std::cout <<
"Could not initialize Menu (" << error <<
")!" << std::endl;
136 std::cout << std::endl;
137 std::cout <<
"Thanks for testing " << VERSION << std::endl;
138 std::cout <<
"Build date: " << __DATE__ <<
" @ " << __TIME__ << std::endl;
139 std::cout <<
"Build host: " << BUILD_HOST << std::endl;
140 std::cout <<
"Web site : http://github.com/xythobuz/OpenRaider" << std::endl;
141 std::cout <<
"Contact : xythobuz@xythobuz.de" << std::endl;
154 #if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS)
158 #include <execinfo.h>
160 [[noreturn]]
static void terminateHandler();
161 static std::terminate_handler oldTerminateHandler = std::set_terminate(terminateHandler);
163 [[noreturn]]
static void terminateHandler() {
164 const unsigned int maxSize = 128;
165 void* callstack[maxSize];
166 int frames = backtrace(callstack, maxSize);
167 char** strs = backtrace_symbols(callstack, frames);
169 std::cout << std::endl;
170 for (
int i = frames; i > 0; i++)
171 std::cout << strs[i - 1] << std::endl;
175 oldTerminateHandler();
180 #endif // HAVE_EXECINFO_H && HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS
static int initializeSplash()
static void setMode(RenderMode m)
OpenGL Shader Implementation.
static std::shared_ptr< World > gWorld
static LogLevel & get(int level)
static void fillCommandList()
void command_free(command_t *self)
static std::string configFileToUse
static void error(char *msg)
static void setRunning(bool run)
static void eventHandling()
Runtime Configuration Storage.
void command_init(command_t *self, const char *name, const char *version)
static int executeFile(std::string file)
void systemTimerReset()
Reset the system timer.
void command_option(command_t *self, const char *small, const char *large, const char *desc, command_callback_t cb)
void command_parse(command_t *self, int argc, char **argv)
static void swapBuffers()
int main(int argc, char *argv[])
static void setSize(glm::i32vec2 s)
static glm::i32vec2 getSize()