26 lines
1007 B
C++
26 lines
1007 B
C++
/* ================================================================
|
|
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 <stdio.h>
|
|
/* ======== 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 <jni.h>
|
|
#include <android/asset_manager.h>
|
|
#include <android/asset_manager_jni.h>
|
|
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
|