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/core/list.h | 20 ++++ engines/titanic/module.mk | 9 ++ engines/titanic/true_talk/barbot_script.cpp | 103 +++++++++++++++++++ engines/titanic/true_talk/barbot_script.h | 56 ++++++++++ engines/titanic/true_talk/bellbot_script.cpp | 114 +++++++++++++++++++++ engines/titanic/true_talk/bellbot_script.h | 60 +++++++++++ engines/titanic/true_talk/deskbot_script.cpp | 131 ++++++++++++++++++++++++ engines/titanic/true_talk/deskbot_script.h | 59 +++++++++++ engines/titanic/true_talk/doorbot_script.cpp | 103 +++++++++++++++++++ engines/titanic/true_talk/doorbot_script.h | 58 +++++++++++ engines/titanic/true_talk/liftbot_script.cpp | 103 +++++++++++++++++++ engines/titanic/true_talk/liftbot_script.h | 56 ++++++++++ engines/titanic/true_talk/maitred_script.cpp | 103 +++++++++++++++++++ engines/titanic/true_talk/maitred_script.h | 52 ++++++++++ engines/titanic/true_talk/parrot_script.cpp | 69 +++++++++++++ engines/titanic/true_talk/parrot_script.h | 49 +++++++++ engines/titanic/true_talk/succubus_script.cpp | 74 +++++++++++++ engines/titanic/true_talk/succubus_script.h | 53 ++++++++++ engines/titanic/true_talk/title_engine.cpp | 27 +++++ engines/titanic/true_talk/title_engine.h | 33 ++++++ engines/titanic/true_talk/true_talk_manager.cpp | 39 ++++++- engines/titanic/true_talk/true_talk_manager.h | 10 +- engines/titanic/true_talk/tt_named_script.cpp | 17 +++ engines/titanic/true_talk/tt_named_script.h | 22 ++-- engines/titanic/true_talk/tt_scripts.cpp | 34 ++++++ engines/titanic/true_talk/tt_scripts.h | 33 +++++- engines/titanic/true_talk/tt_string.h | 2 +- 27 files changed, 1475 insertions(+), 14 deletions(-) create mode 100644 engines/titanic/true_talk/barbot_script.cpp create mode 100644 engines/titanic/true_talk/barbot_script.h create mode 100644 engines/titanic/true_talk/bellbot_script.cpp create mode 100644 engines/titanic/true_talk/bellbot_script.h create mode 100644 engines/titanic/true_talk/deskbot_script.cpp create mode 100644 engines/titanic/true_talk/deskbot_script.h create mode 100644 engines/titanic/true_talk/doorbot_script.cpp create mode 100644 engines/titanic/true_talk/doorbot_script.h create mode 100644 engines/titanic/true_talk/liftbot_script.cpp create mode 100644 engines/titanic/true_talk/liftbot_script.h create mode 100644 engines/titanic/true_talk/maitred_script.cpp create mode 100644 engines/titanic/true_talk/maitred_script.h create mode 100644 engines/titanic/true_talk/parrot_script.cpp create mode 100644 engines/titanic/true_talk/parrot_script.h create mode 100644 engines/titanic/true_talk/succubus_script.cpp create mode 100644 engines/titanic/true_talk/succubus_script.h create mode 100644 engines/titanic/true_talk/title_engine.cpp create mode 100644 engines/titanic/true_talk/title_engine.h (limited to 'engines/titanic') diff --git a/engines/titanic/core/list.h b/engines/titanic/core/list.h index 312405dca9..e3623c15b4 100644 --- a/engines/titanic/core/list.h +++ b/engines/titanic/core/list.h @@ -48,6 +48,26 @@ public: virtual void load(SimpleFile *file); }; +/** + * List item macro for managed pointers an item + */ +#define PTR_LIST_ITEM(T) class T##ListItem : public ListItem { \ + public: T *_item; \ + T##ListItem() : _item(nullptr) {} \ + T##ListItem(T *item) : _item(item) {} \ + virtual ~T##ListItem() { delete _item; } \ + } + +template +class PtrListItem : public ListItem { +public: + T *_item; +public: + PtrListItem() : _item(nullptr) {} + PtrListItem(T *item) : _item(item) {} + virtual ~PtrListItem() { delete _item; } +}; + template class List : public CSaveableObject, public Common::List { public: diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 8a248d1595..bfb9317adc 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -424,6 +424,15 @@ MODULE_OBJS := \ star_control/star_control_sub13.o \ star_control/star_control_sub14.o \ star_control/star_control_sub15.o \ + true_talk/barbot_script.o \ + true_talk/bellbot_script.o \ + true_talk/deskbot_script.o \ + true_talk/doorbot_script.o \ + true_talk/liftbot_script.o \ + true_talk/maitred_script.o \ + true_talk/parrot_script.o \ + true_talk/succubus_script.o \ + true_talk/title_engine.o \ true_talk/true_talk_manager.o \ true_talk/tt_script_base.o \ true_talk/tt_unnamed_script.o \ diff --git a/engines/titanic/true_talk/barbot_script.cpp b/engines/titanic/true_talk/barbot_script.cpp new file mode 100644 index 0000000000..a9a0be16c3 --- /dev/null +++ b/engines/titanic/true_talk/barbot_script.cpp @@ -0,0 +1,103 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/barbot_script.h" + +namespace Titanic { + +int BarbotScript::proc6() const { + warning("TODO"); + return 2; +} + +void BarbotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int BarbotScript::proc10() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc15() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc16() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc17() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc18() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int BarbotScript::proc22() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc23() const { + warning("TODO"); + return 0; +} + +void BarbotScript::proc24() { + warning("TODO"); +} + +int BarbotScript::proc25() const { + warning("TODO"); + return 0; +} + +void BarbotScript::proc26() { +} + +void BarbotScript::proc32() { + warning("TODO"); +} + +int BarbotScript::proc36() const { + warning("TODO"); + return 0; +} + +int BarbotScript::proc37() const { + warning("TODO"); + return 0; +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/barbot_script.h b/engines/titanic/true_talk/barbot_script.h new file mode 100644 index 0000000000..f40c67dfab --- /dev/null +++ b/engines/titanic/true_talk/barbot_script.h @@ -0,0 +1,56 @@ +/* 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_BARBOT_SCRIPT_H +#define TITANIC_BARBOT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class BarbotScript : public TTNamedScript { +public: + BarbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7) {} + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc15() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual void proc32(); + virtual int proc36() const; + virtual int proc37() const; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BARBOT_SCRIPT_H */ diff --git a/engines/titanic/true_talk/bellbot_script.cpp b/engines/titanic/true_talk/bellbot_script.cpp new file mode 100644 index 0000000000..a296752004 --- /dev/null +++ b/engines/titanic/true_talk/bellbot_script.cpp @@ -0,0 +1,114 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/bellbot_script.h" +#include "titanic/true_talk/true_talk_manager.h" + +namespace Titanic { + +BellbotScript::BellbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, -1, -1, -1, 0), + _field2D0(0), _field2D4(0), _field2D8(0), _field2DC(0) { + CTrueTalkManager::setFlags(25, 0); + CTrueTalkManager::setFlags(24, 0); + CTrueTalkManager::setFlags(40, 0); + CTrueTalkManager::setFlags(26, 0); + + randomizeFlags(); + _array[0] = 100; + _array[1] = 0; +} + +int BellbotScript::proc6() const { + warning("TODO"); + return 2; +} + +void BellbotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int BellbotScript::proc10() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc15() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc16() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc17() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc18() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int BellbotScript::proc22() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc23() const { + warning("TODO"); + return 0; +} + +void BellbotScript::proc24() { + warning("TODO"); +} + +int BellbotScript::proc25() const { + warning("TODO"); + return 0; +} + +void BellbotScript::proc26() { +} + +int BellbotScript::proc36() const { + warning("TODO"); + return 0; +} + +int BellbotScript::proc37() const { + warning("TODO"); + return 0; +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/bellbot_script.h b/engines/titanic/true_talk/bellbot_script.h new file mode 100644 index 0000000000..e792d160e4 --- /dev/null +++ b/engines/titanic/true_talk/bellbot_script.h @@ -0,0 +1,60 @@ +/* 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_BELLBOT_SCRIPT_H +#define TITANIC_BELLBOT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class BellbotScript : public TTNamedScript { +private: + int _array[150]; + int _field2D0; + int _field2D4; + int _field2D8; + int _field2DC; +public: + BellbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2); + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc15() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual int proc36() const; + virtual int proc37() const; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BELLBOT_SCRIPT_H */ diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp new file mode 100644 index 0000000000..b79714e2e1 --- /dev/null +++ b/engines/titanic/true_talk/deskbot_script.cpp @@ -0,0 +1,131 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/deskbot_script.h" +#include "titanic/true_talk/true_talk_manager.h" + +namespace Titanic { + +DeskbotScript::DeskbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, -1, -1, -1, 0) { + CTrueTalkManager::setFlags(18, 0); + CTrueTalkManager::setFlags(19, 0); + CTrueTalkManager::setFlags(20, 0); + CTrueTalkManager::setFlags(21, 0); + CTrueTalkManager::setFlags(22, 0); + + randomizeFlags(); + _array[0] = 100; + if (_field74 == 1) + _field74 = 0; +} + +int DeskbotScript::proc6() const { + warning("TODO"); + return 2; +} + +void DeskbotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int DeskbotScript::proc10() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc15() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc16() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc17() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc18() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc22() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc23() const { + warning("TODO"); + return 0; +} + +void DeskbotScript::proc24() { + warning("TODO"); +} + +int DeskbotScript::proc25() const { + warning("TODO"); + return 0; +} + +void DeskbotScript::proc26() { +} + +int DeskbotScript::proc36() const { + warning("TODO"); + return 0; +} + +int DeskbotScript::proc37() const { + warning("TODO"); + return 0; +} + +void DeskbotScript::proc38() { + warning("TODO"); +} + +void DeskbotScript::proc39() { + warning("TODO"); +} + +void DeskbotScript::proc40() { + warning("TODO"); +} + +void DeskbotScript::proc41() { + warning("TODO"); +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/deskbot_script.h b/engines/titanic/true_talk/deskbot_script.h new file mode 100644 index 0000000000..c40aca988a --- /dev/null +++ b/engines/titanic/true_talk/deskbot_script.h @@ -0,0 +1,59 @@ +/* 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_DESKBOT_SCRIPT_H +#define TITANIC_DESKBOT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class DeskbotScript : public TTNamedScript { +public: + DeskbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2); + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc15() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual int proc36() const; + virtual int proc37() const; + + virtual void proc38(); + virtual void proc39(); + virtual void proc40(); + virtual void proc41(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_DESKBOT_SCRIPT_H */ diff --git a/engines/titanic/true_talk/doorbot_script.cpp b/engines/titanic/true_talk/doorbot_script.cpp new file mode 100644 index 0000000000..4bca9a6491 --- /dev/null +++ b/engines/titanic/true_talk/doorbot_script.cpp @@ -0,0 +1,103 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/doorbot_script.h" + +namespace Titanic { + +int DoorbotScript::proc6() const { + warning("TODO"); + return 2; +} + +void DoorbotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int DoorbotScript::proc10() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc15() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc16() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc17() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc18() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc22() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc23() const { + warning("TODO"); + return 0; +} + +void DoorbotScript::proc24() { + warning("TODO"); +} + +int DoorbotScript::proc25() const { + warning("TODO"); + return 0; +} + +void DoorbotScript::proc26() { +} + +void DoorbotScript::proc32() { + warning("TODO"); +} + +int DoorbotScript::proc36() const { + warning("TODO"); + return 0; +} + +int DoorbotScript::proc37() const { + warning("TODO"); + return 0; +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/doorbot_script.h b/engines/titanic/true_talk/doorbot_script.h new file mode 100644 index 0000000000..549476036d --- /dev/null +++ b/engines/titanic/true_talk/doorbot_script.h @@ -0,0 +1,58 @@ +/* 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_DOORBOT_SCRIPT_H +#define TITANIC_DOORBOT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class DoorbotScript : public TTNamedScript { +private: + int _array[148]; +public: + DoorbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7) {} + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc15() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual void proc32(); + virtual int proc36() const; + virtual int proc37() const; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TT_CHARACTER1_H */ diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp new file mode 100644 index 0000000000..4bd994fbbc --- /dev/null +++ b/engines/titanic/true_talk/liftbot_script.cpp @@ -0,0 +1,103 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/liftbot_script.h" + +namespace Titanic { + +int LiftbotScript::proc6() const { + warning("TODO"); + return 2; +} + +void LiftbotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int LiftbotScript::proc9() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc10() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc15() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc16() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc17() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc18() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc22() const { + warning("TODO"); + return 0; +} + +int LiftbotScript::proc23() const { + warning("TODO"); + return 0; +} + +void LiftbotScript::proc24() { + warning("TODO"); +} + +int LiftbotScript::proc25() const { + warning("TODO"); + return 0; +} + +void LiftbotScript::proc26() { +} + +void LiftbotScript::proc32() { + warning("TODO"); +} + +int LiftbotScript::proc37() const { + warning("TODO"); + return 0; +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/liftbot_script.h b/engines/titanic/true_talk/liftbot_script.h new file mode 100644 index 0000000000..ddbdabb145 --- /dev/null +++ b/engines/titanic/true_talk/liftbot_script.h @@ -0,0 +1,56 @@ +/* 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_LIFTBOT_SCRIPT_H +#define TITANIC_LIFTBOT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class LiftbotScript : public TTNamedScript { +public: + LiftbotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7) {} + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc9() const; + virtual int proc10() const; + virtual int proc15() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual void proc32(); + virtual int proc37() const; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_LIFTBOT_SCRIPT_H */ diff --git a/engines/titanic/true_talk/maitred_script.cpp b/engines/titanic/true_talk/maitred_script.cpp new file mode 100644 index 0000000000..1caec6249b --- /dev/null +++ b/engines/titanic/true_talk/maitred_script.cpp @@ -0,0 +1,103 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/maitred_script.h" +#include "titanic/true_talk/true_talk_manager.h" + +namespace Titanic { + +MaitreDScript::MaitreDScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, -1, -1, -1, 0) { + CTrueTalkManager::setFlags(9, 1); + CTrueTalkManager::setFlags(10, 0); + CTrueTalkManager::setFlags(11, 0); + CTrueTalkManager::setFlags(12, 0); + CTrueTalkManager::setFlags(13, 0); + CTrueTalkManager::setFlags(14, 0); + CTrueTalkManager::setFlags(15, 0); + CTrueTalkManager::setFlags(16, 0); +} + +int MaitreDScript::proc6() const { + warning("TODO"); + return 2; +} + +void MaitreDScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int MaitreDScript::proc10() const { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc16() const { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc17() const { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc18() const { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc22() const { + warning("TODO"); + return 0; +} + +int MaitreDScript::proc23() const { + warning("TODO"); + return 0; +} + +void MaitreDScript::proc24() { + warning("TODO"); +} + +int MaitreDScript::proc25() const { + warning("TODO"); + return 0; +} + +void MaitreDScript::proc26() { +} + +int MaitreDScript::proc37() const { + warning("TODO"); + return 0; +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/maitred_script.h b/engines/titanic/true_talk/maitred_script.h new file mode 100644 index 0000000000..2af3f42dac --- /dev/null +++ b/engines/titanic/true_talk/maitred_script.h @@ -0,0 +1,52 @@ +/* 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_MAITRED_SCRIPT_H +#define TITANIC_MAITRED_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class MaitreDScript : public TTNamedScript { +public: + MaitreDScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2); + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc16() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc22() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); + virtual int proc37() const; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_MAITRED_SCRIPT_H */ diff --git a/engines/titanic/true_talk/parrot_script.cpp b/engines/titanic/true_talk/parrot_script.cpp new file mode 100644 index 0000000000..9772f2111c --- /dev/null +++ b/engines/titanic/true_talk/parrot_script.cpp @@ -0,0 +1,69 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/parrot_script.h" + +namespace Titanic { + +int ParrotScript::proc6() const { + warning("TODO"); + return 2; +} + +void ParrotScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int ParrotScript::proc10() const { + warning("TODO"); + return 0; +} + +int ParrotScript::proc17() const { + warning("TODO"); + return 0; +} + +int ParrotScript::proc18() const { + warning("TODO"); + return 0; +} + +int ParrotScript::proc23() const { + warning("TODO"); + return 0; +} + +void ParrotScript::proc24() { + warning("TODO"); +} + +int ParrotScript::proc25() const { + warning("TODO"); + return 0; +} + +void ParrotScript::proc26() { +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/parrot_script.h b/engines/titanic/true_talk/parrot_script.h new file mode 100644 index 0000000000..0dde14d10f --- /dev/null +++ b/engines/titanic/true_talk/parrot_script.h @@ -0,0 +1,49 @@ +/* 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_PARROT_SCRIPT_H +#define TITANIC_PARROT_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class ParrotScript : public TTNamedScript { +public: + ParrotScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7) {} + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PARROT_SCRIPT_H */ diff --git a/engines/titanic/true_talk/succubus_script.cpp b/engines/titanic/true_talk/succubus_script.cpp new file mode 100644 index 0000000000..c21edefd8f --- /dev/null +++ b/engines/titanic/true_talk/succubus_script.cpp @@ -0,0 +1,74 @@ +/* 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 "common/textconsole.h" +#include "titanic/true_talk/succubus_script.h" + +namespace Titanic { + +int SuccUBusScript::proc6() const { + warning("TODO"); + return 2; +} + +void SuccUBusScript::proc7(int v1, int v2) { + warning("TODO"); +} + +int SuccUBusScript::proc10() const { + warning("TODO"); + return 0; +} + +int SuccUBusScript::proc17() const { + warning("TODO"); + return 0; +} + +int SuccUBusScript::proc18() const { + warning("TODO"); + return 0; +} + +int SuccUBusScript::proc21(int v) { + warning("TODO"); + return 0; +} + +int SuccUBusScript::proc23() const { + warning("TODO"); + return 0; +} + +void SuccUBusScript::proc24() { + warning("TODO"); +} + +int SuccUBusScript::proc25() const { + warning("TODO"); + return 0; +} + +void SuccUBusScript::proc26() { +} + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/succubus_script.h b/engines/titanic/true_talk/succubus_script.h new file mode 100644 index 0000000000..595657b8e7 --- /dev/null +++ b/engines/titanic/true_talk/succubus_script.h @@ -0,0 +1,53 @@ +/* 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_SUCCUBUS_SCRIPT_H +#define TITANIC_SUCCUBUS_SCRIPT_H + +#include "titanic/true_talk/tt_named_script.h" + +namespace Titanic { + +class SuccUBusScript : public TTNamedScript { +private: + int _field2D0; +public: + SuccUBusScript(int val1, const char *charClass, int v2, + const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : + TTNamedScript(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7), + _field2D0(0) {} + + virtual int proc6() const; + virtual void proc7(int v1, int v2); + virtual int proc10() const; + virtual int proc17() const; + virtual int proc18() const; + virtual int proc21(int v); + virtual int proc23() const; + virtual void proc24(); + virtual int proc25() const; + virtual void proc26(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_SUCCUBUS_SCRIPT_H */ diff --git a/engines/titanic/true_talk/title_engine.cpp b/engines/titanic/true_talk/title_engine.cpp new file mode 100644 index 0000000000..1369af6a5c --- /dev/null +++ b/engines/titanic/true_talk/title_engine.cpp @@ -0,0 +1,27 @@ +/* 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 "titanic/true_talk/title_engine.h" + +namespace Titanic { + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/title_engine.h b/engines/titanic/true_talk/title_engine.h new file mode 100644 index 0000000000..c854704cdc --- /dev/null +++ b/engines/titanic/true_talk/title_engine.h @@ -0,0 +1,33 @@ +/* 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_TITLE_ENGINE_H +#define TITANIC_TITLE_ENGINE_H + +namespace Titanic { + +class CTitleEngine { +}; + +} // End of namespace Titanic + +#endif /* TITANIC_TITLE_ENGINE_H */ diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp index aeaa677371..d48a4d3b3d 100644 --- a/engines/titanic/true_talk/true_talk_manager.cpp +++ b/engines/titanic/true_talk/true_talk_manager.cpp @@ -36,7 +36,8 @@ int CTrueTalkManager::_v9; bool CTrueTalkManager::_v10; int CTrueTalkManager::_v11[41]; -CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : _gameManager(owner) { +CTrueTalkManager::CTrueTalkManager(CGameManager *owner) : + _gameManager(owner), _scripts(&_titleEngine) { } void CTrueTalkManager::save(SimpleFile *file) const { @@ -74,4 +75,40 @@ void CTrueTalkManager::loadStatics(SimpleFile *file) { } } +void CTrueTalkManager::setFlags(int index, int val) { + switch (index) { + case 1: + if (val >= 1 && val <= 3) + _v3 = val; + break; + + case 2: + _v4 = !val; + break; + + case 3: + _v5 = val != 0; + break; + + case 4: + if (val >= 0 && val <= 3) + _v6 = val; + break; + + case 5: + _v7 = val; + break; + + case 6: + _v8 = val != 0; + break; + + default: + if (index < 41) + _v11[index] = val; + break; + } +} + + } // End of namespace Titanic diff --git a/engines/titanic/true_talk/true_talk_manager.h b/engines/titanic/true_talk/true_talk_manager.h index b61bc3d6ad..7bf0f5f331 100644 --- a/engines/titanic/true_talk/true_talk_manager.h +++ b/engines/titanic/true_talk/true_talk_manager.h @@ -24,6 +24,7 @@ #define TITANIC_TRUE_TALK_MANAGER_H #include "titanic/simple_file.h" +#include "titanic/true_talk/title_engine.h" #include "titanic/true_talk/tt_scripts.h" namespace Titanic { @@ -31,6 +32,10 @@ namespace Titanic { class CGameManager; class CTrueTalkManager { +private: + CGameManager *_gameManager; + CTitleEngine _titleEngine; + TTScripts _scripts; private: void loadStatics(SimpleFile *file); public: @@ -45,9 +50,8 @@ public: static int _v9; static bool _v10; static int _v11[41]; -public: - CGameManager *_gameManager; - TTScripts _scripts; + + static void setFlags(int index, int val); public: CTrueTalkManager(CGameManager *owner); diff --git a/engines/titanic/true_talk/tt_named_script.cpp b/engines/titanic/true_talk/tt_named_script.cpp index 6f12012b10..8d225f1b28 100644 --- a/engines/titanic/true_talk/tt_named_script.cpp +++ b/engines/titanic/true_talk/tt_named_script.cpp @@ -22,6 +22,7 @@ #include "common/textconsole.h" #include "titanic/true_talk/tt_named_script.h" +#include "titanic/true_talk/true_talk_manager.h" namespace Titanic { @@ -36,7 +37,23 @@ TTNamedScriptBase::TTNamedScriptBase(int val1, const char *charClass, int v2, TTNamedScript::TTNamedScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7) : TTNamedScriptBase(val1, charClass, v2, charName, v3, val2, v4, v5, v6, v7) { + CTrueTalkManager::_v2 = 0; + Common::fill(&_array[0], &_array[147], 0); + if (!CTrueTalkManager::_v10) { + Common::fill(&CTrueTalkManager::_v11[0], &CTrueTalkManager::_v11[41], 0); + CTrueTalkManager::_v10 = true; + } + + resetFlags(); +} + +void TTNamedScript::resetFlags() { + Common::fill(&_array[26], &_array[146], 0); +} + +void TTNamedScript::randomizeFlags() { + warning("TODO"); } void TTNamedScript::proc4(int v) { diff --git a/engines/titanic/true_talk/tt_named_script.h b/engines/titanic/true_talk/tt_named_script.h index cdff44888d..b747cee498 100644 --- a/engines/titanic/true_talk/tt_named_script.h +++ b/engines/titanic/true_talk/tt_named_script.h @@ -39,16 +39,17 @@ public: const char *charName, int v3, int val2, int v4, int v5, int v6, int v7); - virtual void proc6() = 0; - virtual void proc7() = 0; - virtual void proc8() = 0; - virtual void proc9() = 0; - virtual void proc10() = 0; - virtual void proc11() = 0; - virtual void proc12() = 0; + virtual int proc6() const = 0; + virtual void proc7(int v1, int v2) = 0; + virtual int proc8() const = 0; + virtual int proc9() const = 0; + virtual int proc10() const = 0; + virtual int proc11() const = 0; + virtual int proc12() const = 0; }; + class TTNamedScript : public TTNamedScriptBase { -private: +protected: int _field5C; int _field60; int _field64; @@ -59,6 +60,11 @@ private: int _field78; int _field7C; int _field80; + int _array[147]; +protected: + void resetFlags(); + + void randomizeFlags(); public: TTNamedScript(int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, diff --git a/engines/titanic/true_talk/tt_scripts.cpp b/engines/titanic/true_talk/tt_scripts.cpp index 52368adc7f..981fe66933 100644 --- a/engines/titanic/true_talk/tt_scripts.cpp +++ b/engines/titanic/true_talk/tt_scripts.cpp @@ -21,8 +21,42 @@ */ #include "titanic/true_talk/tt_scripts.h" +#include "titanic/true_talk/title_engine.h" +#include "titanic/true_talk/barbot_script.h" +#include "titanic/true_talk/bellbot_script.h" +#include "titanic/true_talk/deskbot_script.h" +#include "titanic/true_talk/doorbot_script.h" +#include "titanic/true_talk/liftbot_script.h" +#include "titanic/true_talk/maitred_script.h" +#include "titanic/true_talk/parrot_script.h" +#include "titanic/true_talk/succubus_script.h" namespace Titanic { +TTScripts::TTScripts(CTitleEngine *titleEngine) : + _titleEngine(titleEngine), _field24(0), _field28(0) { + // Load unnamed scripts + for (int scriptNum = 100; scriptNum < 133; ++scriptNum) + addScript(new TTUnnamedScript(scriptNum)); + + // Load named scripts + addScript(new DoorbotScript(104, "Doorbot", 0, "Fentible", 11, 1, -1, -1, -1, 0)); + addScript(new BellbotScript(101, "Bellbot", 0, "Krage", 8, 1)); + addScript(new LiftbotScript(105, "LiftBot", 0, "Nobby", 11, 1, -1, -1, -1, 0)); + addScript(new DeskbotScript(103, "DeskBot", 0, "Marsinta", 11, 2)); + addScript(new BarbotScript(100, "Barbot", 0, "Fortillian", 9, 1, -1, -1, -1, 0)); + addScript(new ParrotScript(107, "Parrot", 0, "The Parrot", 5, 1, -1, -1, -1, 0)); + addScript(new MaitreDScript(112, "MaitreDBot", 0, "Dastrogaaar", 8, 1)); + addScript(new SuccUBusScript(111, "Succubus", 0, "Shorbert", 9, 1, -1, -1, -1, 0)); +} + +void TTScripts::addScript(TTNamedScript *script) { + script->proc13(); + _namedScripts.push_back(new TTNamedScriptListItem(script)); +} + +void TTScripts::addScript(TTUnnamedScript *script) { + _unnamedScripts.push_back(new TTUnnamedScriptListItem(script)); +} } // End of namespace Titanic 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 diff --git a/engines/titanic/true_talk/tt_string.h b/engines/titanic/true_talk/tt_string.h index 8f42e62783..cf940a4d32 100644 --- a/engines/titanic/true_talk/tt_string.h +++ b/engines/titanic/true_talk/tt_string.h @@ -33,7 +33,7 @@ public: public: TTString() : CString(), _status(0) {} TTString(const char *str) : CString(str), _status(0) {} - ~TTString(); + virtual ~TTString() {} bool isValid() const { return !_status; } }; -- cgit v1.2.3