Permalink
Browse files

Initial setup for dynamic cheat interface

  • Loading branch information...
xperia64 committed Jun 22, 2015
1 parent 10d20a4 commit d92f2a804d5109cba860c1c28190f88bfe659837
Showing with 25 additions and 6 deletions.
  1. +21 −6 jni/ae-bridge/ae_exports.cpp
  2. +4 −0 src/paulscode/android/mupen64plusae/jni/NativeExports.java
@@ -55,15 +55,20 @@ typedef int (*pSdlInit) (JNIEnv* env, jclass cls);
typedef void (*pSdlSetScreen) (int width, int height, Uint32 format);
typedef void (*pVoidFunc) ();
typedef m64p_error (*pCoreDoCommand) (m64p_command, int, void *);
typedef m64p_error (*pCoreAddCheat) (const char *CheatName, m64p_cheat_code *CodeList, int NumCodes);
typedef m64p_error (*pCoreCheatEnabled) (const char *CheatName, int Enabled);
typedef int (*pFrontMain) (int argc, char* argv[]);
// Function pointers
static pAeiInit aeiInit = NULL;
static pSdlInit sdlInit = NULL;
static pSdlSetScreen sdlSetScreen = NULL;
static pVoidFunc sdlMainReady = NULL;
static pCoreDoCommand coreDoCommand = NULL;
static pFrontMain frontMain = NULL;
static pAeiInit aeiInit = NULL;
static pSdlInit sdlInit = NULL;
static pSdlSetScreen sdlSetScreen = NULL;
static pVoidFunc sdlMainReady = NULL;
static pCoreDoCommand coreDoCommand = NULL;
static pCoreAddCheat coreAddCheat = NULL;
static pCoreCheatEnabled coreCheatEnabled = NULL;
static pFrontMain frontMain = NULL;
void checkLibraryError(const char* message)
{
@@ -345,3 +350,13 @@ extern "C" DECLSPEC jint Java_paulscode_android_mupen64plusae_jni_NativeExports_
if (coreDoCommand) coreDoCommand(M64CMD_CORE_STATE_QUERY, M64CORE_SAVESTATE_SLOT, &slot);
return (jint) slot;
}
extern "C" DECLSPEC void Java_paulscode_android_mupen64plusae_jni_NativeExports_cheatAddCode(JNIEnv* env, jclass cls)
{
//TODO: Implement
}
extern "C" DECLSPEC void Java_paulscode_android_mupen64plusae_jni_NativeExports_cheatSetEnabled(JNIEnv* env, jclass cls)
{
//TODO: Implement
}
@@ -76,4 +76,8 @@
public static native boolean emuGetFramelimiter();
public static native int emuGetSlot();
public static native void cheatAddCode();
public static native void cheatSetEnabled();
}

0 comments on commit d92f2a8

Please sign in to comment.