CFTTAndroidAppCInterface.cpp 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. #include "CFTTAndroidAppCInterface.h"
  2. #include "CFTTAudio.h"
  3. #include "XCTRL.h"
  4. #include "Soccer.h"
  5. #include "FTTGraphics.h"
  6. #include "CFE.h"
  7. #include "SNDGAME.h"
  8. #include "SNDFE.h"
  9. #include "TGame.h"
  10. #include "memctrl.h"
  11. bool g_bAppResignActive;
  12. //-------------------------------------------------------------------------------------------------
  13. namespace CFTTAndroidAppCInterface {
  14. func_pApp m_OnStart;
  15. func_pApp m_OnCreate;
  16. func_pApp m_ResignActive;
  17. func_pApp m_BecomeActive;
  18. func_pApp m_DidEnterBackground;
  19. func_pApp m_WillTerminate;
  20. func_pApp m_ReceivedUrgentMemWarning;
  21. func_pApp m_RenderScene;
  22. func_pApp m_WillEnterForeground;
  23. bool m_bAppHasFocus;
  24. bool m_bAppInForeground;
  25. }; // namespace CFTTAndroidAppCInterface
  26. //-------------------------------------------------------------------------------------------------
  27. CFTTMem_HeapSettings CFTTMem_HeapSettings_305950[] = {
  28. {0x5C00000, "Main_Heap", 0x1010101, 0x100},
  29. {0, "Debug_Heap", 0x1010100, 0x100},
  30. {0, "Volatile_Heap", 0x1010100, 0x100},
  31. };
  32. //-------------------------------------------------------------------------------------------------
  33. //001F6934 //^_^ 经过单元测试,功能正常
  34. int AppStart() {
  35. LOGE("AppStart");
  36. return rand();
  37. }
  38. //-------------------------------------------------------------------------------------------------
  39. //001F6838 //^_^
  40. int AppOnStart(void* parg) {
  41. LOGE("%pAppOnStart",parg);
  42. return rand();
  43. }
  44. //-------------------------------------------------------------------------------------------------
  45. class CHeroAnalytics {
  46. public:
  47. static void Init() {
  48. LOGI("CHeroAnalytics::Init entry");
  49. };
  50. };
  51. //001F6820 //^_-
  52. int AppOnCreate(void* parg) {
  53. return 1;
  54. }
  55. //-------------------------------------------------------------------------------------------------
  56. //001F6840 //^_^
  57. int AppResignActive(void* parg) {
  58. return 1;
  59. }
  60. //-------------------------------------------------------------------------------------------------
  61. //001F686C //^_^
  62. int AppBecomeActive(void* parg) {
  63. return 1;
  64. }
  65. //-------------------------------------------------------------------------------------------------
  66. //001F689C //^_^
  67. int AppDidEnterBackground(void* parg) {
  68. return 1;
  69. }
  70. //-------------------------------------------------------------------------------------------------
  71. //001F68CC //^_^
  72. int AppWillEnterForeground(void* parg) {
  73. return 1;
  74. }
  75. //-------------------------------------------------------------------------------------------------
  76. //001F683C //^_^
  77. int AppReceivedUrgentMemoryWarning(void* parg) {
  78. return 1;
  79. }
  80. //-------------------------------------------------------------------------------------------------
  81. //001F6898 //^_^
  82. int AppWillTerminate(void* parg) {
  83. return 1;
  84. }
  85. //-------------------------------------------------------------------------------------------------
  86. //001F6928 //^_^
  87. int AppRenderScene(void* parg) {
  88. Soccer_MainLoop();
  89. return 1;
  90. }
  91. //-------------------------------------------------------------------------------------------------
  92. //001F6954 //^_^
  93. void AppSetupCallbacks() {
  94. LOGE("AppSetupCallbacks");
  95. }
  96. //-------------------------------------------------------------------------------------------------