1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

- fixed compile issues. Renamed several "battleobstacleSplaced" to "battleobstacleplaced"

- implemented --disable-video command line switch
This commit is contained in:
Ivan Savenko
2012-05-05 08:32:55 +00:00
parent 7d706ba8a3
commit 82b60c00a2
4 changed files with 11 additions and 8 deletions

View File

@ -197,6 +197,7 @@ int main(int argc, char** argv)
("onlyAI", "runs without GUI, all players will be default AI") ("onlyAI", "runs without GUI, all players will be default AI")
("oneGoodAI", "puts one default AI and the rest will be EmptyAI") ("oneGoodAI", "puts one default AI and the rest will be EmptyAI")
("autoSkip", "automatically skip turns in GUI") ("autoSkip", "automatically skip turns in GUI")
("disable-video", "disable video player")
("nointro,i", "skips intro movies"); ("nointro,i", "skips intro movies");
po::variables_map vm; po::variables_map vm;
@ -265,7 +266,11 @@ int main(int argc, char** argv)
#if defined _M_X64 && defined _WIN32 //Win64 -> cannot load 32-bit DLLs for video handling #if defined _M_X64 && defined _WIN32 //Win64 -> cannot load 32-bit DLLs for video handling
CCS->videoh = new CEmptyVideoPlayer; CCS->videoh = new CEmptyVideoPlayer;
#else #else
CCS->videoh = new CVideoPlayer; if (!vm.count("disable-video"))
CCS->videoh = new CVideoPlayer;
else
CCS->videoh = new CEmptyVideoPlayer;
#endif #endif
tlog0<<"\tInitializing video: "<<pomtime.getDiff()<<std::endl; tlog0<<"\tInitializing video: "<<pomtime.getDiff()<<std::endl;

View File

@ -909,8 +909,7 @@ void CPlayerInterface::battleAttack(const BattleAttack *ba)
battleInt->stackAttacking( attacker, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo, attacked, false); battleInt->stackAttacking( attacker, ba->counter() ? curAction->destinationTile + shift : curAction->additionalInfo, attacked, false);
} }
} }
void CPlayerInterface::battleObstaclePlaced(const CObstacleInstance &obstacle)
void CPlayerInterface::battleObstaclesPlaced(const CObstacleInstance &obstacle)
{ {
EVENT_HANDLER_CALLED_BY_CLIENT; EVENT_HANDLER_CALLED_BY_CLIENT;
if(LOCPLINT != this) if(LOCPLINT != this)

View File

@ -597,7 +597,7 @@ void BattleTriggerEffect::applyCl(CClient * cl)
void BattleObstaclePlaced::applyCl(CClient * cl) void BattleObstaclePlaced::applyCl(CClient * cl)
{ {
BATTLE_INTERFACE_CALL_IF_PRESENT_FOR_BOTH_SIDES(battleObstaclesPlaced, obstacle); BATTLE_INTERFACE_CALL_IF_PRESENT_FOR_BOTH_SIDES(battleObstaclePlaced, obstacle);
} }
void BattleResult::applyFirstCl( CClient *cl ) void BattleResult::applyFirstCl( CClient *cl )

View File

@ -906,9 +906,9 @@ startWalking:
si.stacks.push_back(bsa); si.stacks.push_back(bsa);
sendAndApply(&si); sendAndApply(&si);
ObstaclesRemoved or; ObstaclesRemoved obsRem;
or.obstacles.insert(obstacle->uniqueID); obsRem.obstacles.insert(obstacle->uniqueID);
sendAndApply(&or); sendAndApply(&obsRem);
//if stack didn't die in explosion, continue movement //if stack didn't die in explosion, continue movement
if(curStack->alive()) if(curStack->alive())
@ -918,7 +918,6 @@ startWalking:
} }
} }
} }
return ret; return ret;
} }