dbeef / spelunky-psp

Spelunky remake for Sony PSP.
Other
138 stars 10 forks source link

Android platform support #69

Closed dbeef closed 4 years ago

dbeef commented 4 years ago

Quoting myself from the Building.md addition:

Android is a very special case in the build system. The official channel of distribution (through .APK files) requires each application to be wrapped around at least one Java Activity instance, which represents a running process. Because of that, Spelunky_PSP target is built as a shared library instead of an executable. When invoking gradle, it will in turn run CMake and then bundle artifact libSpelunky_PSP.so to the .APK file. SDL ships a few Java files, including an activity that will bootstrap the application and then retrieve pointer to the main function from libSpelunky_PSP.so and call it through JNI. These files are compiled and included in the .APK file, aswell as other Android-related boilerplate (AndroidManifest.xml, strings.xml, icons). From the moment of calling main function through JNI until return, the code will be executed in ordinary way as on other platforms.

With SDL2 as a platform abstraction layer, accessed via: https://github.com/suikki/simpleSDL/

No on-screen controls provided - USB OTG with keyboard or some other mean of physical controller required (another TODO, to provide on-screen controls? decided to not provide on-screen controls in this MR, no high priority on Android support)