Alpha Engine: AEExport.h Source File
AlphaEngine
Go to the documentation of this file.
21 #define EPSILON 0.00001f
28 #define HALF_PI (PI * 0.5f)
29 #define TWO_PI (PI * 2.0f)
32 #define EXPORT_WINDOWS 1
33 #define EXPORT_ANDROID 0
35 #if(1 == EXPORT_WINDOWS)
40 #define PRINT(...) printf(__VA_ARGS__)
44 #define PRINT_INFO(...)
46 #define PRINT_INFO(...) PRINT("File: %s\nLine: %d\nFunc: %s\n\n", \
47 __FILE__,__LINE__, __FUNCTION__);
53 #define AE_API __declspec(dllexport)
59 #define DECLARE_FUNCTION_FOR_ANDROID(functionName)
60 #define IMPLEMENT_FUNCTION_FOR_ANDROID(functionName)
62 #define DECLARE_FUNCTION_FOR_ANDROID_2_INT(functionName, paramType1, paramType2)
63 #define IMPLEMENT_FUNCTION_FOR_ANDROID_2_INT(functionName, paramType1, paramType2)
65 #elif(1 == EXPORT_ANDROID)
68 #include <android/log.h>
70 #define LOG_TAG "AlphaEngine-Lib"
71 #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
72 #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
77 #define PRINT(...) LOGI(__VA_ARGS__)
82 #define DECLARE_FUNCTION_FOR_ANDROID(functionName) \
83 JNIEXPORT void Java_com_example_alphaengine_AEGLRenderer_##functionName(JNIEnv * env, jobject obj);
85 #define IMPLEMENT_FUNCTION_FOR_ANDROID(functionName) \
86 JNIEXPORT void Java_com_example_alphaengine_AEGLRenderer_##functionName(JNIEnv * env, jobject obj) \
92 #define DECLARE_FUNCTION_FOR_ANDROID_2_INT(functionName, paramType1, paramType2) \
93 JNIEXPORT s32 Java_com_example_alphaengine_AEGLRenderer_##functionName(JNIEnv * env, jobject obj, paramType1, paramType2);
95 #define IMPLEMENT_FUNCTION_FOR_ANDROID_2_INT(functionName, paramType1, paramType2) \
96 JNIEXPORT s32 Java_com_example_alphaengine_AEGLRenderer_##functionName(JNIEnv * env, jobject obj, paramType1 param1, paramType2 param2) \
98 return functionName(param1, param2); \