aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-07 20:52:36 -0400
committerPaul Gilbert2016-07-10 16:38:44 -0400
commitbabdf0aa036a62e098be2e0aef7082e315afbf62 (patch)
tree34275e799358ba3fd1fcd21db5453fa4de44ebe2 /engines
parentb480a2f53e3a48a0e741f86e59cc141f8325c958 (diff)
downloadscummvm-rg350-babdf0aa036a62e098be2e0aef7082e315afbf62.tar.gz
scummvm-rg350-babdf0aa036a62e098be2e0aef7082e315afbf62.tar.bz2
scummvm-rg350-babdf0aa036a62e098be2e0aef7082e315afbf62.zip
TITANIC: Setting up of title engine and title script
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/true_talk/script_handler.cpp5
-rw-r--r--engines/titanic/true_talk/script_handler.h2
-rw-r--r--engines/titanic/true_talk/title_engine.cpp4
-rw-r--r--engines/titanic/true_talk/title_engine.h1
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp2
-rw-r--r--engines/titanic/true_talk/tt_title_script.cpp3
-rw-r--r--engines/titanic/true_talk/tt_title_script.h8
7 files changed, 19 insertions, 6 deletions
diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp
index a46a03301c..83d181275a 100644
--- a/engines/titanic/true_talk/script_handler.cpp
+++ b/engines/titanic/true_talk/script_handler.cpp
@@ -33,8 +33,11 @@ void CScriptHandler::setup(TTRoomScript *roomScript, TTNamedScript *npcScript, u
// TODO
}
-void CScriptHandler::processInput(TTNamedScript *npcScript, TTRoomScript *roomScript,
+void CScriptHandler::processInput(TTRoomScript *roomScript, TTNamedScript *npcScript,
const TTString &line) {
+ if (!roomScript || line.empty())
+ return;
+
// TODO
}
diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h
index 8d5c78dbc3..1206afe48e 100644
--- a/engines/titanic/true_talk/script_handler.h
+++ b/engines/titanic/true_talk/script_handler.h
@@ -42,7 +42,7 @@ public:
*/
void setup(TTRoomScript *roomScript, TTNamedScript *npcScript, uint charId);
- void processInput(TTNamedScript *npcScript, TTRoomScript *roomScript,
+ void processInput(TTRoomScript *roomScript, TTNamedScript *npcScript,
const TTString &line);
};
diff --git a/engines/titanic/true_talk/title_engine.cpp b/engines/titanic/true_talk/title_engine.cpp
index 5b8e8d9ef9..3908ea0986 100644
--- a/engines/titanic/true_talk/title_engine.cpp
+++ b/engines/titanic/true_talk/title_engine.cpp
@@ -33,10 +33,10 @@ CTitleEngine::~CTitleEngine() {
}
void CTitleEngine::setup(int val1, int val2) {
-
+ _script = new TTTitleScript();
+ _scriptHandler = new CScriptHandler(this, val1, val2);
}
-
/*------------------------------------------------------------------------*/
STtitleEngine::STtitleEngine(): CTitleEngine(), _field58(0) {
diff --git a/engines/titanic/true_talk/title_engine.h b/engines/titanic/true_talk/title_engine.h
index ab541ec6f8..389e376516 100644
--- a/engines/titanic/true_talk/title_engine.h
+++ b/engines/titanic/true_talk/title_engine.h
@@ -28,6 +28,7 @@
#include "titanic/support/string.h"
#include "titanic/true_talk/script_handler.h"
#include "titanic/true_talk/tt_script_base.h"
+#include "titanic/true_talk/tt_title_script.h"
namespace Titanic {
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 2f7828bc52..fefa2fa824 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -295,7 +295,7 @@ void CTrueTalkManager::processInput(CTrueTalkNPC *npc, CTextInputMsg *msg, CView
if (npcScript && roomScript) {
_currentNPC = npc;
- _titleEngine._scriptHandler->processInput(npcScript, roomScript,
+ _titleEngine._scriptHandler->processInput(roomScript, npcScript,
TTString(msg->_input));
_currentNPC = nullptr;
diff --git a/engines/titanic/true_talk/tt_title_script.cpp b/engines/titanic/true_talk/tt_title_script.cpp
index 048199ad62..af784e3352 100644
--- a/engines/titanic/true_talk/tt_title_script.cpp
+++ b/engines/titanic/true_talk/tt_title_script.cpp
@@ -24,5 +24,8 @@
namespace Titanic {
+TTTitleScript::TTTitleScript() : TTScriptBase(1, "", 0, "", 0, -1, -1, -1, 0),
+ _field50(0), _field5C(-1), _field60(0) {
+}
} // End of namespace Titanic
diff --git a/engines/titanic/true_talk/tt_title_script.h b/engines/titanic/true_talk/tt_title_script.h
index 0c36e832a9..7876ba8a71 100644
--- a/engines/titanic/true_talk/tt_title_script.h
+++ b/engines/titanic/true_talk/tt_title_script.h
@@ -24,12 +24,18 @@
#define TITANIC_TT_TITLE_SCRIPT_H
#include "titanic/true_talk/tt_script_base.h"
+#include "titanic/true_talk/tt_string.h"
namespace Titanic {
class TTTitleScript : public TTScriptBase {
+private:
+ int _field50;
+ TTString _string1;
+ int _field5C;
+ int _field60;
public:
-
+ TTTitleScript();
};
} // End of namespace Titanic