aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-05 07:49:46 -0400
committerPaul Gilbert2016-07-10 16:38:26 -0400
commitd712875c02c6e82734f6ba9ea56f8206c51a22fe (patch)
treee91535d4d0c009a5164d5f8ef6eeec7255c1fcff /engines
parentf75b46792579291e79c17a5e52c863d12eced949 (diff)
downloadscummvm-rg350-d712875c02c6e82734f6ba9ea56f8206c51a22fe.tar.gz
scummvm-rg350-d712875c02c6e82734f6ba9ea56f8206c51a22fe.tar.bz2
scummvm-rg350-d712875c02c6e82734f6ba9ea56f8206c51a22fe.zip
TITANIC: Renamed TT unnamed script classes to room scripts
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/core/room_item.cpp2
-rw-r--r--engines/titanic/module.mk2
-rw-r--r--engines/titanic/true_talk/true_talk_manager.cpp8
-rw-r--r--engines/titanic/true_talk/true_talk_manager.h2
-rw-r--r--engines/titanic/true_talk/tt_room_script.cpp (renamed from engines/titanic/true_talk/tt_unnamed_script.cpp)20
-rw-r--r--engines/titanic/true_talk/tt_room_script.h (renamed from engines/titanic/true_talk/tt_unnamed_script.h)14
-rw-r--r--engines/titanic/true_talk/tt_scripts.cpp28
-rw-r--r--engines/titanic/true_talk/tt_scripts.h24
8 files changed, 50 insertions, 50 deletions
diff --git a/engines/titanic/core/room_item.cpp b/engines/titanic/core/room_item.cpp
index c5815795ae..b1c9aeeb10 100644
--- a/engines/titanic/core/room_item.cpp
+++ b/engines/titanic/core/room_item.cpp
@@ -100,7 +100,7 @@ void CRoomItem::load(SimpleFile *file) {
}
void CRoomItem::loading() {
- // TODO
+ warning("TODO: CRoomItem::loading");
}
void CRoomItem::calcNodePosition(const Point &nodePos, double &xVal, double &yVal) const {
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 778226dfa2..a1529317fd 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -458,7 +458,7 @@ MODULE_OBJS := \
true_talk/title_engine.o \
true_talk/true_talk_manager.o \
true_talk/tt_script_base.o \
- true_talk/tt_unnamed_script.o \
+ true_talk/tt_room_script.o \
true_talk/tt_named_script.o \
true_talk/tt_scripts.o \
true_talk/tt_string.o
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 805ebd368d..c9343d1f39 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -231,18 +231,18 @@ TTNamedScript *CTrueTalkManager::getNpcScript(CGameObject *npc) const {
return script;
}
-TTUnnamedScript *CTrueTalkManager::getRoomScript() const {
+TTRoomScript *CTrueTalkManager::getRoomScript() const {
CRoomItem *room = _gameManager->getRoom();
- TTUnnamedScript *script = nullptr;
+ TTRoomScript *script = nullptr;
if (room) {
int scriptId = room->getScriptId();
if (scriptId)
- script = _scripts.getUnnamedScript(scriptId);
+ script = _scripts.getRoomScript(scriptId);
}
if (!script) {
// Fall back on the default Room script
- script = _scripts.getUnnamedScript(110);
+ script = _scripts.getRoomScript(110);
}
return script;
diff --git a/engines/titanic/true_talk/true_talk_manager.h b/engines/titanic/true_talk/true_talk_manager.h
index ae740cb9f1..991bf1608f 100644
--- a/engines/titanic/true_talk/true_talk_manager.h
+++ b/engines/titanic/true_talk/true_talk_manager.h
@@ -67,7 +67,7 @@ private:
/**
* Gets the script associated with the current room
*/
- TTUnnamedScript *getRoomScript() const;
+ TTRoomScript *getRoomScript() const;
public:
static int _v1;
static int _v2;
diff --git a/engines/titanic/true_talk/tt_unnamed_script.cpp b/engines/titanic/true_talk/tt_room_script.cpp
index 8c91290fba..1c37a39bf0 100644
--- a/engines/titanic/true_talk/tt_unnamed_script.cpp
+++ b/engines/titanic/true_talk/tt_room_script.cpp
@@ -21,11 +21,11 @@
*/
#include "common/textconsole.h"
-#include "titanic/true_talk/tt_unnamed_script.h"
+#include "titanic/true_talk/tt_room_script.h"
namespace Titanic {
-TTUnnamedScriptBase::TTUnnamedScriptBase(int scriptId,
+TTRoomScriptBase::TTRoomScriptBase(int scriptId,
const char *charClass, const char *charName,
int v3, int v4, int v5, int v6, int v2, int v7) : _scriptId(scriptId),
TTScriptBase(3, charClass, v2, charName, v3, v4, v5, v6, v7) {
@@ -33,31 +33,31 @@ TTUnnamedScriptBase::TTUnnamedScriptBase(int scriptId,
/*------------------------------------------------------------------------*/
-TTUnnamedScript::TTUnnamedScript(int scriptId) :
- TTUnnamedScriptBase(scriptId, "", "", 0, -1, -1, -1, 0, 0) {
+TTRoomScript::TTRoomScript(int scriptId) :
+ TTRoomScriptBase(scriptId, "", "", 0, -1, -1, -1, 0, 0) {
}
-void TTUnnamedScript::proc6() {
+void TTRoomScript::proc6() {
warning("TODO");
}
-void TTUnnamedScript::proc7() {
+void TTRoomScript::proc7() {
warning("TODO");
}
-void TTUnnamedScript::proc8() {
+void TTRoomScript::proc8() {
warning("TODO");
}
-void TTUnnamedScript::proc9() {
+void TTRoomScript::proc9() {
warning("TODO");
}
-void TTUnnamedScript::proc10() {
+void TTRoomScript::proc10() {
warning("TODO");
}
-void TTUnnamedScript::proc11() {
+void TTRoomScript::proc11() {
warning("TODO");
}
diff --git a/engines/titanic/true_talk/tt_unnamed_script.h b/engines/titanic/true_talk/tt_room_script.h
index eeba200193..ed17b29e9c 100644
--- a/engines/titanic/true_talk/tt_unnamed_script.h
+++ b/engines/titanic/true_talk/tt_room_script.h
@@ -20,18 +20,18 @@
*
*/
-#ifndef TITANIC_TT_UNNAMED_SCRIPT_H
-#define TITANIC_TT_UNNAMED_SCRIPT_H
+#ifndef TITANIC_TT_ROOM_SCRIPT_H
+#define TITANIC_TT_ROOM_SCRIPT_H
#include "titanic/true_talk/tt_script_base.h"
namespace Titanic {
-class TTUnnamedScriptBase : public TTScriptBase {
+class TTRoomScriptBase : public TTScriptBase {
public:
int _scriptId;
public:
- TTUnnamedScriptBase(int scriptId, const char *charClass, const char *charName,
+ TTRoomScriptBase(int scriptId, const char *charClass, const char *charName,
int v3, int v4, int v5, int v6, int v2, int v7);
virtual void proc6() = 0;
@@ -43,11 +43,11 @@ public:
};
-class TTUnnamedScript : public TTUnnamedScriptBase {
+class TTRoomScript : public TTRoomScriptBase {
private:
int _field54;
public:
- TTUnnamedScript(int scriptId);
+ TTRoomScript(int scriptId);
virtual void proc6();
virtual void proc7();
@@ -59,4 +59,4 @@ public:
} // End of namespace Titanic
-#endif /* TITANIC_TT_UNNAMED_SCRIPT_H */
+#endif /* TITANIC_TT_ROOM_SCRIPT_H */
diff --git a/engines/titanic/true_talk/tt_scripts.cpp b/engines/titanic/true_talk/tt_scripts.cpp
index 8e34ec5d2b..9bfa31af8b 100644
--- a/engines/titanic/true_talk/tt_scripts.cpp
+++ b/engines/titanic/true_talk/tt_scripts.cpp
@@ -45,9 +45,9 @@ TTNamedScript *TTNamedScriptList::findById(int charId) const {
/*------------------------------------------------------------------------*/
-TTUnnamedScript *TTUnnamedScriptList::findById(int scriptId) const {
- for (TTUnnamedScriptList::const_iterator i = begin(); i != end(); ++i) {
- const TTUnnamedScriptListItem *item = *i;
+TTRoomScript *TTRoomScriptList::findById(int scriptId) const {
+ for (TTRoomScriptList::const_iterator i = begin(); i != end(); ++i) {
+ const TTRoomScriptListItem *item = *i;
if (item->_item->_scriptId == scriptId)
return item->_item;
}
@@ -59,11 +59,11 @@ TTUnnamedScript *TTUnnamedScriptList::findById(int scriptId) const {
TTScripts::TTScripts(CTitleEngine *titleEngine) :
_titleEngine(titleEngine), _field24(0), _field28(0) {
- // Load unnamed scripts
+ // Load room scripts
for (int scriptNum = 100; scriptNum < 133; ++scriptNum)
- addScript(new TTUnnamedScript(scriptNum));
+ addScript(new TTRoomScript(scriptNum));
- // Load named scripts
+ // Load npc scripts
addScript(new DoorbotScript(104, "Doorbot", 0, "Fentible", 11, 1, -1, -1, -1, 0), 100);
addScript(new BellbotScript(101, "Bellbot", 0, "Krage", 8, 1), 110);
addScript(new LiftbotScript(105, "LiftBot", 0, "Nobby", 11, 1, -1, -1, -1, 0), 103);
@@ -77,19 +77,19 @@ TTScripts::TTScripts(CTitleEngine *titleEngine) :
void TTScripts::addScript(TTNamedScript *script, int scriptId) {
script->proc13();
- // Find the unnamed script this is associated with
- TTUnnamedScript *unnamedScript = getUnnamedScript(scriptId);
- assert(unnamedScript);
+ // Find the room script this is associated with
+ TTRoomScript *roomScript = getRoomScript(scriptId);
+ assert(roomScript);
- _namedScripts.push_back(new TTNamedScriptListItem(script, unnamedScript));
+ _namedScripts.push_back(new TTNamedScriptListItem(script, roomScript));
}
-void TTScripts::addScript(TTUnnamedScript *script) {
- _unnamedScripts.push_back(new TTUnnamedScriptListItem(script));
+void TTScripts::addScript(TTRoomScript *script) {
+ _roomScripts.push_back(new TTRoomScriptListItem(script));
}
-TTUnnamedScript *TTScripts::getUnnamedScript(int scriptId) const {
- return _unnamedScripts.findById(scriptId);
+TTRoomScript *TTScripts::getRoomScript(int scriptId) const {
+ return _roomScripts.findById(scriptId);
}
TTNamedScript *TTScripts::getNamedScript(int charId) const {
diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h
index 5934eb3625..00638a03d5 100644
--- a/engines/titanic/true_talk/tt_scripts.h
+++ b/engines/titanic/true_talk/tt_scripts.h
@@ -25,7 +25,7 @@
#include "titanic/core/list.h"
#include "titanic/true_talk/tt_named_script.h"
-#include "titanic/true_talk/tt_unnamed_script.h"
+#include "titanic/true_talk/tt_room_script.h"
namespace Titanic {
@@ -34,30 +34,30 @@ class CTitleEngine;
class TTNamedScriptListItem : public ListItem {
public:
TTNamedScript *_script;
- TTUnnamedScript *_unnamedScript;
+ TTRoomScript *_roomScript;
public:
- TTNamedScriptListItem() : _script(nullptr), _unnamedScript(nullptr) {}
- TTNamedScriptListItem(TTNamedScript *script, TTUnnamedScript *unnamedScript) :
- _script(script), _unnamedScript(unnamedScript) {}
+ TTNamedScriptListItem() : _script(nullptr), _roomScript(nullptr) {}
+ TTNamedScriptListItem(TTNamedScript *script, TTRoomScript *roomScript) :
+ _script(script), _roomScript(roomScript) {}
virtual ~TTNamedScriptListItem() { delete _script; }
};
-PTR_LIST_ITEM(TTUnnamedScript);
+PTR_LIST_ITEM(TTRoomScript);
class TTNamedScriptList : public List<TTNamedScriptListItem> {
public:
TTNamedScript *findById(int charId) const;
};
-class TTUnnamedScriptList : public List<TTUnnamedScriptListItem> {
+class TTRoomScriptList : public List<TTRoomScriptListItem> {
public:
- TTUnnamedScript *findById(int scriptId) const;
+ TTRoomScript *findById(int scriptId) const;
};
class TTScripts {
private:
TTNamedScriptList _namedScripts;
- TTUnnamedScriptList _unnamedScripts;
+ TTRoomScriptList _roomScripts;
CTitleEngine *_titleEngine;
int _field24;
int _field28;
@@ -70,14 +70,14 @@ private:
/**
* Add an unnamed script to the unnamed scripts list
*/
- void addScript(TTUnnamedScript *script);
+ void addScript(TTRoomScript *script);
public:
TTScripts(CTitleEngine *titleEngine);
/**
- * Return a pointer to the specified script
+ * Return a pointer to the specified room script
*/
- TTUnnamedScript *getUnnamedScript(int scriptId) const;
+ TTRoomScript *getRoomScript(int scriptId) const;
/**
* Return a pointer to the specified named character script