geode/loader/include/Geode/cocos/platform/android/CCPlatformDefine.h
2023-06-07 19:07:42 +03:00

42 lines
1.3 KiB
C
Vendored

#ifndef __CCPLATFORMDEFINE_H__
#define __CCPLATFORMDEFINE_H__
#include <android/log.h>
#ifdef GEODE_EXPORTING
#define CC_DLL __attribute__((visibility("default")))
#else
#define CC_DLL
#endif
#define ACTUAL_CC_DLL CC_DLL
#define CC_NO_MESSAGE_PSEUDOASSERT(cond) \
if (!(cond)) { \
__android_log_print(ANDROID_LOG_ERROR, \
"cocos2d-x assert", \
"%s function:%s line:%d", \
__FILE__, __FUNCTION__, __LINE__); \
}
#define CC_MESSAGE_PSEUDOASSERT(cond, msg) \
if (!(cond)) { \
__android_log_print(ANDROID_LOG_ERROR, \
"cocos2d-x assert", \
"file:%s function:%s line:%d, %s", \
__FILE__, __FUNCTION__, __LINE__, msg); \
}
#define CC_ASSERT(cond) CC_NO_MESSAGE_PSEUDOASSERT(cond)
#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam
/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#endif /* __CCPLATFORMDEFINE_H__*/