diff options
| author | Ray San <[email protected]> | 2017-09-28 17:05:43 +0200 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-09-28 17:05:43 +0200 |
| commit | f5dcb51efead4a7964c8536b9d33980f4734b3d1 (patch) | |
| tree | 548a1148e1d1df87ec612c421d1f6f595a003069 /templates/android_project/src/game_crash.c | |
| parent | e284adcfc1f88d7075a7b357f94dbe21a55271a6 (diff) | |
| download | raylib-f5dcb51efead4a7964c8536b9d33980f4734b3d1.tar.gz raylib-f5dcb51efead4a7964c8536b9d33980f4734b3d1.zip | |
Work on custom Android build
- Renamed some folders
- Added some files for testing
- Removed useless files
Diffstat (limited to 'templates/android_project/src/game_crash.c')
| -rw-r--r-- | templates/android_project/src/game_crash.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/templates/android_project/src/game_crash.c b/templates/android_project/src/game_crash.c new file mode 100644 index 00000000..43611d22 --- /dev/null +++ b/templates/android_project/src/game_crash.c @@ -0,0 +1,58 @@ +/******************************************************************************************* +* +* raylib - Android Basic Game template +* +* <Game title> +* <Game description> +* +* This game has been created using raylib v1.2 (www.raylib.com) +* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) +* +* Copyright (c) 2014 Ramon Santamaria (@raysan5) +* +********************************************************************************************/ + +#include "raylib.h" + +#include "android_native_app_glue.h" + +//---------------------------------------------------------------------------------- +// Android Main entry point +//---------------------------------------------------------------------------------- +void android_main(struct android_app *app) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + InitWindow(screenWidth, screenHeight, app); + + // TODO: Initialize all required variables and load all required data here! + + SetTargetFPS(60); // Not required on Android, already locked to 60 fps + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + // ... + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + // De-Initialization + //-------------------------------------------------------------------------------------- + CloseWindow(); // Close window and OpenGL context + //-------------------------------------------------------------------------------------- +}
\ No newline at end of file |
