BFPlatform.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #define BFSTDCALL
  3. #include "../darwin/DarwinCommon.h"
  4. #include "TargetConditionals.h"
  5. #include <string>
  6. #ifndef __IPHONEOS__
  7. #define __IPHONEOS__
  8. #endif
  9. #define BF_PLATFORM_IOS
  10. #define BF_PLATFORM_POSIX
  11. #define BF_PLATFORM_OPENGL_ES2
  12. #define BF_PLATFORM_FULLSCREEN
  13. #define BF_PLATFORM_DARWIN
  14. #define BF_PLATFORM_NAME "BF_PLATFORM_IOS"
  15. #if !TARGET_IPHONE_SIMULATOR
  16. #ifdef __LP64__
  17. #ifdef __I386__
  18. #define BF_PLATFORM_X64
  19. #else
  20. #define BF_PLATFORM_ARM64
  21. #endif
  22. #define BF64
  23. #else ////
  24. #ifdef __I386__
  25. #define BF_PLATFORM_I386
  26. #else
  27. #define BF_PLATFORM_ARM32
  28. #endif
  29. #define BF32
  30. #endif
  31. #else
  32. #ifdef __LP64__
  33. #define BF_PLATFORM_X64
  34. #define BF64
  35. #else ////
  36. #define BF_PLATFORM_I386
  37. #define BF32
  38. #endif
  39. #endif
  40. #define BF_IMPORT extern "C"
  41. #ifdef BFSYSLIB_DYNAMIC
  42. #define BF_EXPORT extern "C"
  43. #define BF_CALLTYPE
  44. #else
  45. #define BF_EXPORT extern "C"
  46. #define BF_CALLTYPE
  47. #define BF_RESOURCES_REL_DIR "../Resources"
  48. #endif
  49. #ifdef BF_PLATFORM_ARM32
  50. #define BF_REGISTER_COUNT 15
  51. #elif defined BF32
  52. #define BF_REGISTER_COUNT 7
  53. #else
  54. #define BF_REGISTER_COUNT 15
  55. #endif
  56. #define BF_DEBUG_BREAK()
  57. #include "../PlatformInterface.h"