From 1c0cc775732201f4c4d3ee0d6772be786b3b4aa1 Mon Sep 17 00:00:00 2001 From: Uneven Prankster Date: Sun, 15 Oct 2023 21:28:29 -0300 Subject: A lot has certainly happened! --- .../raylib_android.NativeActivity/main.c | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c (limited to 'raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/main.c') 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 (@) and reviewed by Ramon Santamaria (@raysan5) +* +* Copyright (c) 2021 (@) + +* 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; +} -- cgit v1.2.3