diff options
author | Paul Gilbert | 2016-02-25 21:42:10 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-02-25 21:42:10 -0500 |
commit | 06ce0dbfddb016dc18ac38bbd938b8b5c71f454a (patch) | |
tree | b90ce5808505b7aab38f90c9b4c8c3f6176f2502 | |
parent | 4bd8ae116624802dd9e6e371bae8599523aa19b2 (diff) | |
download | scummvm-rg350-06ce0dbfddb016dc18ac38bbd938b8b5c71f454a.tar.gz scummvm-rg350-06ce0dbfddb016dc18ac38bbd938b8b5c71f454a.tar.bz2 scummvm-rg350-06ce0dbfddb016dc18ac38bbd938b8b5c71f454a.zip |
TITANIC: Implement TrueTalk NPC classes
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 21 | ||||
-rw-r--r-- | engines/titanic/module.mk | 7 | ||||
-rw-r--r-- | engines/titanic/npcs/barbot.cpp | 236 | ||||
-rw-r--r-- | engines/titanic/npcs/barbot.h | 196 | ||||
-rw-r--r-- | engines/titanic/npcs/bellbot.cpp | 44 | ||||
-rw-r--r-- | engines/titanic/npcs/bellbot.h | 54 | ||||
-rw-r--r-- | engines/titanic/npcs/deskbot.cpp | 53 | ||||
-rw-r--r-- | engines/titanic/npcs/deskbot.h | 58 | ||||
-rw-r--r-- | engines/titanic/npcs/doorbot.cpp | 63 | ||||
-rw-r--r-- | engines/titanic/npcs/doorbot.h | 60 | ||||
-rw-r--r-- | engines/titanic/npcs/liftbot.cpp | 51 | ||||
-rw-r--r-- | engines/titanic/npcs/liftbot.h | 57 | ||||
-rw-r--r-- | engines/titanic/npcs/maitre_d.cpp | 68 | ||||
-rw-r--r-- | engines/titanic/npcs/maitre_d.h | 64 | ||||
-rw-r--r-- | engines/titanic/npcs/parrot.cpp | 143 | ||||
-rw-r--r-- | engines/titanic/npcs/parrot.h | 115 |
16 files changed, 1290 insertions, 0 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index ec0f2937ec..8f7c38692f 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -36,6 +36,13 @@ #include "titanic/game/room_item.h" #include "titanic/game/service_elevator_door.h" #include "titanic/game/sub_glass.h" +#include "titanic/npcs/barbot.h" +#include "titanic/npcs/bellbot.h" +#include "titanic/npcs/deskbot.h" +#include "titanic/npcs/doorbot.h" +#include "titanic/npcs/liftbot.h" +#include "titanic/npcs/maitre_d.h" +#include "titanic/npcs/parrot.h" #include "titanic/npcs/succubus.h" namespace Titanic { @@ -47,13 +54,20 @@ Common::HashMap<Common::String, CSaveableObject::CreateFunction> * #define ADDFN(T) (*_classList)[#T] = Function##T DEFFN(CAnnounce); +DEFFN(CBarbot); +DEFFN(CBellBot); +DEFFN(CDeskbot); +DEFFN(CDoorbot); DEFFN(CFileItem); DEFFN(CFileListItem); +DEFFN(CLiftBot); DEFFN(CLinkItem); +DEFFN(CMaitreD); DEFFN(CMessageTarget); DEFFN(CMovieClip); DEFFN(CMovieClipList); DEFFN(CNodeItem); +DEFFN(CParrot); DEFFN(CPETPosition); DEFFN(CProjectItem); DEFFN(CRoomItem); @@ -66,13 +80,20 @@ DEFFN(CViewItem); void CSaveableObject::initClassList() { _classList = new Common::HashMap<Common::String, CreateFunction>(); ADDFN(CAnnounce); + ADDFN(CBarbot); + ADDFN(CBellBot); + ADDFN(CDeskbot); + ADDFN(CDoorbot); ADDFN(CFileItem); ADDFN(CFileListItem); + ADDFN(CLiftBot); ADDFN(CLinkItem); + ADDFN(CMaitreD); ADDFN(CMessageTarget); ADDFN(CMovieClip); ADDFN(CMovieClipList); ADDFN(CNodeItem); + ADDFN(CParrot); ADDFN(CPETPosition); ADDFN(CProjectItem); ADDFN(CRoomItem); diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 7ae284add1..1d94289315 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -37,7 +37,14 @@ MODULE_OBJS := \ game/room_item.o \ game/service_elevator_door.o \ game/sub_glass.o \ + npcs/barbot.o \ + npcs/bellbot.o \ npcs/character.o \ + npcs/deskbot.o \ + npcs/doorbot.o \ + npcs/liftbot.o \ + npcs/maitre_d.o \ + npcs/parrot.o \ npcs/succubus.o \ npcs/true_talk_npc.o diff --git a/engines/titanic/npcs/barbot.cpp b/engines/titanic/npcs/barbot.cpp new file mode 100644 index 0000000000..a460bdb672 --- /dev/null +++ b/engines/titanic/npcs/barbot.cpp @@ -0,0 +1,236 @@ +/* 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/npcs/barbot.h" + +namespace Titanic { + +int CBarbot::_v0; + +CBarbot::CBarbot() : CTrueTalkNPC() { + _field108 = 0; + _field10C = 0; + _field110 = 0; + _field114 = 0; + _field118 = 0; + _field11C = 0; + _field120 = 0; + _field124 = 0; + _field128 = 0; + _field12C = 0; + _field130 = 0; + _field134 = 0; + _field138 = 0; + _field13C = -1; + _field140 = 30; + _field144 = -1; + _field148 = -1; + _field14C = 0; + _field150 = 0; + _field154 = 0; + _field158 = -1; + _field15C = 0; + _field160 = 0; + _field164 = 558; + _field168 = 585; + _field16C = 659; + _field170 = 692; + _field174 = 802; + _field178 = 816; + _field17C = 1941; + _field180 = 1977; + _field184 = 1901; + _field188 = 1941; + _field18C = 810; + _field190 = 816; + _field194 = 857; + _field198 = 865; + _field19C = 842; + _field1A0 = 857; + _field1A4 = 821; + _field1A8 = 842; + _field1AC = 682; + _field1B0 = 692; + _field1B4 = 1977; + _field1B8 = 2018; + _field1BC = 2140; + _field1C0 = 2170; + _field1C4 = 2101; + _field1C8 = 2139; + _field1CC = 2018; + _field1D0 = 2099; + _field1D4 = 1902; + _field1D8 = 2015; + _field1E0 = 1811; + _field1E4 = 1901; + _field1E8 = 1810; + _field1EC = 1703; + _field1F0 = 1750; + _field1F4 = 1681; + _field1F8 = 1702; + _field1FC = 1642; + + _field200 = 1702; + _field204 = 1571; + _field208 = 1641; + _field20C = 1499; + _field210 = 1570; + _field214 = 1403; + _field218 = 1463; + _field21C = 1464; + _field220 = 1499; + _field224 = 1288; + _field228 = 1295; + _field22C = 1266; + _field230 = 1287; + _field234 = 1245; + _field238 = 1265; + _field23C = 1208; + _field240 = 1244; + _field244 = 1171; + _field248 = 1207; + _field24C = 1120; + _field250 = 1170; + _field254 = 1092; + _field258 = 1120; + _field25C = 1092; + _field260 = 1092; + _field264 = 1044; + _field268 = 1091; + _field26C = 1011; + _field270 = 1043; + _field274 = 1001; + _field278 = 1010; + _field27C = 985; + _field280 = 1001; + _field284 = 927; + _field288 = 984; + _field28C = 912; + _field290 = 926; + _field294 = 898; + _field298 = 906; + _field29C = 802; + _field2A0 = 896; + _field2A4 = 865; + _field2A8 = 896; + _field2AC = 842; + _field2B0 = 865; + _field2B4 = 816; + _field2B8 = 842; + _field2BC = 802; + _field2C0 = 842; + _field2C4 = 740; + _field2C8 = 740; + _field2CC = 740; + _field2D0 = 692; + _field2D4 = 610; + _field2D8 = 558; + _field2E0 = 610; + _field2E4 = 500; + _field2E8 = 558; + _field2EC = 467; + _field2F0 = 500; + _field2F4 = 421; + _field2F8 = 466; + _field2FC = 349; + _field300 = 306; + _field304 = 306; + _field308 = 348; + _field30C = 305; + _field310 = 306; + _field314 = 281; + _field318 = 305; + _field31C = 202; + _field320 = 281; + _field324 = 182; + _field328 = 202; + _field32C = 165; + _field330 = 182; + _field334 = 96; + _field338 = 165; + _field33C = 0; + _field340 = 95; +} + +void CBarbot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_field10C, indent); + file->writeNumberLine(_field110, indent); + file->writeNumberLine(_field114, indent); + file->writeNumberLine(_field118, indent); + file->writeNumberLine(_field11C, indent); + file->writeNumberLine(_field120, indent); + file->writeNumberLine(_field124, indent); + file->writeNumberLine(_field128, indent); + + file->writeNumberLine(_v0, indent); + file->writeNumberLine(_field12C, indent); + file->writeNumberLine(_field130, indent); + file->writeNumberLine(_field134, indent); + file->writeNumberLine(_field138, indent); + file->writeNumberLine(_field13C, indent); + file->writeNumberLine(_field140, indent); + file->writeNumberLine(_field144, indent); + file->writeNumberLine(_field148, indent); + file->writeNumberLine(_field14C, indent); + file->writeNumberLine(_field150, indent); + file->writeNumberLine(_field154, indent); + file->writeNumberLine(_field158, indent); + file->writeNumberLine(_field15C, indent); + file->writeNumberLine(_field160, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CBarbot::load(SimpleFile *file) { + file->readNumber(); + _field108 = file->readNumber(); + _field10C = file->readNumber(); + _field110 = file->readNumber(); + _field114 = file->readNumber(); + _field118 = file->readNumber(); + _field11C = file->readNumber(); + _field120 = file->readNumber(); + _field124 = file->readNumber(); + _field128 = file->readNumber(); + + _v0 = file->readNumber(); + _field12C = file->readNumber(); + _field130 = file->readNumber(); + _field134 = file->readNumber(); + _field138 = file->readNumber(); + _field13C = file->readNumber(); + _field140 = file->readNumber(); + _field144 = file->readNumber(); + _field148 = file->readNumber(); + _field14C = file->readNumber(); + _field150 = file->readNumber(); + _field154 = file->readNumber(); + _field158 = file->readNumber(); + _field15C = file->readNumber(); + _field160 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/barbot.h b/engines/titanic/npcs/barbot.h new file mode 100644 index 0000000000..d14d5a2d1d --- /dev/null +++ b/engines/titanic/npcs/barbot.h @@ -0,0 +1,196 @@ +/* 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_H +#define TITANIC_BARBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CBarbot : public CTrueTalkNPC { +private: + static int _v0; +private: + int _field108; + int _field10C; + int _field110; + int _field114; + int _field118; + int _field11C; + int _field120; + int _field124; + int _field128; + int _field12C; + int _field130; + int _field134; + int _field138; + int _field13C; + int _field140; + int _field144; + int _field148; + int _field14C; + int _field150; + int _field154; + int _field158; + int _field15C; + int _field160; + int _field164; + int _field168; + int _field16C; + int _field170; + int _field174; + int _field178; + int _field17C; + int _field180; + int _field184; + int _field188; + int _field18C; + int _field190; + int _field194; + int _field198; + int _field19C; + int _field1A0; + int _field1A4; + int _field1A8; + int _field1AC; + int _field1B0; + int _field1B4; + int _field1B8; + int _field1BC; + int _field1C0; + int _field1C4; + int _field1C8; + int _field1CC; + int _field1D0; + int _field1D4; + int _field1D8; + int _field1E0; + int _field1E4; + int _field1E8; + int _field1EC; + int _field1F0; + int _field1F4; + int _field1F8; + int _field1FC; + int _field200; + int _field204; + int _field208; + int _field20C; + int _field210; + int _field214; + int _field218; + int _field21C; + int _field220; + int _field224; + int _field228; + int _field22C; + int _field230; + int _field234; + int _field238; + int _field23C; + int _field240; + int _field244; + int _field248; + int _field24C; + int _field250; + int _field254; + int _field258; + int _field25C; + int _field260; + int _field264; + int _field268; + int _field26C; + int _field270; + int _field274; + int _field278; + int _field27C; + int _field280; + int _field284; + int _field288; + int _field28C; + int _field290; + int _field294; + int _field298; + int _field29C; + int _field2A0; + int _field2A4; + int _field2A8; + int _field2AC; + int _field2B0; + int _field2B4; + int _field2B8; + int _field2BC; + int _field2C0; + int _field2C4; + int _field2C8; + int _field2CC; + int _field2D0; + int _field2D4; + int _field2D8; + int _field2E0; + int _field2E4; + int _field2E8; + int _field2EC; + int _field2F0; + int _field2F4; + int _field2F8; + int _field2FC; + int _field300; + int _field304; + int _field308; + int _field30C; + int _field310; + int _field314; + int _field318; + int _field31C; + int _field320; + int _field324; + int _field328; + int _field32C; + int _field330; + int _field334; + int _field338; + int _field33C; + int _field340; +public: + CBarbot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBarbot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BARBOT_H */ diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp new file mode 100644 index 0000000000..48747228f8 --- /dev/null +++ b/engines/titanic/npcs/bellbot.cpp @@ -0,0 +1,44 @@ +/* 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/npcs/bellbot.h" + +namespace Titanic { + +CBellBot::CBellBot() : CTrueTalkNPC(), _field108(0) { +} + +void CBellBot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field108, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CBellBot::load(SimpleFile *file) { + file->readNumber(); + _field108 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/bellbot.h b/engines/titanic/npcs/bellbot.h new file mode 100644 index 0000000000..b47daa1404 --- /dev/null +++ b/engines/titanic/npcs/bellbot.h @@ -0,0 +1,54 @@ +/* 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_H +#define TITANIC_BELLBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CBellBot : public CTrueTalkNPC { +private: + int _field108; +public: + CBellBot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBellBot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_BELLBOT_H */ diff --git a/engines/titanic/npcs/deskbot.cpp b/engines/titanic/npcs/deskbot.cpp new file mode 100644 index 0000000000..c4745ae8d6 --- /dev/null +++ b/engines/titanic/npcs/deskbot.cpp @@ -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. + * + */ + +#include "titanic/npcs/deskbot.h" + +namespace Titanic { + +int CDeskbot::_v1; +int CDeskbot::_v2; + +CDeskbot::CDeskbot() : CTrueTalkNPC(), _field108(0), _field10C(0) { +} + +void CDeskbot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_field10C, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CDeskbot::load(SimpleFile *file) { + file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + _field108 = file->readNumber(); + _field10C = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h new file mode 100644 index 0000000000..2826b01660 --- /dev/null +++ b/engines/titanic/npcs/deskbot.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_DESKBOT_H +#define TITANIC_DESKBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CDeskbot : public CTrueTalkNPC { +private: + static int _v1; + static int _v2; +private: + int _field108; + int _field10C; +public: + CDeskbot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CDeskbot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_DESKBOT_H */ diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp new file mode 100644 index 0000000000..17db94f2d7 --- /dev/null +++ b/engines/titanic/npcs/doorbot.cpp @@ -0,0 +1,63 @@ +/* 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/npcs/doorbot.h" + +namespace Titanic { + +int CDoorbot::_v1; +int CDoorbot::_v2; + +CDoorbot::CDoorbot() : CTrueTalkNPC() { + _field108 = 0; + _field10C = 0; + _field110 = 0; + _field114 = 0; +} + +void CDoorbot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_field10C, indent); + file->writeNumberLine(_field110, indent); + file->writeNumberLine(_field114, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CDoorbot::load(SimpleFile *file) { + file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + + _field108 = file->readNumber(); + _field10C = file->readNumber(); + _field110 = file->readNumber(); + _field114 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/doorbot.h b/engines/titanic/npcs/doorbot.h new file mode 100644 index 0000000000..e3ec7e83a4 --- /dev/null +++ b/engines/titanic/npcs/doorbot.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_DOORBOT_H +#define TITANIC_DOORBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CDoorbot : public CTrueTalkNPC { +private: + static int _v1; + static int _v2; +private: + int _field108; + int _field10C; + int _field110; + int _field114; +public: + CDoorbot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CDoorbot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_DOORBOT_H */ diff --git a/engines/titanic/npcs/liftbot.cpp b/engines/titanic/npcs/liftbot.cpp new file mode 100644 index 0000000000..3a0040ddca --- /dev/null +++ b/engines/titanic/npcs/liftbot.cpp @@ -0,0 +1,51 @@ +/* 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/npcs/liftbot.h" + +namespace Titanic { + +int CLiftBot::_v1; +int CLiftBot::_v2; + +CLiftBot::CLiftBot() : CTrueTalkNPC(), _field108(1) { +} + +void CLiftBot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_v2, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CLiftBot::load(SimpleFile *file) { + file->readNumber(); + _v1 = file->readNumber(); + _field108 = file->readNumber(); + _v2 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/liftbot.h b/engines/titanic/npcs/liftbot.h new file mode 100644 index 0000000000..f18fd7f32d --- /dev/null +++ b/engines/titanic/npcs/liftbot.h @@ -0,0 +1,57 @@ +/* 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_H +#define TITANIC_LIFTBOT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CLiftBot : public CTrueTalkNPC { +private: + static int _v1; + static int _v2; +private: + int _field108; +public: + CLiftBot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CLiftBot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_LIFTBOT_H */ diff --git a/engines/titanic/npcs/maitre_d.cpp b/engines/titanic/npcs/maitre_d.cpp new file mode 100644 index 0000000000..d100a0b301 --- /dev/null +++ b/engines/titanic/npcs/maitre_d.cpp @@ -0,0 +1,68 @@ +/* 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/npcs/maitre_d.h" + +namespace Titanic { + +int CMaitreD::_v1; + +CMaitreD::CMaitreD() : CTrueTalkNPC(), + _string2("z#40.wav"), _string3("z#40.wav"), _field108(0), _field118(1), + _field11C(0), _field12C(0), _field130(1), _field134(0), _field138(0) { +} + +void CMaitreD::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field108, indent); + file->writeQuotedLine(_string2, indent); + file->writeNumberLine(_field118, indent); + file->writeNumberLine(_field11C, indent); + file->writeQuotedLine(_string3, indent); + file->writeNumberLine(_field12C, indent); + file->writeNumberLine(_field130, indent); + + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_field134, indent); + file->writeNumberLine(_field138, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CMaitreD::load(SimpleFile *file) { + file->readNumber(); + _field108 = file->readNumber(); + _string2 = file->readString(); + _field118 = file->readNumber(); + _field11C = file->readNumber(); + _string3 = file->readString(); + _field12C = file->readNumber(); + _field130 = file->readNumber(); + + _v1 = file->readNumber(); + _field134 = file->readNumber(); + _field138 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/maitre_d.h b/engines/titanic/npcs/maitre_d.h new file mode 100644 index 0000000000..f44d6eeec0 --- /dev/null +++ b/engines/titanic/npcs/maitre_d.h @@ -0,0 +1,64 @@ +/* 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_H +#define TITANIC_MAITRED_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CMaitreD : public CTrueTalkNPC { +private: + static int _v1; +private: + int _field108; + CString _string2; + int _field118; + int _field11C; + CString _string3; + int _field12C; + int _field130; + int _field134; + int _field138; +public: + CMaitreD(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMaitreD"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_MAITRED_H */ diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp new file mode 100644 index 0000000000..c350079f76 --- /dev/null +++ b/engines/titanic/npcs/parrot.cpp @@ -0,0 +1,143 @@ +/* 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/npcs/parrot.h" + +namespace Titanic { + +int CParrot::_v1; +int CParrot::_v2; +int CParrot::_v3; +int CParrot::_v4; +int CParrot::_v5; + +CParrot::CParrot() : CTrueTalkNPC() { + _field108 = 0; + _string2 = "CarryParrot"; + _field118 = 1; + _field11C = 25; + _field120 = 0; + _field124 = 73; + _field128 = 58; + _field12C = 0; + _field130 = 0; + _field134 = 0; + _field138 = 851; + _field13C = 851; + _field140 = 265; + _field144 = 274; + _field148 = 726; + _field14C = 730; + _field150 = 510; + _field154 = 570; + _field158 = 569; + _field15C = 689; + _field160 = 690; + _field164 = 725; + _field168 = 375; + _field16C = 508; + _field170 = 363; + _field174 = 375; + _field178 = 303; + _field17C = 313; + _field180 = 279; + _field184 = 302; + _field188 = 260; + _field18C = 264; + _field190 = 315; + _field194 = 327; + _field198 = 330; + _field19C = 360; + _field1A0 = 175; + _field1A4 = 259; + _field1A8 = 175; + _field1AC = 175; + _field1B0 = 162; + _field1B4 = 175; + _field1B8 = 150; + _field1BC = 162; + _field1C0 = 135; + _field1C4 = 150; + _field1C8 = 95; + _field1CC = 135; + _field1D0 = 76; + _field1D4 = 95; + _field1D8 = 55; + _field1DC = 76; + _field1E0 = 30; + _field1E4 = 55; + _field1E8 = 0; + _field1EC = 30; + + _string1 = "z454.dlg"; + _fieldD4 = 0x13880; +} + +void CParrot::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldD4, indent); + + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + file->writeNumberLine(_v3, indent); + + file->writeQuotedLine(_string2, indent); + file->writeNumberLine(_field118, indent); + file->writeNumberLine(_field11C, indent); + file->writeNumberLine(_field120, indent); + file->writeNumberLine(_field124, indent); + file->writeNumberLine(_field128, indent); + file->writeNumberLine(_field12C, indent); + file->writeNumberLine(_field130, indent); + file->writeNumberLine(_v4, indent); + file->writeNumberLine(_v5, indent); + + CTrueTalkNPC::save(file, indent); +} + +void CParrot::load(SimpleFile *file) { + file->readNumber(); + _fieldD4 = file->readNumber(); + + _string1 = file->readString(); + _field108 = file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + _v3 = file->readNumber(); + + _string2 = file->readString(); + _field118 = file->readNumber(); + _field11C = file->readNumber(); + _field120 = file->readNumber(); + _field124 = file->readNumber(); + _field128 = file->readNumber(); + _field12C = file->readNumber(); + _field130 = file->readNumber(); + _v4 = file->readNumber(); + _v5 = file->readNumber(); + + CTrueTalkNPC::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/npcs/parrot.h b/engines/titanic/npcs/parrot.h new file mode 100644 index 0000000000..991066e3b5 --- /dev/null +++ b/engines/titanic/npcs/parrot.h @@ -0,0 +1,115 @@ +/* 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_H +#define TITANIC_PARROT_H + +#include "titanic/npcs/true_talk_npc.h" + +namespace Titanic { + +class CParrot : public CTrueTalkNPC { +private: + static int _v1; + static int _v2; + static int _v3; + static int _v4; + static int _v5; +private: + int _field108; + CString _string2; + int _field118; + int _field11C; + int _field120; + int _field124; + int _field128; + int _field12C; + int _field130; + int _field134; + int _field138; + int _field13C; + int _field140; + int _field144; + int _field148; + int _field14C; + int _field150; + int _field154; + int _field158; + int _field15C; + int _field160; + int _field164; + int _field168; + int _field16C; + int _field170; + int _field174; + int _field178; + int _field17C; + int _field180; + int _field184; + int _field188; + int _field18C; + int _field190; + int _field194; + int _field198; + int _field19C; + int _field1A0; + int _field1A4; + int _field1A8; + int _field1AC; + int _field1B0; + int _field1B4; + int _field1B8; + int _field1BC; + int _field1C0; + int _field1C4; + int _field1C8; + int _field1CC; + int _field1D0; + int _field1D4; + int _field1D8; + int _field1DC; + int _field1E0; + int _field1E4; + int _field1E8; + int _field1EC; +public: + CParrot(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CParrot"; } + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PARROT_H */ |