1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

* MSVC compilation fixes

* campaign epilogues and minor fixes
This commit is contained in:
mateuszb
2013-02-23 19:16:14 +00:00
parent f40863b82f
commit 602827d1ae
8 changed files with 36 additions and 11 deletions

View File

@@ -524,10 +524,7 @@ void CClient::finishCampaign( shared_ptr<CCampaignState> camp )
void CClient::proposeNextMission(shared_ptr<CCampaignState> camp)
{
endGame(false);
LOCPLINT = nullptr; //TODO free res
GH.pushInt(new CBonusSelection(camp));
GH.curInt = CGPreGame::create();
}
void CClient::stopConnection()
@@ -679,6 +676,30 @@ int CClient::sendRequest(const CPack *request, TPlayerColor player)
return requestID;
}
void CClient::campaignMapFinished( shared_ptr<CCampaignState> camp )
{
endGame(false);
LOCPLINT = nullptr; //TODO free res
GH.curInt = CGPreGame::create();
auto & epilogue = camp->camp->scenarios[camp->mapsConquered.back()].epilog;
auto finisher = [&]()
{
if(camp->mapsRemaining.size())
proposeNextMission(camp);
else
finishCampaign(camp);
};
if(epilogue.hasPrologEpilog)
{
GH.pushInt(new CPrologEpilogVideo(epilogue, finisher));
}
else
{
finisher();
}
}
template void CClient::serialize( CISer<CLoadFile> &h, const int version );
template void CClient::serialize( COSer<CSaveFile> &h, const int version );