summaryrefslogtreecommitdiffhomepage
path: root/templates/android_project/src/game_raylib_stripped.c
diff options
context:
space:
mode:
authorRay San <[email protected]>2017-09-29 13:58:49 +0200
committerRay San <[email protected]>2017-09-29 13:58:49 +0200
commitc418aa2fb08700f9e9f8a6c96b4012a9912d9a37 (patch)
tree338ebae123fcd5442da845b5d0a0fd217b78661f /templates/android_project/src/game_raylib_stripped.c
parentccd6271a7f036e72e3192efcee4350e225f353ab (diff)
downloadraylib-c418aa2fb08700f9e9f8a6c96b4012a9912d9a37.tar.gz
raylib-c418aa2fb08700f9e9f8a6c96b4012a9912d9a37.zip
Keep working on Android custom building...
...almost there! raylib already works, issues with OpenAL Soft linkage...
Diffstat (limited to 'templates/android_project/src/game_raylib_stripped.c')
-rw-r--r--templates/android_project/src/game_raylib_stripped.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/templates/android_project/src/game_raylib_stripped.c b/templates/android_project/src/game_raylib_stripped.c
new file mode 100644
index 00000000..43611d22
--- /dev/null
+++ b/templates/android_project/src/game_raylib_stripped.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