aboutsummaryrefslogtreecommitdiff
path: root/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c
diff options
context:
space:
mode:
authorUneven Prankster <unevenprankster@protonmail.com>2023-10-15 21:28:29 -0300
committerUneven Prankster <unevenprankster@protonmail.com>2023-10-15 21:28:29 -0300
commit1c0cc775732201f4c4d3ee0d6772be786b3b4aa1 (patch)
treef5d692d046868261275c7430a624c3ea9ed75d3d /raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c
parenta89f892640cf12f75c7ce18e6e88c70a8d3965ed (diff)
A lot has certainly happened!
Diffstat (limited to 'raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c')
-rw-r--r--raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c b/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c
new file mode 100644
index 0000000..079bda9
--- /dev/null
+++ b/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c
@@ -0,0 +1,64 @@
+/*******************************************************************************************
+*
+* raylib [core] example - Basic window
+*
+* This example has been created using raylib 3.8 (www.raylib.com)
+* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+* Example contributed by <user_name> (@<user_github>) and reviewed by Ramon Santamaria (@raysan5)
+*
+* Copyright (c) 2021 <user_name> (@<user_github>)
+
+* Adapt for Visual Studio: Vadim Boev (Kronka Dev)
+*
+********************************************************************************************/
+#include "android_native_app_glue.h"
+
+#include "../../../../src/raylib.h"
+
+int main(void)
+{
+ // Initialization
+ //--------------------------------------------------------------------------------------
+ const int screenWidth = 800;
+ const int screenHeight = 450;
+
+ InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
+
+ // TODO: Load resources / Initialize variables at this point
+
+ SetTargetFPS(60);
+ //--------------------------------------------------------------------------------------
+
+ // Main game loop
+ while (!WindowShouldClose()) // Detect window close button or ESC key
+ {
+ // Update
+ //----------------------------------------------------------------------------------
+ // TODO: Update variables / Implement example logic at this point
+ //----------------------------------------------------------------------------------
+
+ // Draw
+ //----------------------------------------------------------------------------------
+ BeginDrawing();
+
+ ClearBackground(RAYWHITE);
+
+ // TODO: Draw everything that requires to be drawn at this point:
+
+ DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY); // Example
+
+ EndDrawing();
+ //----------------------------------------------------------------------------------
+ }
+
+ // De-Initialization
+ //--------------------------------------------------------------------------------------
+
+ // TODO: Unload all loaded resources at this point
+
+ CloseWindow(); // Close window and OpenGL context
+ //--------------------------------------------------------------------------------------
+
+ return 0;
+}