|
|
@@ -62,11 +62,31 @@ int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED_PARAMETER(instance_handle), HINSTAN
|
|
|
int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv))
|
|
|
#endif
|
|
|
{
|
|
|
+#ifdef ROCKET_PLATFORM_WIN32
|
|
|
+ ROCKET_UNUSED(instance_handle);
|
|
|
+ ROCKET_UNUSED(previous_instance_handle);
|
|
|
+ ROCKET_UNUSED(command_line);
|
|
|
+ ROCKET_UNUSED(command_show);
|
|
|
+#else
|
|
|
+ ROCKET_UNUSED(argc);
|
|
|
+ ROCKET_UNUSED(argv);
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef ROCKET_PLATFORM_LINUX
|
|
|
+#define APP_PATH "../Samples/invaders/"
|
|
|
+#else
|
|
|
+#define APP_PATH "../../Samples/invaders/"
|
|
|
+#endif
|
|
|
+
|
|
|
+#ifdef ROCKET_PLATFORM_WIN32
|
|
|
+ DoAllocConsole();
|
|
|
+#endif
|
|
|
+
|
|
|
ShellRenderInterfaceOpenGL opengl_renderer;
|
|
|
shell_renderer = &opengl_renderer;
|
|
|
|
|
|
// Generic OS initialisation, creates a window and attaches OpenGL.
|
|
|
- if (!Shell::Initialise("../Samples/invaders/") ||
|
|
|
+ if (!Shell::Initialise(APP_PATH) ||
|
|
|
!Shell::OpenWindow("Rocket Invaders from Mars", shell_renderer, 1024, 768, false))
|
|
|
{
|
|
|
Shell::Shutdown();
|
|
|
@@ -134,7 +154,7 @@ int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv)
|
|
|
if (EventManager::LoadWindow("background") &&
|
|
|
EventManager::LoadWindow("main_menu"))
|
|
|
Shell::EventLoop(GameLoop);
|
|
|
-
|
|
|
+
|
|
|
// Shut down the game singletons.
|
|
|
HighScores::Shutdown();
|
|
|
|
|
|
@@ -147,6 +167,6 @@ int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv)
|
|
|
|
|
|
Shell::CloseWindow();
|
|
|
Shell::Shutdown();
|
|
|
-
|
|
|
+
|
|
|
return 0;
|
|
|
}
|