diff options
author | Thanasis Antoniou | 2019-06-28 15:30:05 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-06-28 15:30:44 +0300 |
commit | a81e3add2f08692030607c8cde7965475793b86b (patch) | |
tree | c7a897ded452d141d110dfb7d0e6d5e1ebf3176f | |
parent | bd75898894e0f65663b1bc93c73d4ce0c7a91482 (diff) | |
download | scummvm-rg350-a81e3add2f08692030607c8cde7965475793b86b.tar.gz scummvm-rg350-a81e3add2f08692030607c8cde7965475793b86b.tar.bz2 scummvm-rg350-a81e3add2f08692030607c8cde7965475793b86b.zip |
BLADERUNNER: JANITORIAL: Code formatting fixes
42 files changed, 70 insertions, 70 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 98baf5bab4..4228e39273 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -344,12 +344,12 @@ Common::Error BladeRunnerEngine::run() { // when loading from ScummVM main menu, we should emulate // the Kia pause/resume in order to get a valid "current" time when the game // is actually loaded (assuming delays can be introduced by a popup warning dialogue) - if(!_time->isLocked()) { + if (!_time->isLocked()) { _time->pause(); } loadGameState(ConfMan.getInt("save_slot")); ConfMan.set("save_slot", "-1"); - if(_time->isLocked()) { + if (_time->isLocked()) { _time->resume(); } } else if (hasSavegames) { @@ -1925,7 +1925,7 @@ void BladeRunnerEngine::playerDied() { bool BladeRunnerEngine::saveGame(Common::WriteStream &stream, Graphics::Surface &thumbnail) { if ( !_gameIsAutoSaving && ( !playerHasControl() || _sceneScript->isInsideScript() || _aiScripts->isInsideScript()) - ){ + ) { return false; } @@ -2037,7 +2037,7 @@ bool BladeRunnerEngine::loadGame(Common::SeekableReadStream &stream) { if ((_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && !_cutContent) || (!_gameFlags->query(kFlagGamePlayedInRestoredContentMode) && _cutContent) - ){ + ) { Common::String warningMsg; if (!_cutContent) { warningMsg = _("WARNING: This game was saved in Restored Cut Content mode, but you are playing in Original Content mode. The mode will be adjusted to Restored Cut Content for this session until you completely Quit the game."); diff --git a/engines/bladerunner/chapters.cpp b/engines/bladerunner/chapters.cpp index f063801451..b226f5f19c 100644 --- a/engines/bladerunner/chapters.cpp +++ b/engines/bladerunner/chapters.cpp @@ -43,7 +43,7 @@ bool Chapters::enterChapter(int chapter) { for (int chi = 1; chi < 4; ++chi) { if (!_vm->isArchiveOpen(Common::String::format("%d.TLK", chi)) && !_vm->openArchive(Common::String::format("%d.TLK", chi)) - ){ + ) { return false; } } diff --git a/engines/bladerunner/combat.cpp b/engines/bladerunner/combat.cpp index 08d8ce2cc7..afe339c5e5 100644 --- a/engines/bladerunner/combat.cpp +++ b/engines/bladerunner/combat.cpp @@ -61,7 +61,7 @@ void Combat::reset() { } void Combat::activate() { - if(_enabled) { + if (_enabled) { _vm->_playerActor->combatModeOn(-1, true, -1, -1, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, _vm->_combat->_ammoDamage[_vm->_settings->getAmmoType()], 0, false); _active = true; } diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp index f22f924321..e497de3d6d 100644 --- a/engines/bladerunner/debugger.cpp +++ b/engines/bladerunner/debugger.cpp @@ -140,7 +140,7 @@ Debugger::Debugger(BladeRunnerEngine *vm) : GUI::Debugger() { } Debugger::~Debugger() { - if(!_specificDrawnObjectsList.empty()) { + if (!_specificDrawnObjectsList.empty()) { _specificDrawnObjectsList.clear(); } } @@ -379,7 +379,7 @@ bool Debugger::cmdDraw(int argc, const char **argv) { debugPrintf("Drawing Z buffer = %s\n", _viewZBuffer? "true" : "false"); } else if (arg == "reset") { - if(!_specificDrawnObjectsList.empty()) { + if (!_specificDrawnObjectsList.empty()) { _specificDrawnObjectsList.clear(); } @@ -1203,7 +1203,7 @@ bool Debugger::cmdOverlay(int argc, const char **argv) { if ( (overlaysList[itemIter].resourceId == chapterIdOverlaysAvailableInt) || ( modeMixOverlaysAvailableFlg && overlaysList[itemIter].resourceId == 6) ) { - if (strcmp(overlaysList[itemIter].name, overlayName.c_str()) == 0){ + if (strcmp(overlaysList[itemIter].name, overlayName.c_str()) == 0) { break; } } @@ -1218,7 +1218,7 @@ bool Debugger::cmdOverlay(int argc, const char **argv) { // Attempt to load the overlay in an empty slot // even if it's not already loaded for the scene (in _vm->_overlays->_videos) int overlayVideoIdx = _vm->_overlays->play(overlayName, overlayAnimationId, loopForever, startNowFlag, 0); - if( overlayVideoIdx == -1 ) { + if ( overlayVideoIdx == -1 ) { debugPrintf("Could not load the overlay animation: %s in this scene. Try reseting overlays first to free up slots!\n", overlayName.c_str()); } else { debugPrintf("Loading overlay animation: %s...\n", overlayName.c_str()); @@ -1464,7 +1464,7 @@ bool Debugger::cmdObject(int argc, const char **argv) { Vector3 positionBottomRight(atof(argv[3]), atof(argv[4]), atof(argv[5])); Vector3 positionTopLeft(atof(argv[6]), atof(argv[7]), atof(argv[8])); _vm->_scene->_set->_objects[objectId].bbox.setXYZ(positionBottomRight.x, positionBottomRight.y, positionBottomRight.z, positionTopLeft.x, positionTopLeft.y, positionTopLeft.z); - if (!_vm->_sceneIsLoading && _vm->_sceneObjects->remove(objectId + kSceneObjectOffsetObjects)){ + if (!_vm->_sceneIsLoading && _vm->_sceneObjects->remove(objectId + kSceneObjectOffsetObjects)) { _vm->_sceneObjects->addObject(objectId + kSceneObjectOffsetObjects, _vm->_scene->_set->_objects[objectId].bbox, _vm->_scene->_set->_objects[objectId].isClickable, @@ -1676,7 +1676,7 @@ bool Debugger::cmdRegion(int argc, const char **argv) { debugPrintf("A region id has to be an integer within [0, 9]\n"); return true; } - if (modeName == "add" && ((regionTypeName == "reg" && argc == 8) || (regionTypeName == "exit" && argc == 9)) ){ + if (modeName == "add" && ((regionTypeName == "reg" && argc == 8) || (regionTypeName == "exit" && argc == 9)) ) { // add region mode if (!regions->_regions[regionID].present) { int type = 0; @@ -2061,7 +2061,7 @@ bool Debugger::cmdList(int argc, const char **argv) { int count = 0; for (int i = 0; i < _vm->_waypoints->_count; i++) { Waypoints::Waypoint *waypoint = &_vm->_waypoints->_waypoints[i]; - if(waypoint->setId != _vm->_scene->getSetId()) { + if (waypoint->setId != _vm->_scene->getSetId()) { continue; } char waypointText[40]; @@ -2358,7 +2358,7 @@ void Debugger::drawWaypoints() { //draw world waypoints for (int i = 0; i < _vm->_waypoints->_count; i++) { Waypoints::Waypoint *waypoint = &_vm->_waypoints->_waypoints[i]; - if(waypoint->setId != _vm->_scene->getSetId()) { + if (waypoint->setId != _vm->_scene->getSetId()) { continue; } if (_viewWaypointsNormalToggle @@ -2506,7 +2506,7 @@ int Debugger::findInDbgDrawList(DebuggerDrawnObjectType drObjType, int drObjId, && (drObjId == -1 || drObjId == _specificDrawnObjectsList[i].objId) && (drObjSetId == -1 || _specificDrawnObjectsList[i].setId == -1 || drObjSetId == _specificDrawnObjectsList[i].setId) && (drObjSceneId == -1 || _specificDrawnObjectsList[i].sceneId == -1 || drObjSceneId == _specificDrawnObjectsList[i].sceneId) - ){ + ) { // TODO for actors, 3d objects, items and waypoints it's probably preferable to ignore the sceneId (?) return i; } diff --git a/engines/bladerunner/dialogue_menu.cpp b/engines/bladerunner/dialogue_menu.cpp index 09e34dc17c..9d09b5f874 100644 --- a/engines/bladerunner/dialogue_menu.cpp +++ b/engines/bladerunner/dialogue_menu.cpp @@ -343,7 +343,7 @@ void DialogueMenu::draw(Graphics::Surface &s) { if (_items[i].colorIntensity < targetColorIntensity) { _items[i].colorIntensity += 4; - if(_items[i].colorIntensity > targetColorIntensity) { + if (_items[i].colorIntensity > targetColorIntensity) { _items[i].colorIntensity = targetColorIntensity; } } else if (_items[i].colorIntensity > targetColorIntensity) { diff --git a/engines/bladerunner/light.cpp b/engines/bladerunner/light.cpp index 0590630dbb..ff9b9eb804 100644 --- a/engines/bladerunner/light.cpp +++ b/engines/bladerunner/light.cpp @@ -115,7 +115,7 @@ void Light::readVqa(Common::ReadStream *stream, int frameCount, int frame, int a int size = stream->readUint32LE(); - if(_animationData != nullptr) { + if (_animationData != nullptr) { delete[] _animationData; } diff --git a/engines/bladerunner/mouse.cpp b/engines/bladerunner/mouse.cpp index b519fbd1f0..91c4d94368 100644 --- a/engines/bladerunner/mouse.cpp +++ b/engines/bladerunner/mouse.cpp @@ -242,7 +242,7 @@ void Mouse::draw(Graphics::Surface &surface, int x, int y) { if (!_randomCountdownX) setMouseJitterDown(); - } else if (_randomCountdownY > 0){ + } else if (_randomCountdownY > 0) { _randomCountdownY--; x += _randomX; y += _randomY; diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp index c94f271e2d..8944124e5b 100644 --- a/engines/bladerunner/obstacles.cpp +++ b/engines/bladerunner/obstacles.cpp @@ -727,7 +727,7 @@ bool Obstacles::findFarthestAvailablePathVertex(Vector2 *path, int pathSize, Vec } // neighboring vertices are always available - if (foundVertexNeighbor){ + if (foundVertexNeighbor) { farthestPathIndex = pathVertexIdx; continue; } diff --git a/engines/bladerunner/screen_effects.cpp b/engines/bladerunner/screen_effects.cpp index fbab21908b..dfcbd0751f 100644 --- a/engines/bladerunner/screen_effects.cpp +++ b/engines/bladerunner/screen_effects.cpp @@ -37,7 +37,7 @@ ScreenEffects::~ScreenEffects() { delete[] _data; #if BLADERUNNER_ORIGINAL_BUGS #else - if(!_skipEntries.empty()) { + if (!_skipEntries.empty()) { _skipEntries.clear(); } #endif // BLADERUNNER_ORIGINAL_BUGS @@ -65,7 +65,7 @@ void ScreenEffects::toggleEntry(int effectId, bool skip) { } } _skipEntries.insert_at(newSlot, effectId); - } else if (!skip && foundAt >= 0 ){ + } else if (!skip && foundAt >= 0 ) { _skipEntries.remove_at(foundAt); } } else if (effectId == -1 && !skip) { @@ -155,7 +155,7 @@ void ScreenEffects::readVqa(Common::SeekableReadStream *stream) { // if (entry.width < (width >> 1) + xx) { // if (entry.width + entry.x > xx) { // if (entry.height < (height >> 1) + yy) { -// if(entry.height + entry.y > yy) { +// if (entry.height + entry.y > yy) { // return true; // } // } diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp index 57aa681e1c..09be4167c1 100644 --- a/engines/bladerunner/script/ai/generic_walker_a.cpp +++ b/engines/bladerunner/script/ai/generic_walker_a.cpp @@ -219,7 +219,7 @@ bool AIScriptGenericWalkerA::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; break; case kGenericWalkerAStatesWalk: - switch (Global_Variable_Query(kVariableGenericWalkerAModel)){ + switch (Global_Variable_Query(kVariableGenericWalkerAModel)) { case 0: *animation = 424; break; diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp index ebeb2d3606..8bd17fa92d 100644 --- a/engines/bladerunner/script/ai/generic_walker_b.cpp +++ b/engines/bladerunner/script/ai/generic_walker_b.cpp @@ -205,7 +205,7 @@ bool AIScriptGenericWalkerB::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; break; case kGenericWalkerBStatesWalk: - switch (Global_Variable_Query(kVariableGenericWalkerBModel)){ + switch (Global_Variable_Query(kVariableGenericWalkerBModel)) { case 0: *animation = 424; break; diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp index 3bac200358..159c57a319 100644 --- a/engines/bladerunner/script/ai/generic_walker_c.cpp +++ b/engines/bladerunner/script/ai/generic_walker_c.cpp @@ -206,7 +206,7 @@ bool AIScriptGenericWalkerC::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; break; case kGenericWalkerCStatesWalk: - switch (Global_Variable_Query(kVariableGenericWalkerCModel)){ + switch (Global_Variable_Query(kVariableGenericWalkerCModel)) { case 0: *animation = 424; break; diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp index 7923c0f108..7d47623af2 100644 --- a/engines/bladerunner/script/ai/gordo.cpp +++ b/engines/bladerunner/script/ai/gordo.cpp @@ -500,7 +500,7 @@ bool AIScriptGordo::GoalChanged(int currentGoalNumber, int newGoalNumber) { break; case kGoalGordoNR02NextAct: - switch(Global_Variable_Query(kVariableGordosJoke)) { + switch (Global_Variable_Query(kVariableGordosJoke)) { case 0: Global_Variable_Increment(kVariableGordosJoke, 1); Actor_Set_Goal_Number(kActorGordo, kGoalGordoNR02TellJoke1); @@ -1634,7 +1634,7 @@ void AIScriptGordo::talkToMcCoyInCity() { Game_Flag_Set(kFlagGordoTalk2); AI_Movement_Track_Unpause(kActorGordo); } else { - switch(Random_Query(1, 4)) { + switch (Random_Query(1, 4)) { case 1: Actor_Says(kActorMcCoy, 6460, 13); break; diff --git a/engines/bladerunner/script/ai/lucy.cpp b/engines/bladerunner/script/ai/lucy.cpp index 37ae7b46e2..5b1b2d3a64 100644 --- a/engines/bladerunner/script/ai/lucy.cpp +++ b/engines/bladerunner/script/ai/lucy.cpp @@ -113,7 +113,7 @@ bool AIScriptLucy::Update() { void AIScriptLucy::TimerExpired(int timer) { if (timer == kActorTimerAIScriptCustomTask0) { // rephrased this to be more expandable (if required) AI_Countdown_Timer_Reset(kActorLucy, kActorTimerAIScriptCustomTask0); - if(Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03) { + if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyGoToHF03) { if (Player_Query_Current_Scene() == kSceneHF03) { AI_Countdown_Timer_Start(kActorLucy, kActorTimerAIScriptCustomTask0, 20); } else { diff --git a/engines/bladerunner/script/ai/rachael.cpp b/engines/bladerunner/script/ai/rachael.cpp index 000d3d2556..0305dc4bcc 100644 --- a/engines/bladerunner/script/ai/rachael.cpp +++ b/engines/bladerunner/script/ai/rachael.cpp @@ -87,7 +87,7 @@ void AIScriptRachael::ClickedByPlayer() { // the structure is simplified (maintaining the same logic flow) if ((Player_Query_Agenda() == kPlayerAgendaSurly || Player_Query_Agenda() == kPlayerAgendaErratic) || (Player_Query_Agenda() != kPlayerAgendaPolite && Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy)) - ){ + ) { dialogue_agenda2(); } else { dialogue_agenda1(); @@ -155,7 +155,7 @@ bool AIScriptRachael::GoalChanged(int currentGoalNumber, int newGoalNumber) { // the structure is simplified (maintaining the same logic flow) if ((Player_Query_Agenda() == kPlayerAgendaSurly || Player_Query_Agenda() == kPlayerAgendaErratic) || (Player_Query_Agenda() != kPlayerAgendaPolite && Actor_Query_Friendliness_To_Other(kActorSteele, kActorMcCoy) > Actor_Query_Friendliness_To_Other(kActorClovis, kActorMcCoy)) - ){ + ) { dialogue_agenda2(); } else { dialogue_agenda1(); @@ -392,7 +392,7 @@ void AIScriptRachael::dialogue_start() { if (_vm->_cutContent) { Actor_Face_Actor(kActorRachael, kActorMcCoy, true); Loop_Actor_Walk_To_Actor(kActorRachael, kActorMcCoy, 84, false, false); - if(_vm->_cutContent) { + if (_vm->_cutContent) { Actor_Says(kActorMcCoy, 2735, 14); // MetAtYourUnclesOffice } Actor_Says(kActorRachael, 0, 15); // RememberYouMisterMcCoy diff --git a/engines/bladerunner/script/ai/zuben.cpp b/engines/bladerunner/script/ai/zuben.cpp index 7cde5456a8..8fbcb77a35 100644 --- a/engines/bladerunner/script/ai/zuben.cpp +++ b/engines/bladerunner/script/ai/zuben.cpp @@ -490,7 +490,7 @@ bool AIScriptZuben::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Append_With_Facing(kActorZuben, 470, 3, 506); AI_Movement_Track_Append(kActorZuben, 471, 5); AI_Movement_Track_Append(kActorZuben, 472, 0); - } else if (rnd2 == 3){ + } else if (rnd2 == 3) { AI_Movement_Track_Flush(kActorZuben); AI_Movement_Track_Append(kActorZuben, 468, 0); AI_Movement_Track_Append(kActorZuben, 469, 3); diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp index 6addc4382b..118ae24e4f 100644 --- a/engines/bladerunner/script/ai_script.cpp +++ b/engines/bladerunner/script/ai_script.cpp @@ -192,7 +192,7 @@ void AIScripts::clickedByPlayer(int actor) { } - if(_vm->_actors[actor]->inCombat()) { + if (_vm->_actors[actor]->inCombat()) { return; } diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp index 18fbda0246..a1a63bf22e 100644 --- a/engines/bladerunner/script/scene/ct01.cpp +++ b/engines/bladerunner/script/scene/ct01.cpp @@ -73,7 +73,7 @@ void SceneScriptCT01::InitializeScene() { if ( Global_Variable_Query(kVariableChapter) < 4 && Actor_Query_Which_Set_In(kActorGordo) != kSetCT01_CT12 && Random_Query(1, 2) == 1 - ){ + ) { // enhancement: don't always play Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kCT01LoopInshot, false); } @@ -512,7 +512,7 @@ void SceneScriptCT01::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -330.0f, -6.5f, 221.0f, 0, false, false, false); if (_vm->_cutContent) { // unpause generic walkers here, less chance to collide with McCOy while he enters the scene - if( Game_Flag_Query(kFlagArrivedFromSpinner1) + if (Game_Flag_Query(kFlagArrivedFromSpinner1) && Global_Variable_Query(kVariableGenericWalkerConfig) < 0 ) { Global_Variable_Set(kVariableGenericWalkerConfig, 2); diff --git a/engines/bladerunner/script/scene/ma06.cpp b/engines/bladerunner/script/scene/ma06.cpp index 319e30429d..935d16238a 100644 --- a/engines/bladerunner/script/scene/ma06.cpp +++ b/engines/bladerunner/script/scene/ma06.cpp @@ -115,7 +115,7 @@ void SceneScriptMA06::PlayerWalkedIn() { // if ((Game_Flag_Query(kFlagMA07toMA06) || Game_Flag_Query(kFlagMA01toMA06)) && Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelIsInsideMcCoysElevatorAct3 - ){ + ) { normalElevatorBusiness = false; // Act 3 Deleted scene (can happen within the elevator or outside the building) // Skip floor panel selection - force go to MCCOY 88F @@ -154,7 +154,7 @@ void SceneScriptMA06::PlayerWalkedIn() { Sound_Play(kSfxELDOORO2, 100, 50, 50, 50); } else if (Game_Flag_Query(kFlagMA02toMA06) && Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelIsInsideMcCoysElevatorAct4 - ){ + ) { normalElevatorBusiness = false; // Act 4 deleted scene case with Rachael // diff --git a/engines/bladerunner/script/scene/ma07.cpp b/engines/bladerunner/script/scene/ma07.cpp index e821fc3c2b..ec69b3d3d5 100644 --- a/engines/bladerunner/script/scene/ma07.cpp +++ b/engines/bladerunner/script/scene/ma07.cpp @@ -54,7 +54,7 @@ void SceneScriptMA07::InitializeScene() { void SceneScriptMA07::SceneLoaded() { Obstacle_Object("BARRICADE", true); - if(_vm->_cutContent) { + if (_vm->_cutContent) { if (Actor_Query_Goal_Number(kActorRachael) == kGoalRachaelShouldBeOutsideMcCoysAct3) { Actor_Set_Goal_Number(kActorRachael, kGoalRachaelIsOutsideMcCoysBuildingAct3); } diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp index 241307cc61..b35fd5d27b 100644 --- a/engines/bladerunner/script/scene/nr02.cpp +++ b/engines/bladerunner/script/scene/nr02.cpp @@ -118,7 +118,7 @@ bool SceneScriptNR02::ClickedOnItem(int itemId, bool a2) { if (itemId == kItemGordosLighterReplicant || itemId == kItemGordosLighterHuman ) { - if(!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, false)) { + if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 109.38f, -24.0f, 420.5f, 0, true, false, false)) { Actor_Face_Heading(kActorMcCoy, 423, false); if (itemId == kItemGordosLighterReplicant) { Item_Remove_From_World(kItemGordosLighterReplicant); diff --git a/engines/bladerunner/script/scene/nr03.cpp b/engines/bladerunner/script/scene/nr03.cpp index 534e64f9f0..861b7300d1 100644 --- a/engines/bladerunner/script/scene/nr03.cpp +++ b/engines/bladerunner/script/scene/nr03.cpp @@ -230,7 +230,7 @@ bool SceneScriptNR03::ClickedOn2DRegion(int region) { if (region == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 79.2f, -70.19f, -984.0f, 12, true, false, false)) { Actor_Face_Actor(kActorMcCoy, kActorHysteriaPatron1, true); - switch(Random_Query(0, 4)) { + switch (Random_Query(0, 4)) { case 0: Actor_Says(kActorMcCoy, 1055, kAnimationModeTalk); break; @@ -248,8 +248,8 @@ bool SceneScriptNR03::ClickedOn2DRegion(int region) { break; #else case 4: - if(_vm->_cutContent) { - switch(Random_Query(1, 10)) { + if (_vm->_cutContent) { + switch (Random_Query(1, 10)) { case 1: // fall through case 2: diff --git a/engines/bladerunner/script/scene/nr05.cpp b/engines/bladerunner/script/scene/nr05.cpp index 39f8aab373..22ef1aabed 100644 --- a/engines/bladerunner/script/scene/nr05.cpp +++ b/engines/bladerunner/script/scene/nr05.cpp @@ -323,7 +323,7 @@ void SceneScriptNR05::talkToEarlyQ() { int answer = Dialogue_Menu_Query_Input(); Dialogue_Menu_Disappear(); - switch(answer){ + switch (answer) { case 890: // JEWELRY Actor_Says(kActorMcCoy, 3505, kAnimationModeTalk); Actor_Modify_Friendliness_To_Other(kActorEarlyQ, kActorMcCoy, -1); diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp index 8b1e469ed5..2ed5c78488 100644 --- a/engines/bladerunner/script/scene/rc01.cpp +++ b/engines/bladerunner/script/scene/rc01.cpp @@ -726,7 +726,7 @@ void SceneScriptRC01::PlayerWalkedOut() { if (!Game_Flag_Query(kFlagRC01toRC02) && !Game_Flag_Query(kFlagRC01toRC03) ) { - if(Global_Variable_Query(kVariableChapter) == 1) { + if (Global_Variable_Query(kVariableChapter) == 1) { if (_vm->_cutContent) { Outtake_Play(kOuttakeAscent, true, -1); } diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp index 8ff6b4842d..f3fc451f8c 100644 --- a/engines/bladerunner/script/scene/ug04.cpp +++ b/engines/bladerunner/script/scene/ug04.cpp @@ -85,7 +85,7 @@ void SceneScriptUG04::SceneLoaded() { #else if ((Global_Variable_Query(kVariableChapter) == 3) || (Global_Variable_Query(kVariableChapter) > 3 && Random_Query(1, 4) == 1) - ){ + ) { // Enhancement: don't always play the overground train after chapter 3 // Bug fix: don't remove control from player. There is no chance to glitch into the scenery // while the video is playing and rats may attack! diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index 19bfb001e3..c8951625aa 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -200,7 +200,7 @@ void SceneScriptUG05::PlayerWalkedIn() { Actor_Put_In_Set(kActorDektora, kSetUG05); Actor_Set_At_XYZ(kActorDektora, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorDektora); - } else if (affectionTowardsActor == kActorLucy){ + } else if (affectionTowardsActor == kActorLucy) { Actor_Put_In_Set(kActorLucy, kSetUG05); Actor_Set_At_XYZ(kActorLucy, -100.0f, -10.31f, -906.0f, 866); Actor_Force_Stop_Walking(kActorLucy); diff --git a/engines/bladerunner/script/scene_script.cpp b/engines/bladerunner/script/scene_script.cpp index 521566e823..8cfe8b3055 100644 --- a/engines/bladerunner/script/scene_script.cpp +++ b/engines/bladerunner/script/scene_script.cpp @@ -265,7 +265,7 @@ void SceneScript::sceneFrameAdvanced(int frame) { void SceneScript::actorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { _inScriptCounter++; - if(_currentScript) + if (_currentScript) _currentScript->ActorChangedGoal(actorId, newGoal, oldGoal, currentSet); _inScriptCounter--; } diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 1410709cbb..a0c27ae431 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -1199,7 +1199,7 @@ void ScriptBase::Ambient_Sounds_Remove_Sound(int sfxId, bool stopPlaying) { _vm->_ambientSounds->removeNonLoopingSound(sfxId, stopPlaying); } -void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int actorId, int sentenceId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk){ +void ScriptBase::Ambient_Sounds_Add_Speech_Sound(int actorId, int sentenceId, int timeMin, int timeMax, int volumeMin, int volumeMax, int panStartMin, int panStartMax, int panEndMin, int panEndMax, int priority, int unk) { debugC(kDebugScript, "Ambient_Sounds_Add_Speech_Sound(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", actorId, sentenceId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk); _vm->_ambientSounds->addSpeech(actorId, sentenceId, timeMin, timeMax, volumeMin, volumeMax, panStartMin, panStartMax, panEndMin, panEndMax, priority, unk); } @@ -1231,7 +1231,7 @@ void ScriptBase::Ambient_Sounds_Adjust_Looping_Sound(int sfxId, int volume, int _vm->_ambientSounds->adjustLoopingSound(sfxId, volume, pan, delay); } -void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int sfxId, int delay){ +void ScriptBase::Ambient_Sounds_Remove_Looping_Sound(int sfxId, int delay) { debugC(kDebugScript, "Ambient_Sounds_Remove_Looping_Sound(%d, %d)", sfxId, delay); _vm->_ambientSounds->removeLoopingSound(sfxId, delay); } @@ -1507,7 +1507,7 @@ void ScriptBase::ESPER_Flag_To_Activate() { } } -void ScriptBase::Voight_Kampff_Activate(int actorId, int calibrationRatio){ +void ScriptBase::Voight_Kampff_Activate(int actorId, int calibrationRatio) { debugC(kDebugScript, "Voight_Kampff_Activate(%d, %d)", actorId, calibrationRatio); _vm->_vk->open(actorId, calibrationRatio); while (_vm->_vk->isOpen() && _vm->_gameIsRunning) { diff --git a/engines/bladerunner/script/vk_script.cpp b/engines/bladerunner/script/vk_script.cpp index 158f9eb72b..30dede7721 100644 --- a/engines/bladerunner/script/vk_script.cpp +++ b/engines/bladerunner/script/vk_script.cpp @@ -483,7 +483,7 @@ void VKScript::SCRIPT_VK_DLL_McCoy_Asks_Question(int actorId, int questionId) { if ( _vm->_debugger->_playFullVk ) { if (++_questionCounter >= 40) { - switch(actorId) { + switch (actorId) { case kActorLucy: //debug("Last Lucy Question!"); if (Game_Flag_Query(kFlagLucyIsReplicant)) { diff --git a/engines/bladerunner/slice_animations.cpp b/engines/bladerunner/slice_animations.cpp index 15a5a5079e..553f153356 100644 --- a/engines/bladerunner/slice_animations.cpp +++ b/engines/bladerunner/slice_animations.cpp @@ -155,7 +155,7 @@ bool SliceAnimations::openFrames(int fileNumber) { ) { // For Chapter1 we try both CDFRAMES.DAT and CDFRAMES1.DAT return false; - } else if(i != 1 && + } else if (i != 1 && !_framesPageFile.open(Common::String::format("CDFRAMES%d.DAT", i), i) ) { return false; @@ -176,7 +176,7 @@ bool SliceAnimations::PageFile::open(const Common::String &name, int8 fileIdx) { return false; if (!_sliceAnimations->_vm->_cutContent - || (_pageOffsets.size() < _sliceAnimations->_pageCount) ){ + || (_pageOffsets.size() < _sliceAnimations->_pageCount) ) { _pageOffsets.resize(_sliceAnimations->_pageCount); _pageOffsetsFileIdx.resize(_sliceAnimations->_pageCount); for (uint32 i = 0; i != _sliceAnimations->_pageCount; ++i) { diff --git a/engines/bladerunner/subtitles.cpp b/engines/bladerunner/subtitles.cpp index a9c9af30f5..80e56f327d 100644 --- a/engines/bladerunner/subtitles.cpp +++ b/engines/bladerunner/subtitles.cpp @@ -266,7 +266,7 @@ const char *Subtitles::getOuttakeSubsText(const Common::String &outtakesName, in // Search in the requested TextResource at the fileIdx index of the _vqaSubsTextResourceEntries table for a quote that corresponds to the specified video frame // debug("Number of resource quotes to search: %d, requested frame: %u", _vqaSubsTextResourceEntries[fileIdx]->getCount(), (uint32)frame ); const Common::String &text = _vqaSubsTextResourceEntries[fileIdx]->getOuttakeTextByFrame((uint32)frame); - //if(text != "") { + //if (text != "") { // debug("Text = %s", text.c_str()); //} if (_currentSubtitleTextFull != Common::String(text)) { diff --git a/engines/bladerunner/text_resource.cpp b/engines/bladerunner/text_resource.cpp index f6d9657376..3e96da2921 100644 --- a/engines/bladerunner/text_resource.cpp +++ b/engines/bladerunner/text_resource.cpp @@ -107,7 +107,7 @@ const char *TextResource::getText(uint32 id) const { const char *TextResource::getOuttakeTextByFrame(uint32 frame) const { for (uint32 i = 0; i != _count; ++i) { //debug("Checking %d - so within: %d , %d", _ids[i], (0x0000FFFF & _ids[i]), ((_ids[i] >> 16) & 0x0000FFFF ) ); - if ((frame >= (0x0000FFFF & _ids[i]) ) && (frame < ((_ids[i] >> 16) & 0x0000FFFF ) )){ + if ((frame >= (0x0000FFFF & _ids[i]) ) && (frame < ((_ids[i] >> 16) & 0x0000FFFF ) )) { // we found an id with lower 16bits smaller or equal to our frame key // and with higher 16 bits higher than the frame key return _strings + _offsets[i]; diff --git a/engines/bladerunner/ui/esper.cpp b/engines/bladerunner/ui/esper.cpp index fd94977fbc..355865f1f2 100644 --- a/engines/bladerunner/ui/esper.cpp +++ b/engines/bladerunner/ui/esper.cpp @@ -823,7 +823,7 @@ void ESPER::drawPhotoSharpening(Graphics::Surface &surface) { surface.hLine(_screen.left, _photoOpeningHeight - 1, _screen.right - 1, surface.format.RGBToColor(0, 144, 0)); surface.vLine(_photoOpeningWidth - 1, _screen.top, _screen.bottom - 1, surface.format.RGBToColor(0, 144, 0)); if (!needMoreSharpening) { - if (_regionSelectedAck && !_regions[_regionSelected].name.empty()){ + if (_regionSelectedAck && !_regions[_regionSelected].name.empty()) { setStatePhoto(kEsperPhotoStateVideoShow); } else { setStatePhoto(kEsperPhotoStateShow); @@ -1467,7 +1467,7 @@ int ESPER::findEmptyRegion() { int ESPER::findRegion(Common::Rect where) { for (int i = 0; i < kRegionCount; ++i) { - if (_regions[i].isPresent && _regions[i].rectOuter.contains(where) && where.contains(_regions[i].rectInner)){ + if (_regions[i].isPresent && _regions[i].rectOuter.contains(where) && where.contains(_regions[i].rectInner)) { return i; } } diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp index 70a6d4eff5..9f7cac81d4 100644 --- a/engines/bladerunner/ui/kia.cpp +++ b/engines/bladerunner/ui/kia.cpp @@ -610,7 +610,7 @@ void KIA::mouseDownCallback(int buttonId, void *callbackData) { case 13: case 14: self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxBUTN5P), 70, 0, 0, 50, 0); - if (buttonId == 12){ + if (buttonId == 12) { self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxSHUTDOWN), 70, 0, 0, 50, 0); } break; diff --git a/engines/bladerunner/ui/kia_section_clues.cpp b/engines/bladerunner/ui/kia_section_clues.cpp index 35a4294dca..0557402a28 100644 --- a/engines/bladerunner/ui/kia_section_clues.cpp +++ b/engines/bladerunner/ui/kia_section_clues.cpp @@ -386,7 +386,7 @@ void KIASectionClues::populateClues() { int assetType = _vm->_crimesDatabase->getAssetType(i); int crimeId = _vm->_crimesDatabase->getCrime(i); if (assetType != -1 || _debugIntangible) { - if(_filters[getLineIdForAssetType(assetType)] && _filters[getLineIdForCrimeId(crimeId)]) { + if (_filters[getLineIdForAssetType(assetType)] && _filters[getLineIdForCrimeId(crimeId)]) { int flags = 0x30; if (_clues->isPrivate(i)) { flags = 0x08; diff --git a/engines/bladerunner/ui/kia_section_crimes.cpp b/engines/bladerunner/ui/kia_section_crimes.cpp index 99372092a1..9dbe090913 100644 --- a/engines/bladerunner/ui/kia_section_crimes.cpp +++ b/engines/bladerunner/ui/kia_section_crimes.cpp @@ -438,7 +438,7 @@ void KIASectionCrimes::nextCrime() { if (_crimesFoundCount >= 2) { while (true) { ++_crimeSelected; - if (_crimeSelected >= (int)_vm->_gameInfo->getCrimeCount()){ + if (_crimeSelected >= (int)_vm->_gameInfo->getCrimeCount()) { _crimeSelected = 0; } @@ -470,7 +470,7 @@ void KIASectionCrimes::nextSuspect() { if (_suspectsFoundCount >= 2) { while (true) { ++_suspectSelected; - if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()){ + if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()) { _suspectSelected = 0; } @@ -486,7 +486,7 @@ void KIASectionCrimes::prevSuspect() { if (_suspectsFoundCount >= 2) { while (true) { --_suspectSelected; - if (_suspectSelected < 0){ + if (_suspectSelected < 0) { _suspectSelected = _vm->_gameInfo->getSuspectCount() - 1; } diff --git a/engines/bladerunner/ui/kia_section_help.cpp b/engines/bladerunner/ui/kia_section_help.cpp index 1c4da14db7..7f1cb31b01 100644 --- a/engines/bladerunner/ui/kia_section_help.cpp +++ b/engines/bladerunner/ui/kia_section_help.cpp @@ -68,7 +68,7 @@ void KIASectionHelp::close() { _scrollBox->hide(); } -void KIASectionHelp::draw(Graphics::Surface &surface){ +void KIASectionHelp::draw(Graphics::Surface &surface) { _vm->_kia->_shapes->get(69)->draw(surface, 501, 123); _uiContainer->draw(surface); } diff --git a/engines/bladerunner/ui/kia_section_load.cpp b/engines/bladerunner/ui/kia_section_load.cpp index 909f29b2b9..42ace56e0d 100644 --- a/engines/bladerunner/ui/kia_section_load.cpp +++ b/engines/bladerunner/ui/kia_section_load.cpp @@ -96,7 +96,7 @@ void KIASectionLoad::close() { _saveList.clear(); } -void KIASectionLoad::draw(Graphics::Surface &surface){ +void KIASectionLoad::draw(Graphics::Surface &surface) { _vm->_kia->_shapes->get(69)->draw(surface, 501, 123); _uiContainer->draw(surface); diff --git a/engines/bladerunner/ui/kia_section_save.cpp b/engines/bladerunner/ui/kia_section_save.cpp index 86f6b01c94..daa92b45c9 100644 --- a/engines/bladerunner/ui/kia_section_save.cpp +++ b/engines/bladerunner/ui/kia_section_save.cpp @@ -143,7 +143,7 @@ void KIASectionSave::close() { _saveList.clear(); } -void KIASectionSave::draw(Graphics::Surface &surface){ +void KIASectionSave::draw(Graphics::Surface &surface) { _vm->_kia->_shapes->get(69)->draw(surface, 501, 123); _buttons->draw(surface); diff --git a/engines/bladerunner/ui/kia_section_suspects.cpp b/engines/bladerunner/ui/kia_section_suspects.cpp index 220b269f9d..814e343899 100644 --- a/engines/bladerunner/ui/kia_section_suspects.cpp +++ b/engines/bladerunner/ui/kia_section_suspects.cpp @@ -292,7 +292,7 @@ const char *KIASectionSuspects::scrambleSuspectsName(const char *name) { for (int i = 0 ; i < 6; ++i) { if (Common::isAlpha(*namePtr)) { char upper = toupper(*namePtr); - if ( upper < 'J' ){ + if ( upper < 'J' ) { *bufferPtr++ = upper - 16; } else { *bufferPtr++ = upper - 9; @@ -530,7 +530,7 @@ void KIASectionSuspects::nextSuspect() { if (_suspectsFoundCount >= 2) { while (true) { ++_suspectSelected; - if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()){ + if (_suspectSelected >= (int)_vm->_gameInfo->getSuspectCount()) { _suspectSelected = 0; } @@ -546,7 +546,7 @@ void KIASectionSuspects::prevSuspect() { if (_suspectsFoundCount >= 2) { while (true) { --_suspectSelected; - if (_suspectSelected < 0){ + if (_suspectSelected < 0) { _suspectSelected = _vm->_gameInfo->getSuspectCount() - 1; } diff --git a/engines/bladerunner/ui/spinner.cpp b/engines/bladerunner/ui/spinner.cpp index c507e0383d..b6269bbb50 100644 --- a/engines/bladerunner/ui/spinner.cpp +++ b/engines/bladerunner/ui/spinner.cpp @@ -302,7 +302,7 @@ void Spinner::reset() { } void Spinner::resume() { - if(_vqaPlayer == nullptr) { + if (_vqaPlayer == nullptr) { return; } diff --git a/engines/bladerunner/ui/ui_scroll_box.cpp b/engines/bladerunner/ui/ui_scroll_box.cpp index 0273803b24..00a9f5f889 100644 --- a/engines/bladerunner/ui/ui_scroll_box.cpp +++ b/engines/bladerunner/ui/ui_scroll_box.cpp @@ -172,7 +172,7 @@ void UIScrollBox::hide() { _isVisible = false; } -void UIScrollBox::clearLines(){ +void UIScrollBox::clearLines() { _lineCount = 0; _firstLineVisible = 0; |