ERMScriptModule.cpp 719 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "StdInc.h"
  2. #include "ERMScriptModule.h"
  3. #include "ERMInterpreter.h"
  4. /*
  5. * ERMScriptingModule.cpp, part of VCMI engine
  6. *
  7. * Authors: listed in file AUTHORS in main folder
  8. *
  9. * License: GNU General Public License v2.0 or later
  10. * Full text of license available in license.txt file, in main folder
  11. *
  12. */
  13. IGameEventRealizer *acb;
  14. CPrivilagedInfoCallback *icb;
  15. #ifdef __GNUC__
  16. #define strcpy_s(a, b, c) strncpy(a, c, b)
  17. #endif
  18. const char *g_cszAiName = "(V)ERM interpreter";
  19. extern "C" DLL_EXPORT void GetAiName(char* name)
  20. {
  21. strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
  22. }
  23. extern "C" DLL_EXPORT CScriptingModule* GetNewModule()
  24. {
  25. return new ERMInterpreter();
  26. }