main.cpp 427 B

1234567891011121314151617181920
  1. #include "StdInc.h"
  2. #include "../../lib/AI_Base.h"
  3. #include "BattleAI.h"
  4. #ifdef __GNUC__
  5. #define strcpy_s(a, b, c) strncpy(a, c, b)
  6. #endif
  7. const char *g_cszAiName = "Battle AI";
  8. extern "C" DLL_EXPORT void GetAiName(char* name)
  9. {
  10. strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
  11. }
  12. extern "C" DLL_EXPORT void GetNewBattleAI(shared_ptr<CBattleGameInterface> &out)
  13. {
  14. out = make_shared<CBattleAI>();
  15. }