/* ================================================================ FIO functionality ---------------- fio.cpp/fio.hpp provide functionality for accessing files within RtB. File access is generally assumed to be C-style *FILE. If any file is attempted to be read or written to, fio.hpp should be included first. ================================================================ */ #ifndef FIO_HPP #define FIO_HPP #include /* ======== Asset data access ======== */ size_t asset_fileToMem(const char *filename, char **buffer); FILE *asset_fopen(const char *filename, const char *mode); /* ======== Android apk access ======== */ #ifdef __ANDROID__ #include #include #include extern "C" { void apk_set_asset_manager(AAssetManager* manager); FILE *apk_fopen(const char *filename, const char *mode); JNIEXPORT void JNICALL Java_com_polymathic_RtB_RtB_setAssetManager(JNIEnv* env, jobject obj, jobject assetManager); } #endif #endif