From e68e8334ed1d0516d68e19a716ca0feeed6c3de1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 Mar 2016 22:55:14 -0500 Subject: TITANIC: Beginnings of True Talk scripts hierarchy --- engines/titanic/true_talk/tt_scripts.h | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 engines/titanic/true_talk/tt_scripts.h (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h new file mode 100644 index 0000000000..b87a7c2a1a --- /dev/null +++ b/engines/titanic/true_talk/tt_scripts.h @@ -0,0 +1,35 @@ +/* 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. + * + */ + +#ifndef TITANIC_TT_SCRIPTS_H +#define TITANIC_TT_SCRIPTS_H + +namespace Titanic { + +class TTScripts { +public: + TTScripts() {} +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TT_CHARACTERS_H */ -- cgit v1.2.3 From c0de794584e1e4689db48eb1c94dc9d9aa7726c7 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 12 Mar 2016 07:59:44 -0500 Subject: TITANIC: Added stubs for the different script classes --- engines/titanic/true_talk/tt_scripts.h | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index b87a7c2a1a..e47a7b2f87 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -23,11 +23,42 @@ #ifndef TITANIC_TT_SCRIPTS_H #define TITANIC_TT_SCRIPTS_H +#include "titanic/core/list.h" +#include "titanic/true_talk/tt_named_script.h" +#include "titanic/true_talk/tt_unnamed_script.h" + namespace Titanic { +class CTitleEngine; + +PTR_LIST_ITEM(TTNamedScript); +PTR_LIST_ITEM(TTUnnamedScript); + +class TTNamedScriptList : public List { +}; + +class TTUnamedScriptList : public List { +}; + class TTScripts { +private: + TTNamedScriptList _namedScripts; + TTUnamedScriptList _unnamedScripts; + CTitleEngine *_titleEngine; + int _field24; + int _field28; +private: + /** + * Add a named script to the named scripts list + */ + void addScript(TTNamedScript *script); + + /** + * Add an unnamed script to the unnamed scripts list + */ + void addScript(TTUnnamedScript *script); public: - TTScripts() {} + TTScripts(CTitleEngine *titleEngine); }; } // End of namespace Titanic -- cgit v1.2.3 From 60e137c65121bd284b200d97cc930c4d1e15114c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 12 Mar 2016 10:51:34 -0500 Subject: TITANIC: Implemented true talk manager & script loading --- engines/titanic/true_talk/tt_scripts.h | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index e47a7b2f87..5934eb3625 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -31,19 +31,33 @@ namespace Titanic { class CTitleEngine; -PTR_LIST_ITEM(TTNamedScript); +class TTNamedScriptListItem : public ListItem { +public: + TTNamedScript *_script; + TTUnnamedScript *_unnamedScript; +public: + TTNamedScriptListItem() : _script(nullptr), _unnamedScript(nullptr) {} + TTNamedScriptListItem(TTNamedScript *script, TTUnnamedScript *unnamedScript) : + _script(script), _unnamedScript(unnamedScript) {} + virtual ~TTNamedScriptListItem() { delete _script; } +}; + PTR_LIST_ITEM(TTUnnamedScript); class TTNamedScriptList : public List { +public: + TTNamedScript *findById(int charId) const; }; -class TTUnamedScriptList : public List { +class TTUnnamedScriptList : public List { +public: + TTUnnamedScript *findById(int scriptId) const; }; class TTScripts { private: TTNamedScriptList _namedScripts; - TTUnamedScriptList _unnamedScripts; + TTUnnamedScriptList _unnamedScripts; CTitleEngine *_titleEngine; int _field24; int _field28; @@ -51,7 +65,7 @@ private: /** * Add a named script to the named scripts list */ - void addScript(TTNamedScript *script); + void addScript(TTNamedScript *script, int charId); /** * Add an unnamed script to the unnamed scripts list @@ -59,6 +73,16 @@ private: void addScript(TTUnnamedScript *script); public: TTScripts(CTitleEngine *titleEngine); + + /** + * Return a pointer to the specified script + */ + TTUnnamedScript *getUnnamedScript(int scriptId) const; + + /** + * Return a pointer to the specified named character script + */ + TTNamedScript *getNamedScript(int charId) const; }; } // End of namespace Titanic -- cgit v1.2.3 From d712875c02c6e82734f6ba9ea56f8206c51a22fe Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 5 May 2016 07:49:46 -0400 Subject: TITANIC: Renamed TT unnamed script classes to room scripts --- engines/titanic/true_talk/tt_scripts.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') 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 { public: TTNamedScript *findById(int charId) const; }; -class TTUnnamedScriptList : public List { +class TTRoomScriptList : public List { 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 -- cgit v1.2.3 From 0cbd9f5063715a35196c40d0e92a21e73b9f15e2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 7 May 2016 22:24:46 -0400 Subject: TITANIC: Changing TTNamed* classes to TTNpc* --- engines/titanic/true_talk/tt_scripts.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index 00638a03d5..7ee7263140 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -24,29 +24,29 @@ #define TITANIC_TT_SCRIPTS_H #include "titanic/core/list.h" -#include "titanic/true_talk/tt_named_script.h" +#include "titanic/true_talk/tt_npc_script.h" #include "titanic/true_talk/tt_room_script.h" namespace Titanic { class CTitleEngine; -class TTNamedScriptListItem : public ListItem { +class TTNpcScriptListItem : public ListItem { public: - TTNamedScript *_script; + TTNpcScript *_npcScript; TTRoomScript *_roomScript; public: - TTNamedScriptListItem() : _script(nullptr), _roomScript(nullptr) {} - TTNamedScriptListItem(TTNamedScript *script, TTRoomScript *roomScript) : - _script(script), _roomScript(roomScript) {} - virtual ~TTNamedScriptListItem() { delete _script; } + TTNpcScriptListItem() : _npcScript(nullptr), _roomScript(nullptr) {} + TTNpcScriptListItem(TTNpcScript *script, TTRoomScript *roomScript) : + _npcScript(script), _roomScript(roomScript) {} + virtual ~TTNpcScriptListItem() { delete _npcScript; } }; PTR_LIST_ITEM(TTRoomScript); -class TTNamedScriptList : public List { +class TTNpcScriptList : public List { public: - TTNamedScript *findById(int charId) const; + TTNpcScript *findById(int charId) const; }; class TTRoomScriptList : public List { @@ -56,7 +56,7 @@ public: class TTScripts { private: - TTNamedScriptList _namedScripts; + TTNpcScriptList _namedScripts; TTRoomScriptList _roomScripts; CTitleEngine *_titleEngine; int _field24; @@ -65,7 +65,7 @@ private: /** * Add a named script to the named scripts list */ - void addScript(TTNamedScript *script, int charId); + void addScript(TTNpcScript *script, int charId); /** * Add an unnamed script to the unnamed scripts list @@ -82,7 +82,7 @@ public: /** * Return a pointer to the specified named character script */ - TTNamedScript *getNamedScript(int charId) const; + TTNpcScript *getNamedScript(int charId) const; }; } // End of namespace Titanic -- cgit v1.2.3 From bac4ced73d53949408a4b1231c42d75eab8ee44c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 7 May 2016 22:45:52 -0400 Subject: TITANIC: Further renaming of named scripts to npc scripts --- engines/titanic/true_talk/tt_scripts.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index 7ee7263140..8dd2e9305d 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -56,7 +56,7 @@ public: class TTScripts { private: - TTNpcScriptList _namedScripts; + TTNpcScriptList _npcScripts; TTRoomScriptList _roomScripts; CTitleEngine *_titleEngine; int _field24; @@ -80,9 +80,9 @@ public: TTRoomScript *getRoomScript(int scriptId) const; /** - * Return a pointer to the specified named character script + * Return a pointer to the specified character script */ - TTNpcScript *getNamedScript(int charId) const; + TTNpcScript *getNpcScript(int charId) const; }; } // End of namespace Titanic -- cgit v1.2.3 From e5e0e22c56ed6dca6a3471b444720b76255025e0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 14 May 2016 00:12:47 -0400 Subject: TITANIC: Beginnings of TTinput class --- engines/titanic/true_talk/tt_scripts.h | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index 8dd2e9305d..afcc2c3aef 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -31,33 +31,33 @@ namespace Titanic { class CTitleEngine; -class TTNpcScriptListItem : public ListItem { +class TTnpcScriptListItem : public ListItem { public: - TTNpcScript *_npcScript; - TTRoomScript *_roomScript; + TTnpcScript *_npcScript; + TTroomScript *_roomScript; public: - TTNpcScriptListItem() : _npcScript(nullptr), _roomScript(nullptr) {} - TTNpcScriptListItem(TTNpcScript *script, TTRoomScript *roomScript) : + TTnpcScriptListItem() : _npcScript(nullptr), _roomScript(nullptr) {} + TTnpcScriptListItem(TTnpcScript *script, TTroomScript *roomScript) : _npcScript(script), _roomScript(roomScript) {} - virtual ~TTNpcScriptListItem() { delete _npcScript; } + virtual ~TTnpcScriptListItem() { delete _npcScript; } }; -PTR_LIST_ITEM(TTRoomScript); +PTR_LIST_ITEM(TTroomScript); -class TTNpcScriptList : public List { +class TTnpcScriptList : public List { public: - TTNpcScript *findById(int charId) const; + TTnpcScript *findById(int charId) const; }; -class TTRoomScriptList : public List { +class TTroomScriptList : public List { public: - TTRoomScript *findById(int scriptId) const; + TTroomScript *findById(int scriptId) const; }; -class TTScripts { +class TTscripts { private: - TTNpcScriptList _npcScripts; - TTRoomScriptList _roomScripts; + TTnpcScriptList _npcScripts; + TTroomScriptList _roomScripts; CTitleEngine *_titleEngine; int _field24; int _field28; @@ -65,24 +65,24 @@ private: /** * Add a named script to the named scripts list */ - void addScript(TTNpcScript *script, int charId); + void addScript(TTnpcScript *script, int charId); /** * Add an unnamed script to the unnamed scripts list */ - void addScript(TTRoomScript *script); + void addScript(TTroomScript *script); public: - TTScripts(CTitleEngine *titleEngine); + TTscripts(CTitleEngine *titleEngine); /** * Return a pointer to the specified room script */ - TTRoomScript *getRoomScript(int scriptId) const; + TTroomScript *getRoomScript(int scriptId) const; /** * Return a pointer to the specified character script */ - TTNpcScript *getNpcScript(int charId) const; + TTnpcScript *getNpcScript(int charId) const; }; } // End of namespace Titanic -- cgit v1.2.3 From cf63ceeb3c8e0b32b08e01186fe741bd42653c7e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 30 Jul 2016 21:34:41 -0400 Subject: TITANIC: Adding BellbotScript support methods --- engines/titanic/true_talk/tt_scripts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/true_talk/tt_scripts.h') diff --git a/engines/titanic/true_talk/tt_scripts.h b/engines/titanic/true_talk/tt_scripts.h index afcc2c3aef..734d86256f 100644 --- a/engines/titanic/true_talk/tt_scripts.h +++ b/engines/titanic/true_talk/tt_scripts.h @@ -51,7 +51,7 @@ public: class TTroomScriptList : public List { public: - TTroomScript *findById(int scriptId) const; + TTroomScript *findById(uint scriptId) const; }; class TTscripts { -- cgit v1.2.3