mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-16 10:19:47 +02:00
b5daa24982
* AI libs registering shenanigans on android; * Fixed resolution aspect + mouse event scaling; * Proper server init/deinit (through android IPC); Enabled threaded init in CMT; * Prevented a deadlock in logger on some devices; * Fixed frozen intro frame after interrupting the video; Added android progressbar displaying during initial data loading; * Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution); * Changes/fixes for new android launcher building process; * Fixed app hang after getting SDL_QUIT when activity was destroyed; * Functioanal, configurable advmap swiping support; * VCMI changes cleanup; Added few missing VCMI_ANDROID guards on swipe mechanics; * Removed unneeded sleep in server startup code for android; * Removed android ioapi hack (fixed in newest ndk); * Removed unused android's library loading logic; * Added android's swipe option to settings schema; * Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
34 lines
758 B
C++
34 lines
758 B
C++
/*
|
|
* main.cpp, part of VCMI engine
|
|
*
|
|
* Authors: listed in file AUTHORS in main folder
|
|
*
|
|
* License: GNU General Public License v2.0 or later
|
|
* Full text of license available in license.txt file, in main folder
|
|
*
|
|
*/
|
|
#include "StdInc.h"
|
|
#include "../../lib/AI_Base.h"
|
|
#include "BattleAI.h"
|
|
|
|
#ifdef __GNUC__
|
|
#define strcpy_s(a, b, c) strncpy(a, c, b)
|
|
#endif
|
|
|
|
static const char *g_cszAiName = "Battle AI";
|
|
|
|
extern "C" DLL_EXPORT int GetGlobalAiVersion()
|
|
{
|
|
return AI_INTERFACE_VER;
|
|
}
|
|
|
|
extern "C" DLL_EXPORT void GetAiName(char* name)
|
|
{
|
|
strcpy_s(name, strlen(g_cszAiName) + 1, g_cszAiName);
|
|
}
|
|
|
|
extern "C" DLL_EXPORT void GetNewBattleAI(std::shared_ptr<CBattleGameInterface> &out)
|
|
{
|
|
out = std::make_shared<CBattleAI>();
|
|
}
|