ERMScriptModule.cpp 754 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * ERMScriptModule.cpp, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #include "StdInc.h"
  11. #include "ERMScriptModule.h"
  12. #include "ERMInterpreter.h"
  13. IGameEventRealizer *acb;
  14. CPrivilegedInfoCallback *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 void GetNewModule(std::shared_ptr<CScriptingModule> &out)
  24. {
  25. out = std::make_shared<ERMInterpreter>();
  26. }