aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-05 23:33:26 -0400
committerPaul Gilbert2016-07-10 16:38:32 -0400
commit4d22064997b286fdf6eb179c710f2bd0ae539943 (patch)
treeb9ef62672128e3818e19daf649f5c95d817f627c
parentab86c09a2f4c8ea315824bb95c58b5f33728e115 (diff)
downloadscummvm-rg350-4d22064997b286fdf6eb179c710f2bd0ae539943.tar.gz
scummvm-rg350-4d22064997b286fdf6eb179c710f2bd0ae539943.tar.bz2
scummvm-rg350-4d22064997b286fdf6eb179c710f2bd0ae539943.zip
TITANIC: Beginnings of script handler
-rw-r--r--engines/titanic/module.mk2
-rw-r--r--engines/titanic/true_talk/script_handler.cpp (renamed from engines/titanic/true_talk/title_engine_sub.cpp)9
-rw-r--r--engines/titanic/true_talk/script_handler.h (renamed from engines/titanic/true_talk/title_engine_sub.h)20
-rw-r--r--engines/titanic/true_talk/title_engine.cpp4
-rw-r--r--engines/titanic/true_talk/title_engine.h4
5 files changed, 27 insertions, 12 deletions
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 10698cfc3b..df8f0534f4 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -457,7 +457,7 @@ MODULE_OBJS := \
true_talk/parrot_script.o \
true_talk/succubus_script.o \
true_talk/title_engine.o \
- true_talk/title_engine_sub.o \
+ true_talk/script_handler.o \
true_talk/true_talk_manager.o \
true_talk/tt_script_base.o \
true_talk/tt_room_script.o \
diff --git a/engines/titanic/true_talk/title_engine_sub.cpp b/engines/titanic/true_talk/script_handler.cpp
index f7e1f28d1d..de101214bf 100644
--- a/engines/titanic/true_talk/title_engine_sub.cpp
+++ b/engines/titanic/true_talk/script_handler.cpp
@@ -20,13 +20,18 @@
*
*/
-#include "titanic/true_talk/title_engine_sub.h"
+#include "titanic/true_talk/script_handler.h"
namespace Titanic {
/*------------------------------------------------------------------------*/
-CTitleEngineSub::CTitleEngineSub(CTitleEngine *owner, int val1, int val2) {
+CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) {
}
+void CScriptHandler::setup(TTNamedScript *npcScript, TTRoomScript *roomScript, uint charId) {
+
+}
+
+
} // End of namespace Titanic
diff --git a/engines/titanic/true_talk/title_engine_sub.h b/engines/titanic/true_talk/script_handler.h
index 050f041bf2..69c1c9486a 100644
--- a/engines/titanic/true_talk/title_engine_sub.h
+++ b/engines/titanic/true_talk/script_handler.h
@@ -20,18 +20,28 @@
*
*/
-#ifndef TITANIC_TITLE_ENGINE_SUB_H
-#define TITANIC_TITLE_ENGINE_SUB_H
+#ifndef TITANIC_SCRIPT_HANDLER_H
+#define TITANIC_SCRIPT_HANDLER_H
+
+#include "titanic/true_talk/tt_named_script.h"
+#include "titanic/true_talk/tt_room_script.h"
namespace Titanic {
class CTitleEngine;
-class CTitleEngineSub {
+class CScriptHandler {
+private:
+ CTitleEngine *_owner;
public:
- CTitleEngineSub(CTitleEngine *owner, int val1, int val2);
+ CScriptHandler(CTitleEngine *owner, int val1, int val2);
+
+ /**
+ * Set the character and room
+ */
+ void setup(TTNamedScript *npcScript, TTRoomScript *roomScript, uint charId);
};
} // End of namespace Titanic
-#endif /* TITANIC_TITLE_ENGINE_SUB_H */
+#endif /* TITANIC_SCRIPT_HANDLER_H */
diff --git a/engines/titanic/true_talk/title_engine.cpp b/engines/titanic/true_talk/title_engine.cpp
index adc74feff8..d5015b430c 100644
--- a/engines/titanic/true_talk/title_engine.cpp
+++ b/engines/titanic/true_talk/title_engine.cpp
@@ -24,12 +24,12 @@
namespace Titanic {
-CTitleEngine::CTitleEngine() : _script(nullptr), _sub(nullptr) {
+CTitleEngine::CTitleEngine() : _script(nullptr), _handler(nullptr) {
}
CTitleEngine::~CTitleEngine() {
delete _script;
- delete _sub;
+ delete _handler;
}
void CTitleEngine::setup(int val1, int val2) {
diff --git a/engines/titanic/true_talk/title_engine.h b/engines/titanic/true_talk/title_engine.h
index 71b0947012..8d32067616 100644
--- a/engines/titanic/true_talk/title_engine.h
+++ b/engines/titanic/true_talk/title_engine.h
@@ -26,14 +26,14 @@
#include "common/stream.h"
#include "common/winexe_pe.h"
#include "titanic/support/string.h"
-#include "titanic/true_talk/title_engine_sub.h"
+#include "titanic/true_talk/script_handler.h"
#include "titanic/true_talk/tt_script_base.h"
namespace Titanic {
class CTitleEngine {
protected:
- CTitleEngineSub *_sub;
+ CScriptHandler *_handler;
TTScriptBase *_script;
public:
CTitleEngine();