1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

* battle settings will be remembered between battles

* call-ins for serializing client and playerinterfaces (not used really yet)
This commit is contained in:
Michał W. Urbańczyk
2009-03-28 18:46:20 +00:00
parent 42773e67f2
commit fca28fab10
12 changed files with 166 additions and 47 deletions

View File

@ -29,11 +29,14 @@ CGlobalAI * CAIHandler::getNewAI(CCallback * cb, std::string dllname)
void *dll = dlopen(dllname.c_str(), RTLD_LOCAL | RTLD_LAZY);
getName = (void(*)(char*))dlsym(dll,"GetAiName");
getAI = (CGlobalAI*(*)())dlsym(dll,"GetNewAI");
; //TODO: handle AI library on Linux
#endif
getName(temp);
tlog0 << "Loaded .dll with AI named " << temp << std::endl;
ret = getAI();
if(!ret)
tlog1 << "Cannot get AI!\n";
ret->dllName = dllname;
return ret;
}