diff options
author | Eugene Sandulenko | 2016-10-03 12:38:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-10-03 12:38:43 +0200 |
commit | 281c19ab036f387a99192594aa645e696009f40b (patch) | |
tree | e4de335067b68ee83b76de33c9b7f86b4f016d35 /engines/bladerunner/script | |
parent | 77be430824ad0cafb0de9952ecb352ba4ad18571 (diff) | |
download | scummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.tar.gz scummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.tar.bz2 scummvm-rg350-281c19ab036f387a99192594aa645e696009f40b.zip |
BLADERUNNER: Code formatting fixes
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r-- | engines/bladerunner/script/aiscript_officer_leroy.cpp | 31 | ||||
-rw-r--r-- | engines/bladerunner/script/ar02.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/bb03.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/bb04.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/bb05.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/bb06.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/bb07.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/bb08.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ct03.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/dr06.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/hf02.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/init.h | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/ps15.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/script.cpp | 22 | ||||
-rw-r--r-- | engines/bladerunner/script/script.h | 25 | ||||
-rw-r--r-- | engines/bladerunner/script/ug03.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/ug15.cpp | 1 | ||||
-rw-r--r-- | engines/bladerunner/script/ug18.cpp | 2 |
18 files changed, 31 insertions, 73 deletions
diff --git a/engines/bladerunner/script/aiscript_officer_leroy.cpp b/engines/bladerunner/script/aiscript_officer_leroy.cpp index f388eded6b..7881984154 100644 --- a/engines/bladerunner/script/aiscript_officer_leroy.cpp +++ b/engines/bladerunner/script/aiscript_officer_leroy.cpp @@ -25,11 +25,10 @@ namespace BladeRunner { AIScript_Officer_Leroy::AIScript_Officer_Leroy(BladeRunnerEngine *vm) - : AIScriptBase(vm) -{} + : AIScriptBase(vm) { +} -void AIScript_Officer_Leroy::Initialize() -{ +void AIScript_Officer_Leroy::Initialize() { var_45D5B0_animation_state = 0; var_45D5B4_frame = 0; var_45D5B8 = 0; @@ -84,14 +83,12 @@ bool AIScript_Officer_Leroy::GoalChanged(int currentGoalNumber, int newGoalNumbe return false; } -bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) -{ +bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) { if (var_45D5B8 == 0) { *animation = 589; var_45D5B4_frame++; - if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(589)) - { + if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(589)) { var_45D5B4_frame = 0; var_45D5B8 = Random_Query(0, 2); } @@ -99,8 +96,7 @@ bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) *animation = 590; var_45D5B4_frame++; - if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(590)) - { + if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(590)) { var_45D5B4_frame = 0; var_45D5B8 = Random_Query(0, 2); } @@ -108,8 +104,7 @@ bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) *animation = 591; var_45D5B4_frame++; - if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(591)) - { + if (var_45D5B4_frame >= Slice_Animation_Query_Number_Of_Frames(591)) { var_45D5B4_frame = 0; var_45D5B8 = Random_Query(0, 2); } @@ -118,13 +113,11 @@ bool AIScript_Officer_Leroy::UpdateAnimation(int *animation, int *frame) return true; } -bool AIScript_Officer_Leroy::ChangeAnimationMode(int mode) -{ - switch (mode) - { - case 1: - var_45D5B0_animation_state = 32; - break; +bool AIScript_Officer_Leroy::ChangeAnimationMode(int mode) { + switch (mode) { + case 1: + var_45D5B0_animation_state = 32; + break; } return true; } diff --git a/engines/bladerunner/script/ar02.cpp b/engines/bladerunner/script/ar02.cpp index dc89758a0d..220402794e 100644 --- a/engines/bladerunner/script/ar02.cpp +++ b/engines/bladerunner/script/ar02.cpp @@ -224,7 +224,6 @@ bool ScriptAR02::ClickedOn2DRegion(int region) { } void ScriptAR02::SceneFrameAdvanced(int frame) { - } void ScriptAR02::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -386,5 +385,4 @@ void ScriptAR02::sub_402CE4() { } } - } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/bb03.cpp b/engines/bladerunner/script/bb03.cpp index 24b4332ce8..7307c5c3a1 100644 --- a/engines/bladerunner/script/bb03.cpp +++ b/engines/bladerunner/script/bb03.cpp @@ -136,7 +136,6 @@ bool ScriptBB03::ClickedOn2DRegion(int region) { } void ScriptBB03::SceneFrameAdvanced(int frame) { - } void ScriptBB03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -154,7 +153,6 @@ void ScriptBB03::PlayerWalkedIn() { } void ScriptBB03::PlayerWalkedOut() { - } void ScriptBB03::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/bb04.cpp b/engines/bladerunner/script/bb04.cpp index ca96c11ef3..b99ea5004d 100644 --- a/engines/bladerunner/script/bb04.cpp +++ b/engines/bladerunner/script/bb04.cpp @@ -108,7 +108,6 @@ bool ScriptBB04::ClickedOn2DRegion(int region) { } void ScriptBB04::SceneFrameAdvanced(int frame) { - } void ScriptBB04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -123,7 +122,6 @@ void ScriptBB04::PlayerWalkedIn() { } void ScriptBB04::PlayerWalkedOut() { - } void ScriptBB04::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/bb05.cpp b/engines/bladerunner/script/bb05.cpp index 1f2b9745ea..aff2f7bdc6 100644 --- a/engines/bladerunner/script/bb05.cpp +++ b/engines/bladerunner/script/bb05.cpp @@ -140,7 +140,6 @@ bool ScriptBB05::ClickedOn2DRegion(int region) { } void ScriptBB05::SceneFrameAdvanced(int frame) { - } void ScriptBB05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -206,7 +205,6 @@ void ScriptBB05::PlayerWalkedIn() { } void ScriptBB05::PlayerWalkedOut() { - } void ScriptBB05::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/bb06.cpp b/engines/bladerunner/script/bb06.cpp index d389fcceb6..66c9a85d3c 100644 --- a/engines/bladerunner/script/bb06.cpp +++ b/engines/bladerunner/script/bb06.cpp @@ -169,7 +169,6 @@ void ScriptBB06::PlayerWalkedIn() { } void ScriptBB06::PlayerWalkedOut() { - } void ScriptBB06::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/bb07.cpp b/engines/bladerunner/script/bb07.cpp index 3284df89f1..7b9b4aea1f 100644 --- a/engines/bladerunner/script/bb07.cpp +++ b/engines/bladerunner/script/bb07.cpp @@ -159,7 +159,6 @@ bool ScriptBB07::ClickedOn2DRegion(int region) { } void ScriptBB07::SceneFrameAdvanced(int frame) { - } void ScriptBB07::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -177,7 +176,6 @@ void ScriptBB07::PlayerWalkedIn() { } void ScriptBB07::PlayerWalkedOut() { - } void ScriptBB07::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/bb08.cpp b/engines/bladerunner/script/bb08.cpp index cd05fe84b7..5464aabc28 100644 --- a/engines/bladerunner/script/bb08.cpp +++ b/engines/bladerunner/script/bb08.cpp @@ -109,7 +109,6 @@ bool ScriptBB08::ClickedOn2DRegion(int region) { } void ScriptBB08::SceneFrameAdvanced(int frame) { - } void ScriptBB08::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -129,7 +128,6 @@ void ScriptBB08::PlayerWalkedIn() { } void ScriptBB08::PlayerWalkedOut() { - } void ScriptBB08::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/ct03.cpp b/engines/bladerunner/script/ct03.cpp index 133c5d0c18..b7dcdd4e46 100644 --- a/engines/bladerunner/script/ct03.cpp +++ b/engines/bladerunner/script/ct03.cpp @@ -110,7 +110,6 @@ bool ScriptCT03::ClickedOn2DRegion(int region) { } void ScriptCT03::SceneFrameAdvanced(int frame) { - } void ScriptCT03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { diff --git a/engines/bladerunner/script/dr06.cpp b/engines/bladerunner/script/dr06.cpp index 8556db75fb..f744d21a13 100644 --- a/engines/bladerunner/script/dr06.cpp +++ b/engines/bladerunner/script/dr06.cpp @@ -199,7 +199,6 @@ bool ScriptDR06::ClickedOn2DRegion(int region) { } void ScriptDR06::SceneFrameAdvanced(int frame) { - } void ScriptDR06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { diff --git a/engines/bladerunner/script/hf02.cpp b/engines/bladerunner/script/hf02.cpp index 8c6e24dad4..575e3f8604 100644 --- a/engines/bladerunner/script/hf02.cpp +++ b/engines/bladerunner/script/hf02.cpp @@ -136,7 +136,6 @@ void ScriptHF02::PlayerWalkedIn() { } void ScriptHF02::PlayerWalkedOut() { - } void ScriptHF02::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/init.h b/engines/bladerunner/script/init.h index e7023fb375..7b95008abb 100644 --- a/engines/bladerunner/script/init.h +++ b/engines/bladerunner/script/init.h @@ -32,8 +32,8 @@ class BladeRunnerEngine; class ScriptInit : ScriptBase { public: ScriptInit(BladeRunnerEngine *vm) - : ScriptBase(vm) - {} + : ScriptBase(vm) { + } void SCRIPT_Initialize_Game(); diff --git a/engines/bladerunner/script/ps15.cpp b/engines/bladerunner/script/ps15.cpp index 3e8224a07a..5200d89f7c 100644 --- a/engines/bladerunner/script/ps15.cpp +++ b/engines/bladerunner/script/ps15.cpp @@ -131,7 +131,6 @@ bool ScriptPS15::ClickedOn2DRegion(int region) { } void ScriptPS15::SceneFrameAdvanced(int frame) { - } void ScriptPS15::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -166,7 +165,6 @@ void ScriptPS15::PlayerWalkedIn() { } void ScriptPS15::PlayerWalkedOut() { - } void ScriptPS15::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp index 9f4f5392ef..216428c2f8 100644 --- a/engines/bladerunner/script/script.cpp +++ b/engines/bladerunner/script/script.cpp @@ -84,7 +84,7 @@ void Script::SceneLoaded() { bool Script::MouseClick(int x, int y) { if (_inScriptCounter > 0) return true; - + _inScriptCounter++; //MouseX = x; //MouseY = y; @@ -434,7 +434,7 @@ void ScriptBase::Actor_Voice_Over(int sentenceId, int actorId) { _vm->gameWaitForActive(); _vm->loopActorSpeaking(); _vm->_adq->flush(1, true); - + Actor *actor = _vm->_actors[actorId]; actor->speechPlay(sentenceId, true); @@ -1080,7 +1080,7 @@ void ScriptBase::Combat_Flee_Waypoint_Set_Data(int combatFleeWaypointId, int a2, void ScriptBase::Police_Maze_Target_Track_Add(int itemId, float startX, float startY, float startZ, float endX, float endY, float endZ, int steps, signed int data[], bool a10) { //TODO warning("Police_Maze_Target_Track_Add(%d, %f, %f, %f, %f, %f, %f, %d, %p, %d)", itemId, startX, startY, startZ, endX, endY, endZ, steps, (void *)data, a10); - + } // ScriptBase::Police_Maze_Query_Score @@ -1184,7 +1184,7 @@ bool ScriptBase::Voight_Kampff_Activate(int a1, int a2){ int ScriptBase::Elevator_Activate(int elevator) { //TODO warning("Elevator_Activate(%d)", elevator); - return 0; + return 0; } void ScriptBase::View_Score_Board() { @@ -1387,10 +1387,7 @@ void ScriptBase::ESPER_Define_Special_Region(int a1, int a2, int a3, int a4, int warning("ESPER_Define_Special_Region(%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s)", a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, name); } -AIScripts::AIScripts(BladeRunnerEngine *vm) - : _vm(vm), - _inScriptCounter(0) -{ +AIScripts::AIScripts(BladeRunnerEngine *vm) : _vm(vm), _inScriptCounter(0) { for (int i = 0; i != 100; ++i) _AIScripts[i] = 0; @@ -1398,22 +1395,19 @@ AIScripts::AIScripts(BladeRunnerEngine *vm) _AIScripts[23] = new AIScript_Officer_Leroy(_vm); } -void AIScripts::Initialize(int actor) -{ +void AIScripts::Initialize(int actor) { if (_AIScripts[actor]) _AIScripts[actor]->Initialize(); } -void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) -{ +void AIScripts::UpdateAnimation(int actor, int *animation, int *frame) { _inScriptCounter++; if (_AIScripts[actor]) _AIScripts[actor]->UpdateAnimation(animation, frame); _inScriptCounter--; } -void AIScripts::ChangeAnimationMode(int actor, int mode) -{ +void AIScripts::ChangeAnimationMode(int actor, int mode) { _inScriptCounter++; if (_AIScripts[actor]) _AIScripts[actor]->ChangeAnimationMode(mode); diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h index 914462a3a4..0e4c0e9f62 100644 --- a/engines/bladerunner/script/script.h +++ b/engines/bladerunner/script/script.h @@ -34,11 +34,8 @@ protected: BladeRunnerEngine *_vm; public: - ScriptBase(BladeRunnerEngine *vm) - : _vm(vm) - {} - virtual ~ScriptBase() - {} + ScriptBase(BladeRunnerEngine *vm) : _vm(vm) {} + virtual ~ScriptBase() {} protected: void Preload(int animationId); @@ -285,9 +282,7 @@ protected: class SceneScriptBase : public ScriptBase { public: - SceneScriptBase(BladeRunnerEngine *vm) - : ScriptBase(vm) - {} + SceneScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} virtual void InitializeScene() = 0; virtual void SceneLoaded() = 0; @@ -317,8 +312,8 @@ public: Script(BladeRunnerEngine *vm) : _vm(vm), _inScriptCounter(0), - _currentScript(nullptr) - {} + _currentScript(nullptr) { + } ~Script(); bool open(const Common::String &name); @@ -327,10 +322,10 @@ public: void SceneLoaded(); bool MouseClick(int x, int y); bool ClickedOn3DObject(const char *objectName, bool a2); - bool ClickedOnActor(int actorId); + bool ClickedOnActor(int actorId); bool ClickedOnItem(int itemId, bool a2); - bool ClickedOnExit(int exitId); - bool ClickedOn2DRegion(int region); + bool ClickedOnExit(int exitId); + bool ClickedOn2DRegion(int region); void SceneFrameAdvanced(int frame); void ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet); void PlayerWalkedIn(); @@ -817,9 +812,7 @@ END_SCRIPT class AIScriptBase : public ScriptBase { public: - AIScriptBase(BladeRunnerEngine *vm) - : ScriptBase(vm) - {} + AIScriptBase(BladeRunnerEngine *vm) : ScriptBase(vm) {} virtual void Initialize() = 0; virtual bool Update() = 0; diff --git a/engines/bladerunner/script/ug03.cpp b/engines/bladerunner/script/ug03.cpp index fa413175e3..89c142dcb5 100644 --- a/engines/bladerunner/script/ug03.cpp +++ b/engines/bladerunner/script/ug03.cpp @@ -128,7 +128,6 @@ bool ScriptUG03::ClickedOn2DRegion(int region) { } void ScriptUG03::SceneFrameAdvanced(int frame) { - } void ScriptUG03::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { diff --git a/engines/bladerunner/script/ug15.cpp b/engines/bladerunner/script/ug15.cpp index c202e4f428..c43288241d 100644 --- a/engines/bladerunner/script/ug15.cpp +++ b/engines/bladerunner/script/ug15.cpp @@ -195,7 +195,6 @@ void ScriptUG15::PlayerWalkedIn() { } void ScriptUG15::PlayerWalkedOut() { - } void ScriptUG15::DialogueQueueFlushed(int a1) { diff --git a/engines/bladerunner/script/ug18.cpp b/engines/bladerunner/script/ug18.cpp index 3ba8223500..215d447a85 100644 --- a/engines/bladerunner/script/ug18.cpp +++ b/engines/bladerunner/script/ug18.cpp @@ -127,7 +127,6 @@ bool ScriptUG18::ClickedOn2DRegion(int region) { } void ScriptUG18::SceneFrameAdvanced(int frame) { - } void ScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { @@ -186,7 +185,6 @@ void ScriptUG18::PlayerWalkedIn() { } void ScriptUG18::PlayerWalkedOut() { - } void ScriptUG18::DialogueQueueFlushed(int a1) { |