[Scummvm-git-logs] scummvm master -> 0c4ca504117afcb7d4b383782a1a4c7f57380180

sev- sev at scummvm.org
Sun Mar 11 22:21:47 CET 2018


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
edaeb0f105 BLADERUNNER: Added Moraji actor
b530bd38df BLADERUNNER: Added TheBard actor
d3cde2c16e BLADERUNNER: Added Dispatcher actor
c635f7c8d7 BLADERUNNER: Added AnsweringMachine actor
0c4ca50411 BLADERUNNER: Added Rajif actor


Commit: edaeb0f105e7a12c19db01cf897a89d4fba985f5
    https://github.com/scummvm/scummvm/commit/edaeb0f105e7a12c19db01cf897a89d4fba985f5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-03-11T22:21:30+01:00

Commit Message:
BLADERUNNER: Added Moraji actor

Changed paths:
  A engines/bladerunner/script/ai/moraji.cpp
    engines/bladerunner/module.mk
    engines/bladerunner/script/ai_script.cpp
    engines/bladerunner/script/ai_script.h


diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index 9305922..0874770 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -76,6 +76,7 @@ MODULE_OBJS = \
 	script/ai/marcus.o \
 	script/ai/mccoy.o \
 	script/ai/mia.o \
+	script/ai/moraji.o \
 	script/ai/murray.o \
 	script/ai/newscaster.o \
 	script/ai/officer_leary.o \
