Adapted games to compile for Android

This commit is contained in:
Ray
2017-10-22 11:48:41 +02:00
parent 3f9d76f227
commit a483e17f50
15 changed files with 2380 additions and 909 deletions

View File

@ -19,6 +19,10 @@
#include <stdlib.h>
#if defined(PLATFORM_ANDROID)
#include "android_native_app_glue.h"
#endif
#if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h>
#endif
@ -51,11 +55,19 @@ void UpdateDrawFrame(void); // Update and Draw one frame
//----------------------------------------------------------------------------------
// Main entry point
//----------------------------------------------------------------------------------
#if defined(PLATFORM_ANDROID)
void android_main(struct android_app *app)
#else
int main(void)
#endif
{
// Initialization
//---------------------------------------------------------
#if defined(PLATFORM_ANDROID)
InitWindow(screenWidth, screenHeight, app);
#else
InitWindow(screenWidth, screenHeight, "GGJ16 - LIGHT MY RITUAL!");
#endif
// Global data loading (assets that must be available in all screens, i.e. fonts)
InitAudioDevice();
@ -117,8 +129,9 @@ int main(void)
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
#if !defined(PLATFORM_ANDROID)
return 0;
#endif
}
void TransitionToScreen(int screen)