1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

* saving and resuming games should work!

(loading from the main menu, saving using "save [NAME]" command)
This commit is contained in:
Michał W. Urbańczyk
2009-01-12 20:05:56 +00:00
parent 3474fdaf05
commit b895fa35cb
15 changed files with 81 additions and 29 deletions

View File

@ -1032,6 +1032,7 @@ CPlayerInterface::CPlayerInterface(int Player, int serial)
playerID=Player;
serialID=serial;
human=true;
adventureInt = NULL;
pim = new boost::recursive_mutex;
showingDialog = new CondSh<bool>(false);
heroMoveSpeed = 2;
@ -1046,6 +1047,13 @@ CPlayerInterface::~CPlayerInterface()
{
delete pim;
delete showingDialog;
delete mainFPSmng;
delete adventureInt;
for(std::map<int,SDL_Surface*>::iterator i=graphics->heroWins.begin(); i!= graphics->heroWins.end(); i++)
SDL_FreeSurface(i->second);
for(std::map<int,SDL_Surface*>::iterator i=graphics->townWins.begin(); i!= graphics->townWins.end(); i++)
SDL_FreeSurface(i->second);
}
void CPlayerInterface::init(ICallback * CB)
{