diff --git a/engines/bladerunner/script/ai/moraji.cpp b/engines/bladerunner/script/ai/moraji.cpp
new file mode 100644
index 0000000..a1896b0
--- /dev/null
+++ b/engines/bladerunner/script/ai/moraji.cpp
@@ -0,0 +1,464 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bladerunner/script/ai_script.h"
+
+namespace BladeRunner {
+
+AIScriptMoraji::AIScriptMoraji(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+	_var1 = 1;
+	_var2 = 0;
+}
+
+void AIScriptMoraji::Initialize() {
+	_animationFrame = 0;
+	_animationState = 0;
+	_animationStateNext = 0;
+	_animationNext = 0;
+
+	_var1 = 1;
+	_var2 = 0;
+
+	Actor_Set_Goal_Number(kActorMoraji, 0);
+}
+
+bool AIScriptMoraji::Update() {
+	if (Actor_Query_Goal_Number(kActorMoraji) || Player_Query_Current_Scene() != 29 || Game_Flag_Query(269)) {
+		if (Actor_Query_Goal_Number(kActorMoraji) == 19) {
+			Actor_Says(kActorMoraji, 80, 13);
+			_animationState = 9;
+			_animationFrame = -1;
+			Actor_Set_Goal_Number(kActorMoraji, 18);
+		}
+		return false;
+	} else {
+		AI_Countdown_Timer_Reset(kActorMoraji, 2);
+		AI_Countdown_Timer_Start(kActorMoraji, 2, 30);
+		Game_Flag_Set(269);
+		return true;
+	}
+
+}
+
+void AIScriptMoraji::TimerExpired(int timer) {
+	if (timer != 2) {
+		return; //false;
+	}
+
+	AI_Countdown_Timer_Reset(kActorMoraji, 2);
+	if (Actor_Query_Goal_Number(kActorMoraji) != 20
+			&& Actor_Query_Goal_Number(kActorMoraji) != 21
+			&& Actor_Query_Goal_Number(kActorMoraji) != 99) {
+		Game_Flag_Set(271);
+	}
+	return; //true;
+}
+
+void AIScriptMoraji::CompletedMovementTrack() {
+	if (Actor_Query_Goal_Number(kActorMoraji) != 11)
+		return; //false
+
+	AI_Countdown_Timer_Reset(kActorMoraji, 2);
+	Game_Flag_Set(271);
+	_animationState = 3;
+
+	return; //true;
+}
+
+void AIScriptMoraji::ReceivedClue(int clueId, int fromActorId) {
+	//return false;
+}
+
+void AIScriptMoraji::ClickedByPlayer() {
+	//return false;
+}
+
+void AIScriptMoraji::EnteredScene(int sceneId) {
+	// return false;
+}
+
+void AIScriptMoraji::OtherAgentEnteredThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptMoraji::OtherAgentExitedThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptMoraji::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+	// return false;
+}
+
+void AIScriptMoraji::ShotAtAndMissed() {
+	// return false;
+}
+
+bool AIScriptMoraji::ShotAtAndHit() {
+	if (Actor_Query_Goal_Number(kActorMoraji)) {
+		if (Actor_Query_Goal_Number(kActorMoraji) == 21) {
+			Game_Flag_Set(713);
+			Actor_Set_Goal_Number(kActorMoraji, 22);
+			Actor_Set_Goal_Number(kActorOfficerGrayford, 101);
+
+			return true;
+		} else {
+			return false;
+		}
+	} else {
+		Actor_Set_Goal_Number(kActorMoraji, 5);
+		return true;
+	}
+}
+
+void AIScriptMoraji::Retired(int byActorId) {
+	// return false;
+}
+
+int AIScriptMoraji::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+	return 0;
+}
+
+bool AIScriptMoraji::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+	switch (newGoalNumber) {
+	case 0:
+		Actor_Put_In_Set(kActorMoraji, kSetDR05);
+		Actor_Set_At_XYZ(kActorMoraji, 50.0f, 0.30f, 35.0f, 414);
+		Actor_Set_Targetable(kActorMoraji, 1);
+		return false;
+	case 5:
+		Actor_Set_Targetable(kActorMoraji, 0);
+		Sound_Play(4, 100, 0, 0, 50);
+		_animationState = 10;
+		_animationFrame = 0;
+		Actor_Retired_Here(kActorMoraji, 60, 16, 1, -1);
+		return true;
+	case 10:
+		Actor_Set_Targetable(kActorMoraji, 0);
+		_animationState = 8;
+		_animationFrame = 1;
+		return true;
+	case 11:
+		_animationState = 3;
+		_animationFrame = 0;
+		AI_Movement_Track_Flush(kActorMoraji);
+		AI_Movement_Track_Append_Run(kActorMoraji, 95, 0);
+		AI_Movement_Track_Append_Run(kActorMoraji, 96, 0);
+		AI_Movement_Track_Append_Run(kActorMoraji, 97, 0);
+		AI_Movement_Track_Append_Run(kActorMoraji, 98, 0);
+		AI_Movement_Track_Repeat(kActorMoraji);
+		return true;
+	case 20:
+		_animationState = 11;
+		return true;
+	case 21:
+		Actor_Retired_Here(kActorMoraji, 60, 16, 0, -1);
+		Actor_Set_Targetable(kActorMoraji, 1);
+		return true;
+	case 22:
+		_animationFrame = -1;
+		_animationState = 13;
+		return true;
+	case 23:
+		Actor_Set_Targetable(kActorMoraji, 0);
+		_animationState = 14;
+		Actor_Retired_Here(kActorMoraji, 60, 16, 1, -1);
+		return true;
+		break;
+	case 30:
+		if (Player_Query_Current_Scene() == 29) {
+			Game_Flag_Set(515);
+			Set_Enter(kSetDR01_DR02_DR04, kSetCT05);
+		} else {
+			if (Actor_Query_In_Set(kActorMoraji, kSetDR05)) {
+				Actor_Set_Goal_Number(kActorMoraji, 99);
+			} else {
+				Actor_Set_Goal_Number(kActorMoraji, 20);
+			}
+			Game_Flag_Set(266);
+		}
+		return true;
+	case 99:
+		AI_Movement_Track_Flush(kActorMoraji);
+		AI_Movement_Track_Append(kActorMoraji, 41, 0);
+		AI_Movement_Track_Repeat(kActorMoraji);
+		return true;
+	default:
+		break;
+	}
+
+	return false;
+}
+
+bool AIScriptMoraji::UpdateAnimation(int *animation, int *frame) {
+	switch (_animationState) {
+	case 0:
+		*animation = 733;
+		if (_var2) {
+			_var2--;
+		} else {
+			_animationFrame += _var1;
+			if (!Random_Query(0, 10)) {
+				_var1 = -_var1;
+			}
+			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
+				_animationFrame = 0;
+			}
+			if (_animationFrame < 0) {
+				_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
+			}
+			_var2 = Random_Query(0, 1);
+		}
+		break;
+
+	case 1:
+		_animationFrame = 0;
+		*animation = _animationNext;
+		_animationState = _animationStateNext;
+		break;
+
+	case 2:
+		*animation = 290;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(290))
+			_animationFrame = 0;
+		break;
+
+	case 3:
+		*animation = 732;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(732))
+			_animationFrame = 0;
+		break;
+
+	case 4:
+		break;
+
+	case 5:
+		*animation = 734;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(734)) {
+			_animationFrame = 0;
+			_animationState = Random_Query(0, 2) + 5;
+		}
+		break;
+
+	case 6:
+		*animation = 735;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(735)) {
+			_animationFrame = 0;
+			_animationState = 5;
+			*animation = 735;
+		}
+		break;
+
+	case 7:
+		*animation = 736;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(736)) {
+			_animationFrame = 0;
+			_animationState = 5;
+			*animation = 736;
+		}
+		break;
+
+	case 8:
+		*animation = 737;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(737)) {
+			_animationFrame = 0;
+			_animationState = 0;
+			*animation = 733;
+			Actor_Set_Goal_Number(kActorMoraji, 19);
+		}
+		if (_animationFrame == 6) {
+			Ambient_Sounds_Play_Sound(488, 69, 0, 0, 20);
+		}
+		break;
+
+	case 9:
+		*animation = 742;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(742)) {
+			_animationFrame = 0;
+			_animationState = 3;
+			*animation = 732;
+			Actor_Set_Goal_Number(kActorMoraji, 11);
+		}
+		break;
+
+	case 10:
+		*animation = 738;
+		if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(738) - 1) {
+			++_animationFrame;
+		}
+		break;
+
+	case 11:
+		*animation = 739;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(739)) {
+			Actor_Set_Goal_Number(kActorMoraji, 21);
+			_animationFrame = 0;
+			_animationState = 12;
+			*animation = 740;
+		}
+		break;
+
+	case 12:
+		*animation = 740;
+		if (_var2) {
+			_var2--;
+		} else {
+			_animationFrame += _var1;
+			if (!Random_Query(0, 5)) {
+				_var1 = -_var1;
+			}
+			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(*animation)) {
+				_animationFrame = 0;
+			}
+			if (_animationFrame < 0) {
+				_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
+			}
+			_var2 = Random_Query(0, 2);
+		}
+		break;
+
+	case 13:
+		*animation = 741;
+		_animationFrame++;
+		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(741) - 1) {
+			_animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1;
+			Actor_Set_Goal_Number(kActorMoraji, 23);
+		}
+		break;
+
+	case 14:
+		*animation = 741;
+		_animationFrame = Slice_Animation_Query_Number_Of_Frames(741) - 1;
+		break;
+
+	default:
+		break;
+	}
+	*frame = _animationFrame;
+
+	return true;
+}
+
+bool AIScriptMoraji::ChangeAnimationMode(int mode) {
+	switch (mode) {
+	case 0:
+		if (_animationState != 12 && Actor_Query_Goal_Number(kActorMoraji) != 11) {
+			_animationState = 0;
+			_animationFrame = 0;
+		}
+		return 1;
+
+	case 1:
+		_animationState = 2;
+		_animationFrame = 0;
+		return 1;
+
+	case 2:
+		if (_animationState) {
+			if (_animationState != 3 || _animationState > 3) {
+				_animationState = 3;
+				_animationFrame = 0;
+			}
+		} else {
+			_animationState = 1;
+			_animationStateNext = 3;
+			_animationNext = 732;
+		}
+		break;
+
+	case 3:
+		if (_animationState != 12) {
+			if (_animationState) {
+				_animationState = 5;
+				_animationFrame = 0;
+			} else {
+				_animationState = 1;
+				_animationStateNext = 5;
+				_animationNext = 734;
+			}
+		}
+		break;
+
+	case 12:
+		if (_animationState) {
+			_animationState = 6;
+			_animationFrame = 0;
+		} else {
+			_animationState = 1;
+			_animationStateNext = 6;
+			_animationNext = 735;
+		}
+		break;
+
+	case 13:
+		if (_animationState) {
+			_animationState = 7;
+			_animationFrame = 0;
+		} else {
+			_animationState = 1;
+			_animationStateNext = 7;
+			_animationNext = 736;
+		}
+		break;
+
+	case 48:
+		_animationState = 13;
+		_animationFrame = -1;
+		break;
+	}
+
+	return true;
+}
+
+void AIScriptMoraji::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+	*animationState     = _animationState;
+	*animationFrame     = _animationFrame;
+	*animationStateNext = _animationStateNext;
+	*animationNext      = _animationNext;
+}
+
+void AIScriptMoraji::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+	_animationState     = animationState;
+	_animationFrame     = animationFrame;
+	_animationStateNext = animationStateNext;
+	_animationNext      = animationNext;
+}
+
+bool AIScriptMoraji::ReachedMovementTrackWaypoint(int waypointId) {
+	if (waypointId == 96)
+		AI_Countdown_Timer_Reset(kActorMoraji, 2);
+
+	return true;
+}
+
+void AIScriptMoraji::FledCombat() {
+	// return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index e2e9e2a..7034fa9 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -62,6 +62,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
 	_AIScripts[kActorMurray] = new AIScriptMurray(_vm);                   // 31
 	_AIScripts[kActorHawkersBarkeep] = new AIScriptHawkersBarkeep(_vm);   // 32
 	_AIScripts[kActorSergeantWalls] = new AIScriptSergeantWalls(_vm);     // 34
+	_AIScripts[kActorMoraji] = new AIScriptMoraji(_vm);                   // 35
 	_AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47
 	_AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48
 	_AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index b15fc90..f7d5370 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -246,6 +246,11 @@ END_SCRIPT
 DECLARE_SCRIPT(SergeantWalls)
 END_SCRIPT
 
+DECLARE_SCRIPT(Moraji)
+	int _var1;
+	int _var2;
+END_SCRIPT
+
 DECLARE_SCRIPT(HysteriaPatron1)
 END_SCRIPT
 


Commit: b530bd38dff3c789be21f294cf8561ef52fd4e90
    https://github.com/scummvm/scummvm/commit/b530bd38dff3c789be21f294cf8561ef52fd4e90
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-03-11T22:21:30+01:00

Commit Message:
BLADERUNNER: Added TheBard actor

Changed paths:
  A engines/bladerunner/script/ai/the_bard.cpp
    engines/bladerunner/module.mk
    engines/bladerunner/script/ai_script.cpp
    engines/bladerunner/script/ai_script.h


diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index 0874770..3de756e 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -84,6 +84,7 @@ MODULE_OBJS = \
 	script/ai/sergeant_walls.o \
 	script/ai/shoeshine_man.o \
 	script/ai/steele.o \
+	script/ai/the_bard.o \
 	script/ai/transient.o \
 	script/ai/tyrell_guard.o \
 	script/ai/zuben.o \
diff --git a/engines/bladerunner/script/ai/the_bard.cpp b/engines/bladerunner/script/ai/the_bard.cpp
new file mode 100644
index 0000000..abbd3b4
--- /dev/null
+++ b/engines/bladerunner/script/ai/the_bard.cpp
@@ -0,0 +1,123 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bladerunner/script/ai_script.h"
+
+namespace BladeRunner {
+
+AIScriptTheBard::AIScriptTheBard(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+}
+
+void AIScriptTheBard::Initialize() {
+	_animationFrame = 0;
+	_animationState = 0;
+	_animationStateNext = 0;
+	_animationNext = 0;
+}
+
+bool AIScriptTheBard::Update() {
+	return false;
+}
+
+void AIScriptTheBard::TimerExpired(int timer) {
+	//return false;
+}
+
+void AIScriptTheBard::CompletedMovementTrack() {
+	//return false;
+}
+
+void AIScriptTheBard::ReceivedClue(int clueId, int fromActorId) {
+	//return false;
+}
+
+void AIScriptTheBard::ClickedByPlayer() {
+	//return false;
+}
+
+void AIScriptTheBard::EnteredScene(int sceneId) {
+	// return false;
+}
+
+void AIScriptTheBard::OtherAgentEnteredThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptTheBard::OtherAgentExitedThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptTheBard::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+	// return false;
+}
+
+void AIScriptTheBard::ShotAtAndMissed() {
+	// return false;
+}
+
+bool AIScriptTheBard::ShotAtAndHit() {
+	return false;
+}
+
+void AIScriptTheBard::Retired(int byActorId) {
+	// return false;
+}
+
+int AIScriptTheBard::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+	return 0;
+}
+
+bool AIScriptTheBard::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+	return false;
+}
+
+bool AIScriptTheBard::UpdateAnimation(int *animation, int *frame) {
+	return true;
+}
+
+bool AIScriptTheBard::ChangeAnimationMode(int mode) {
+	return true;
+}
+
+void AIScriptTheBard::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+	*animationState     = _animationState;
+	*animationFrame     = _animationFrame;
+	*animationStateNext = _animationStateNext;
+	*animationNext      = _animationNext;
+}
+
+void AIScriptTheBard::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+	_animationState     = animationState;
+	_animationFrame     = animationFrame;
+	_animationStateNext = animationStateNext;
+	_animationNext      = animationNext;
+}
+
+bool AIScriptTheBard::ReachedMovementTrackWaypoint(int waypointId) {
+	return true;
+}
+
+void AIScriptTheBard::FledCombat() {
+	// return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index 7034fa9..5f8102b 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -63,6 +63,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
 	_AIScripts[kActorHawkersBarkeep] = new AIScriptHawkersBarkeep(_vm);   // 32
 	_AIScripts[kActorSergeantWalls] = new AIScriptSergeantWalls(_vm);     // 34
 	_AIScripts[kActorMoraji] = new AIScriptMoraji(_vm);                   // 35
+	_AIScripts[kActorTheBard] = new AIScriptTheBard(_vm);                 // 36
 	_AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47
 	_AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48
 	_AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index f7d5370..2d7a62f 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -251,6 +251,9 @@ DECLARE_SCRIPT(Moraji)
 	int _var2;
 END_SCRIPT
 
+DECLARE_SCRIPT(TheBard)
+END_SCRIPT
+
 DECLARE_SCRIPT(HysteriaPatron1)
 END_SCRIPT
 


Commit: d3cde2c16e3a95ff3082cb12f9c3dcf8053e37f3
    https://github.com/scummvm/scummvm/commit/d3cde2c16e3a95ff3082cb12f9c3dcf8053e37f3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-03-11T22:21:30+01:00

Commit Message:
BLADERUNNER: Added Dispatcher actor

Changed paths:
  A engines/bladerunner/script/ai/dispatcher.cpp
    engines/bladerunner/module.mk
    engines/bladerunner/script/ai_script.cpp
    engines/bladerunner/script/ai_script.h


diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index 3de756e..9a23a2a 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -54,6 +54,7 @@ MODULE_OBJS = \
 	script/ai/bryant.o \
 	script/ai/crazylegs.o \
 	script/ai/desk_clerk.o \
+	script/ai/dispatcher.o \
 	script/ai/fish_dealer.o \
 	script/ai/gaff.o \
 	script/ai/generic_walker_a.o \
diff --git a/engines/bladerunner/script/ai/dispatcher.cpp b/engines/bladerunner/script/ai/dispatcher.cpp
new file mode 100644
index 0000000..7d5e55c
--- /dev/null
+++ b/engines/bladerunner/script/ai/dispatcher.cpp
@@ -0,0 +1,123 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bladerunner/script/ai_script.h"
+
+namespace BladeRunner {
+
+AIScriptDispatcher::AIScriptDispatcher(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+}
+
+void AIScriptDispatcher::Initialize() {
+	_animationFrame = 0;
+	_animationState = 0;
+	_animationStateNext = 0;
+	_animationNext = 0;
+}
+
+bool AIScriptDispatcher::Update() {
+	return false;
+}
+
+void AIScriptDispatcher::TimerExpired(int timer) {
+	//return false;
+}
+
+void AIScriptDispatcher::CompletedMovementTrack() {
+	//return false;
+}
+
+void AIScriptDispatcher::ReceivedClue(int clueId, int fromActorId) {
+	//return false;
+}
+
+void AIScriptDispatcher::ClickedByPlayer() {
+	//return false;
+}
+
+void AIScriptDispatcher::EnteredScene(int sceneId) {
+	// return false;
+}
+
+void AIScriptDispatcher::OtherAgentEnteredThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptDispatcher::OtherAgentExitedThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptDispatcher::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+	// return false;
+}
+
+void AIScriptDispatcher::ShotAtAndMissed() {
+	// return false;
+}
+
+bool AIScriptDispatcher::ShotAtAndHit() {
+	return false;
+}
+
+void AIScriptDispatcher::Retired(int byActorId) {
+	// return false;
+}
+
+int AIScriptDispatcher::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+	return 0;
+}
+
+bool AIScriptDispatcher::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+	return false;
+}
+
+bool AIScriptDispatcher::UpdateAnimation(int *animation, int *frame) {
+	return true;
+}
+
+bool AIScriptDispatcher::ChangeAnimationMode(int mode) {
+	return true;
+}
+
+void AIScriptDispatcher::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+	*animationState     = _animationState;
+	*animationFrame     = _animationFrame;
+	*animationStateNext = _animationStateNext;
+	*animationNext      = _animationNext;
+}
+
+void AIScriptDispatcher::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+	_animationState     = animationState;
+	_animationFrame     = animationFrame;
+	_animationStateNext = animationStateNext;
+	_animationNext      = animationNext;
+}
+
+bool AIScriptDispatcher::ReachedMovementTrackWaypoint(int waypointId) {
+	return true;
+}
+
+void AIScriptDispatcher::FledCombat() {
+	// return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index 5f8102b..fabe5a5 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -64,6 +64,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
 	_AIScripts[kActorSergeantWalls] = new AIScriptSergeantWalls(_vm);     // 34
 	_AIScripts[kActorMoraji] = new AIScriptMoraji(_vm);                   // 35
 	_AIScripts[kActorTheBard] = new AIScriptTheBard(_vm);                 // 36
+	_AIScripts[kActorDispatcher] = new AIScriptDispatcher(_vm);           // 38
 	_AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47
 	_AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48
 	_AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index 2d7a62f..da66eae 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -254,6 +254,9 @@ END_SCRIPT
 DECLARE_SCRIPT(TheBard)
 END_SCRIPT
 
+DECLARE_SCRIPT(Dispatcher)
+END_SCRIPT
+
 DECLARE_SCRIPT(HysteriaPatron1)
 END_SCRIPT
 


Commit: c635f7c8d7baea6aa9475c8e7e60814face0743f
    https://github.com/scummvm/scummvm/commit/c635f7c8d7baea6aa9475c8e7e60814face0743f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-03-11T22:21:30+01:00

Commit Message:
BLADERUNNER: Added AnsweringMachine actor

Changed paths:
  A engines/bladerunner/script/ai/answering_machine.cpp
    engines/bladerunner/module.mk
    engines/bladerunner/script/ai_script.cpp
    engines/bladerunner/script/ai_script.h


diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index 9a23a2a..cb96d36 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -50,6 +50,7 @@ MODULE_OBJS = \
 	script/vk_script.o \
 	script/esper_script.o \
 	script/ai_script.o \
+	script/ai/answering_machine.o \
 	script/ai/baker.o \
 	script/ai/bryant.o \
 	script/ai/crazylegs.o \
diff --git a/engines/bladerunner/script/ai/answering_machine.cpp b/engines/bladerunner/script/ai/answering_machine.cpp
new file mode 100644
index 0000000..488de2e
--- /dev/null
+++ b/engines/bladerunner/script/ai/answering_machine.cpp
@@ -0,0 +1,123 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bladerunner/script/ai_script.h"
+
+namespace BladeRunner {
+
+AIScriptAnsweringMachine::AIScriptAnsweringMachine(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+}
+
+void AIScriptAnsweringMachine::Initialize() {
+	_animationFrame = 0;
+	_animationState = 0;
+	_animationStateNext = 0;
+	_animationNext = 0;
+}
+
+bool AIScriptAnsweringMachine::Update() {
+	return false;
+}
+
+void AIScriptAnsweringMachine::TimerExpired(int timer) {
+	//return false;
+}
+
+void AIScriptAnsweringMachine::CompletedMovementTrack() {
+	//return false;
+}
+
+void AIScriptAnsweringMachine::ReceivedClue(int clueId, int fromActorId) {
+	//return false;
+}
+
+void AIScriptAnsweringMachine::ClickedByPlayer() {
+	//return false;
+}
+
+void AIScriptAnsweringMachine::EnteredScene(int sceneId) {
+	// return false;
+}
+
+void AIScriptAnsweringMachine::OtherAgentEnteredThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptAnsweringMachine::OtherAgentExitedThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptAnsweringMachine::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+	// return false;
+}
+
+void AIScriptAnsweringMachine::ShotAtAndMissed() {
+	// return false;
+}
+
+bool AIScriptAnsweringMachine::ShotAtAndHit() {
+	return false;
+}
+
+void AIScriptAnsweringMachine::Retired(int byActorId) {
+	// return false;
+}
+
+int AIScriptAnsweringMachine::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+	return 0;
+}
+
+bool AIScriptAnsweringMachine::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+	return false;
+}
+
+bool AIScriptAnsweringMachine::UpdateAnimation(int *animation, int *frame) {
+	return true;
+}
+
+bool AIScriptAnsweringMachine::ChangeAnimationMode(int mode) {
+	return true;
+}
+
+void AIScriptAnsweringMachine::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+	*animationState     = _animationState;
+	*animationFrame     = _animationFrame;
+	*animationStateNext = _animationStateNext;
+	*animationNext      = _animationNext;
+}
+
+void AIScriptAnsweringMachine::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+	_animationState     = animationState;
+	_animationFrame     = animationFrame;
+	_animationStateNext = animationStateNext;
+	_animationNext      = animationNext;
+}
+
+bool AIScriptAnsweringMachine::ReachedMovementTrackWaypoint(int waypointId) {
+	return true;
+}
+
+void AIScriptAnsweringMachine::FledCombat() {
+	// return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index fabe5a5..9e7b8b2 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -65,6 +65,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
 	_AIScripts[kActorMoraji] = new AIScriptMoraji(_vm);                   // 35
 	_AIScripts[kActorTheBard] = new AIScriptTheBard(_vm);                 // 36
 	_AIScripts[kActorDispatcher] = new AIScriptDispatcher(_vm);           // 38
+	_AIScripts[kActorAnsweringMachine] = new AIScriptAnsweringMachine(_vm);// 39
 	_AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47
 	_AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48
 	_AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index da66eae..1b3c5fb 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -254,6 +254,9 @@ END_SCRIPT
 DECLARE_SCRIPT(TheBard)
 END_SCRIPT
 
+DECLARE_SCRIPT(AnsweringMachine)
+END_SCRIPT
+
 DECLARE_SCRIPT(Dispatcher)
 END_SCRIPT
 


Commit: 0c4ca504117afcb7d4b383782a1a4c7f57380180
    https://github.com/scummvm/scummvm/commit/0c4ca504117afcb7d4b383782a1a4c7f57380180
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-03-11T22:21:30+01:00

Commit Message:
BLADERUNNER: Added Rajif actor

Changed paths:
  A engines/bladerunner/script/ai/rajif.cpp
    engines/bladerunner/module.mk
    engines/bladerunner/script/ai_script.cpp
    engines/bladerunner/script/ai_script.h


diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index cb96d36..cba0edf 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -82,6 +82,7 @@ MODULE_OBJS = \
 	script/ai/murray.o \
 	script/ai/newscaster.o \
 	script/ai/officer_leary.o \
+	script/ai/rajif.o \
 	script/ai/runciter.o \
 	script/ai/sergeant_walls.o \
 	script/ai/shoeshine_man.o \
diff --git a/engines/bladerunner/script/ai/rajif.cpp b/engines/bladerunner/script/ai/rajif.cpp
new file mode 100644
index 0000000..2ac6a5b
--- /dev/null
+++ b/engines/bladerunner/script/ai/rajif.cpp
@@ -0,0 +1,162 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "bladerunner/script/ai_script.h"
+
+namespace BladeRunner {
+
+AIScriptRajif::AIScriptRajif(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+}
+
+void AIScriptRajif::Initialize() {
+	_animationFrame = 0;
+	_animationState = 0;
+	_animationStateNext = 0;
+	_animationNext = 0;
+
+	Actor_Set_Goal_Number(kActorRajif, 0);
+}
+
+bool AIScriptRajif::Update() {
+	if (Global_Variable_Query(kVariableChapter) == 5 && Actor_Query_Goal_Number(kActorRajif) < 400)
+		Actor_Set_Goal_Number(kActorRajif, 599);
+
+	return false;
+}
+
+void AIScriptRajif::TimerExpired(int timer) {
+	//return false;
+}
+
+void AIScriptRajif::CompletedMovementTrack() {
+	//return false;
+}
+
+void AIScriptRajif::ReceivedClue(int clueId, int fromActorId) {
+	//return false;
+}
+
+void AIScriptRajif::ClickedByPlayer() {
+	//return false;
+}
+
+void AIScriptRajif::EnteredScene(int sceneId) {
+	// return false;
+}
+
+void AIScriptRajif::OtherAgentEnteredThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptRajif::OtherAgentExitedThisScene(int otherActorId) {
+	// return false;
+}
+
+void AIScriptRajif::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+	// return false;
+}
+
+void AIScriptRajif::ShotAtAndMissed() {
+	// return false;
+}
+
+bool AIScriptRajif::ShotAtAndHit() {
+	return false;
+}
+
+void AIScriptRajif::Retired(int byActorId) {
+	// return false;
+}
+
+int AIScriptRajif::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+	return 0;
+}
+
+bool AIScriptRajif::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+	if (newGoalNumber == 300) {
+		Actor_Put_In_Set(kActorRajif, kSetMA02_MA04);
+		Actor_Set_At_XYZ(kActorRajif, -73.34f, -140.40f, 342.0f, 300);
+		Actor_Change_Animation_Mode(kActorRajif, 0);
+		return true;
+	}
+	if (newGoalNumber == 599) {
+		Actor_Put_In_Set(kActorRajif, kSetFreeSlotI);
+		Actor_Set_At_Waypoint(kActorRajif, 41, 0);
+		return true;
+	}
+
+	return false;
+}
+
+bool AIScriptRajif::UpdateAnimation(int *animation, int *frame) {
+	if (_animationState <= 1) {
+		if (_animationState) {
+			*animation = 751;
+			_animationFrame++;
+			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(751)) {
+				_animationFrame = 0;
+			}
+		} else {
+			*animation = 751;
+			_animationFrame++;
+			if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(751)) {
+				_animationFrame = 0;
+			}
+		}
+	}
+
+	*frame = _animationFrame;
+
+	return true;
+}
+
+bool AIScriptRajif::ChangeAnimationMode(int mode) {
+	if (!mode) {
+		_animationState = 0;
+		_animationFrame = 0;
+	}
+	return true;
+}
+
+void AIScriptRajif::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+	*animationState     = _animationState;
+	*animationFrame     = _animationFrame;
+	*animationStateNext = _animationStateNext;
+	*animationNext      = _animationNext;
+}
+
+void AIScriptRajif::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+	_animationState     = animationState;
+	_animationFrame     = animationFrame;
+	_animationStateNext = animationStateNext;
+	_animationNext      = animationNext;
+}
+
+bool AIScriptRajif::ReachedMovementTrackWaypoint(int waypointId) {
+	return true;
+}
+
+void AIScriptRajif::FledCombat() {
+	// return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index 9e7b8b2..b987236 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -66,6 +66,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
 	_AIScripts[kActorTheBard] = new AIScriptTheBard(_vm);                 // 36
 	_AIScripts[kActorDispatcher] = new AIScriptDispatcher(_vm);           // 38
 	_AIScripts[kActorAnsweringMachine] = new AIScriptAnsweringMachine(_vm);// 39
+	_AIScripts[kActorRajif] = new AIScriptRajif(_vm);                     // 40
 	_AIScripts[kActorHysteriaPatron1] = new AIScriptHysteriaPatron1(_vm); // 47
 	_AIScripts[kActorHysteriaPatron2] = new AIScriptHysteriaPatron2(_vm); // 48
 	_AIScripts[kActorHysteriaPatron3] = new AIScriptHysteriaPatron3(_vm); // 49
diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h
index 1b3c5fb..d2ce59f 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -254,10 +254,13 @@ END_SCRIPT
 DECLARE_SCRIPT(TheBard)
 END_SCRIPT
 
+DECLARE_SCRIPT(Dispatcher)
+END_SCRIPT
+
 DECLARE_SCRIPT(AnsweringMachine)
 END_SCRIPT
 
-DECLARE_SCRIPT(Dispatcher)
+DECLARE_SCRIPT(Rajif)
 END_SCRIPT
 
 DECLARE_SCRIPT(HysteriaPatron1)





More information about the Scummvm-git-logs mailing list