- Added ads support for Android

- basic "message" system between JGE and java through jni 
- Fixed pause/resume on android/sdl
This commit is contained in:
wagic.the.homebrew
2011-09-04 02:45:18 +00:00
parent 269934fe1e
commit 33691d1f13
21 changed files with 396 additions and 114 deletions

View File

@@ -55,6 +55,10 @@ typedef u32 LocalKeySym;
#endif
#if defined(ANDROID)
#include <jni.h>
#endif
bool JGEGetButtonState(const JButton button);
bool JGEGetButtonClick(const JButton button);
void JGECreateDefaultBindings();
@@ -121,6 +125,12 @@ class JGE
private:
#endif
#if defined (ANDROID)
JNIEnv * mJNIEnv;
jclass mJNIClass;
jmethodID midSendCommand;
#endif
bool mDone;
float mDeltaTime;
bool mDebug;
@@ -356,6 +366,16 @@ class JGE
void Assert(const char *filename, long lineNumber);
/// Sends a message through JGE
/// Currently used only to communicate with the JNI Layer in Android
void SendCommand(std::string command);
#if defined (ANDROID)
/// Access to JNI Environment
void SetJNIEnv(JNIEnv * env, jclass cls);
void sendJNICommand(std::string command);
#endif
protected:
JGE();
~JGE();