aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2018-03-12 20:54:39 +0100
committerEugene Sandulenko2018-03-12 20:54:39 +0100
commitf16e054c3ad731cb66bca70df143707e719fd727 (patch)
tree10f1e3c977dfd387502e7ea2750d54e562ec9615
parente1cd47baef55e6a97935f7e3babc5a1b6d602054 (diff)
downloadscummvm-rg350-f16e054c3ad731cb66bca70df143707e719fd727.tar.gz
scummvm-rg350-f16e054c3ad731cb66bca70df143707e719fd727.tar.bz2
scummvm-rg350-f16e054c3ad731cb66bca70df143707e719fd727.zip
BLADERUNNER: Added TaffyPatron actor
-rw-r--r--engines/bladerunner/module.mk1
-rw-r--r--engines/bladerunner/script/ai/taffy_patron.cpp191
-rw-r--r--engines/bladerunner/script/ai_script.cpp1
-rw-r--r--engines/bladerunner/script/ai_script.h3
4 files changed, 196 insertions, 0 deletions
diff --git a/engines/bladerunner/module.mk b/engines/bladerunner/module.mk
index e8953cfe04..4a04e30f0a 100644
--- a/engines/bladerunner/module.mk
+++ b/engines/bladerunner/module.mk
@@ -90,6 +90,7 @@ MODULE_OBJS = \
script/ai/sergeant_walls.o \
script/ai/shoeshine_man.o \
script/ai/steele.o \
+ script/ai/taffy_patron.o \
script/ai/the_bard.o \
script/ai/transient.o \
script/ai/tyrell_guard.o \
diff --git a/engines/bladerunner/script/ai/taffy_patron.cpp b/engines/bladerunner/script/ai/taffy_patron.cpp
new file mode 100644
index 0000000000..c7fa3a7165
--- /dev/null
+++ b/engines/bladerunner/script/ai/taffy_patron.cpp
@@ -0,0 +1,191 @@
+/* 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 {
+
+AIScriptTaffyPatron::AIScriptTaffyPatron(BladeRunnerEngine *vm) : AIScriptBase(vm) {
+}
+
+void AIScriptTaffyPatron::Initialize() {
+ _animationFrame = 0;
+ _animationState = 0;
+ _animationStateNext = 0;
+ _animationNext = 0;
+}
+
+bool AIScriptTaffyPatron::Update() {
+ return false;
+}
+
+void AIScriptTaffyPatron::TimerExpired(int timer) {
+ //return false;
+}
+
+void AIScriptTaffyPatron::CompletedMovementTrack() {
+ //return false;
+}
+
+void AIScriptTaffyPatron::ReceivedClue(int clueId, int fromActorId) {
+ //return false;
+}
+
+void AIScriptTaffyPatron::ClickedByPlayer() {
+ //return false;
+}
+
+void AIScriptTaffyPatron::EnteredScene(int sceneId) {
+ // return false;
+}
+
+void AIScriptTaffyPatron::OtherAgentEnteredThisScene(int otherActorId) {
+ // return false;
+}
+
+void AIScriptTaffyPatron::OtherAgentExitedThisScene(int otherActorId) {
+ // return false;
+}
+
+void AIScriptTaffyPatron::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
+ // return false;
+}
+
+void AIScriptTaffyPatron::ShotAtAndMissed() {
+ // return false;
+}
+
+bool AIScriptTaffyPatron::ShotAtAndHit() {
+ return false;
+}
+
+void AIScriptTaffyPatron::Retired(int byActorId) {
+ // return false;
+}
+
+int AIScriptTaffyPatron::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) {
+ return 0;
+}
+
+bool AIScriptTaffyPatron::GoalChanged(int currentGoalNumber, int newGoalNumber) {
+ switch (newGoalNumber) {
+ case 0:
+ Actor_Put_In_Set(kActorTaffyPatron, kSetFreeSlotH);
+ Actor_Set_At_Waypoint(kActorTaffyPatron, 40, 0);
+ return true;
+
+ case 250:
+ Actor_Put_In_Set(kActorTaffyPatron, kSetNR01);
+ Actor_Set_At_XYZ(kActorTaffyPatron, -170.39999, 23.68, -850.0, 324);
+ Async_Actor_Walk_To_XYZ(kActorTaffyPatron, -390.0, 31.549999, -429.0, 24, 1);
+ return true;
+
+ case 255:
+ Actor_Put_In_Set(kActorTaffyPatron, kSetNR01);
+ Actor_Set_At_XYZ(kActorTaffyPatron, -170.39999, 23.68, -850.0, 324);
+ Actor_Change_Animation_Mode(kActorTaffyPatron, 48);
+ return true;
+
+ default:
+ break;
+ }
+
+ return false;
+}
+
+bool AIScriptTaffyPatron::UpdateAnimation(int *animation, int *frame) {
+ switch (_animationState) {
+ case 0:
+ *animation = 406;
+ _animationFrame = 0;
+ break;
+
+ case 1:
+ *animation = 918;
+ _animationFrame++;
+ if (_animationFrame > Slice_Animation_Query_Number_Of_Frames(918) - 1) {
+ _animationFrame = 0;
+ }
+ break;
+
+ case 2:
+ *animation = 919;
+ if (_animationFrame < Slice_Animation_Query_Number_Of_Frames(919) - 1) {
+ _animationFrame++;
+ }
+ break;
+
+ default:
+ break;
+ }
+ *frame = _animationFrame;
+
+ return true;
+}
+
+bool AIScriptTaffyPatron::ChangeAnimationMode(int mode) {
+ switch (mode) {
+ case 0:
+ _animationState = 0;
+ _animationFrame = 0;
+ break;
+
+ case 2:
+ _animationState = 1;
+ _animationFrame = 0;
+ break;
+
+ case 48:
+ _animationState = 2;
+ _animationFrame = 0;
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}
+
+void AIScriptTaffyPatron::QueryAnimationState(int *animationState, int *animationFrame, int *animationStateNext, int *animationNext) {
+ *animationState = _animationState;
+ *animationFrame = _animationFrame;
+ *animationStateNext = _animationStateNext;
+ *animationNext = _animationNext;
+}
+
+void AIScriptTaffyPatron::SetAnimationState(int animationState, int animationFrame, int animationStateNext, int animationNext) {
+ _animationState = animationState;
+ _animationFrame = animationFrame;
+ _animationStateNext = animationStateNext;
+ _animationNext = animationNext;
+}
+
+bool AIScriptTaffyPatron::ReachedMovementTrackWaypoint(int waypointId) {
+ return true;
+}
+
+void AIScriptTaffyPatron::FledCombat() {
+ // return false;
+}
+
+} // End of namespace BladeRunner
diff --git a/engines/bladerunner/script/ai_script.cpp b/engines/bladerunner/script/ai_script.cpp
index 3aa3d88b8a..08938c8ed0 100644
--- a/engines/bladerunner/script/ai_script.cpp
+++ b/engines/bladerunner/script/ai_script.cpp
@@ -70,6 +70,7 @@ AIScripts::AIScripts(BladeRunnerEngine *vm, int actorCount) {
_AIScripts[kActorGovernorKolvig] = new AIScriptGovernorKolvig(_vm); // 41
_AIScripts[kActorEarlyQBartender] = new AIScriptEarlyQBartender(_vm); // 42
_AIScripts[kActorHawkersParrot] = new AIScriptHawkersParrot(_vm); // 43
+ _AIScripts[kActorTaffyPatron] = new AIScriptTaffyPatron(_vm); // 44
_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 29ebaab43e..c2d55b2211 100644
--- a/engines/bladerunner/script/ai_script.h
+++ b/engines/bladerunner/script/ai_script.h
@@ -275,6 +275,9 @@ END_SCRIPT
DECLARE_SCRIPT(HawkersParrot)
END_SCRIPT
+DECLARE_SCRIPT(TaffyPatron)
+END_SCRIPT
+
DECLARE_SCRIPT(HysteriaPatron1)
END_SCRIPT