diff options
| author | raysan5 <[email protected]> | 2017-10-14 00:14:24 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-10-14 00:14:24 +0200 |
| commit | ba4b39a025fd8d88445bd929456f288191aad70d (patch) | |
| tree | b92b885ad0d535e1a5594ed1a12ee149b7c4d08b /templates/standard_game | |
| parent | 5430d5d52e61ce5cd7e02d99b5d98f8fc56ddb28 (diff) | |
| download | raylib-ba4b39a025fd8d88445bd929456f288191aad70d.tar.gz raylib-ba4b39a025fd8d88445bd929456f288191aad70d.zip | |
Working on game templates
Diffstat (limited to 'templates/standard_game')
| -rw-r--r-- | templates/standard_game/standard_game.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/templates/standard_game/standard_game.c b/templates/standard_game/standard_game.c index 36ca30f9..f95087f7 100644 --- a/templates/standard_game/standard_game.c +++ b/templates/standard_game/standard_game.c @@ -15,18 +15,29 @@ #include "raylib.h" #include "screens/screens.h" // NOTE: Defines currentScreen +#if defined(PLATFORM_ANDROID) + #include "android_native_app_glue.h" +#endif + //---------------------------------------------------------------------------------- // Main entry point //---------------------------------------------------------------------------------- +#if defined(PLATFORM_ANDROID) +void android_main(struct android_app *app) +#else int main(void) +#endif { // Initialization //--------------------------------------------------------- const int screenWidth = 800; const int screenHeight = 450; - const char windowTitle[30] = "<game name goes here>"; - - InitWindow(screenWidth, screenHeight, windowTitle); + +#if defined(PLATFORM_ANDROID) + InitWindow(screenWidth, screenHeight, app); +#else + InitWindow(screenWidth, screenHeight, "raylib template - standard game"); +#endif // TODO: Load global data here (assets that must be available in all screens, i.e. fonts) @@ -139,6 +150,7 @@ int main(void) CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - +#if !defined(PLATFORM_ANDROID) return 0; +#endif }
\ No newline at end of file |
