From 3ae4e63c80cda635f941370e72536988bde67698 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 2 Mar 2016 22:05:25 -0500 Subject: TITANIC: Implemented more saveable classes --- engines/titanic/game/broken_pell_base.cpp | 7 +++ engines/titanic/game/broken_pell_base.h | 5 +- engines/titanic/game/broken_pellerator.cpp | 47 +++++++++++++++++ engines/titanic/game/broken_pellerator.h | 55 ++++++++++++++++++++ engines/titanic/game/broken_pellerator_froz.cpp | 47 +++++++++++++++++ engines/titanic/game/broken_pellerator_froz.h | 55 ++++++++++++++++++++ engines/titanic/game/gondolier_base.cpp | 33 ++++++++++++ engines/titanic/game/gondolier_base.h | 11 ++++ engines/titanic/game/gondolier_mixer.cpp | 59 +++++++++++++++++++++ engines/titanic/game/gondolier_mixer.h | 60 ++++++++++++++++++++++ engines/titanic/game/lemon_dispensor.cpp | 10 ++++ engines/titanic/game/lemon_dispensor.h | 6 ++- .../titanic/game/maitred/maitred_arm_holder.cpp | 37 +++++++++++++ engines/titanic/game/maitred/maitred_arm_holder.h | 50 ++++++++++++++++++ engines/titanic/game/maitred/maitred_body.cpp | 39 ++++++++++++++ engines/titanic/game/maitred/maitred_body.h | 54 +++++++++++++++++++ engines/titanic/game/maitred/maitred_legs.cpp | 39 ++++++++++++++ engines/titanic/game/maitred/maitred_legs.h | 54 +++++++++++++++++++ .../titanic/game/maitred/maitred_prod_receptor.cpp | 45 ++++++++++++++++ .../titanic/game/maitred/maitred_prod_receptor.h | 57 ++++++++++++++++++++ engines/titanic/game/maitred_arm_holder.cpp | 37 ------------- engines/titanic/game/maitred_arm_holder.h | 50 ------------------ engines/titanic/game/pickup/pick_up_hose.cpp | 6 +++ engines/titanic/game/pickup/pick_up_hose.h | 2 + engines/titanic/game/service_elevator_door.cpp | 48 ----------------- engines/titanic/game/service_elevator_door.h | 52 ------------------- engines/titanic/game/speech_dispensor.cpp | 16 ++++++ engines/titanic/game/speech_dispensor.h | 9 ++++ 28 files changed, 801 insertions(+), 189 deletions(-) create mode 100644 engines/titanic/game/broken_pellerator.cpp create mode 100644 engines/titanic/game/broken_pellerator.h create mode 100644 engines/titanic/game/broken_pellerator_froz.cpp create mode 100644 engines/titanic/game/broken_pellerator_froz.h create mode 100644 engines/titanic/game/gondolier_mixer.cpp create mode 100644 engines/titanic/game/gondolier_mixer.h create mode 100644 engines/titanic/game/maitred/maitred_arm_holder.cpp create mode 100644 engines/titanic/game/maitred/maitred_arm_holder.h create mode 100644 engines/titanic/game/maitred/maitred_body.cpp create mode 100644 engines/titanic/game/maitred/maitred_body.h create mode 100644 engines/titanic/game/maitred/maitred_legs.cpp create mode 100644 engines/titanic/game/maitred/maitred_legs.h create mode 100644 engines/titanic/game/maitred/maitred_prod_receptor.cpp create mode 100644 engines/titanic/game/maitred/maitred_prod_receptor.h delete mode 100644 engines/titanic/game/maitred_arm_holder.cpp delete mode 100644 engines/titanic/game/maitred_arm_holder.h delete mode 100644 engines/titanic/game/service_elevator_door.cpp delete mode 100644 engines/titanic/game/service_elevator_door.h (limited to 'engines/titanic/game') diff --git a/engines/titanic/game/broken_pell_base.cpp b/engines/titanic/game/broken_pell_base.cpp index 9e2a97462a..2d11e544e2 100644 --- a/engines/titanic/game/broken_pell_base.cpp +++ b/engines/titanic/game/broken_pell_base.cpp @@ -24,14 +24,21 @@ namespace Titanic { +int CBrokenPellBase::_v1; +int CBrokenPellBase::_v2; + void CBrokenPellBase::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); file->writeNumberLine(_fieldE0, indent); CBackground::save(file, indent); } void CBrokenPellBase::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); _fieldE0 = file->readNumber(); CBackground::load(file); } diff --git a/engines/titanic/game/broken_pell_base.h b/engines/titanic/game/broken_pell_base.h index fa53af3c62..8e77501aa5 100644 --- a/engines/titanic/game/broken_pell_base.h +++ b/engines/titanic/game/broken_pell_base.h @@ -28,7 +28,10 @@ namespace Titanic { class CBrokenPellBase : public CBackground { -public: +private: + static int _v1; + static int _v2; + int _fieldE0; public: CBrokenPellBase() : CBackground(), _fieldE0(0) {} diff --git a/engines/titanic/game/broken_pellerator.cpp b/engines/titanic/game/broken_pellerator.cpp new file mode 100644 index 0000000000..ea167677bf --- /dev/null +++ b/engines/titanic/game/broken_pellerator.cpp @@ -0,0 +1,47 @@ +/* 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/game/broken_pellerator.h" + +namespace Titanic { + +void CBrokenPellerator::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + + CBrokenPellBase::save(file, indent); +} + +void CBrokenPellerator::load(SimpleFile *file) { + file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); + + CBrokenPellBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/broken_pellerator.h b/engines/titanic/game/broken_pellerator.h new file mode 100644 index 0000000000..71bae32e17 --- /dev/null +++ b/engines/titanic/game/broken_pellerator.h @@ -0,0 +1,55 @@ +/* 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_BROKEN_PELLERATOR_H +#define TITANIC_BROKEN_PELLERATOR_H + +#include "titanic/game/broken_pell_base.h" + +namespace Titanic { + +class CBrokenPellerator : public CBrokenPellBase { +private: + CString _string2; + CString _string3; + CString _string4; + CString _string5; +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBrokenPellerator"; } + + /** + * 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_BROKEN_PELLERATOR_H */ diff --git a/engines/titanic/game/broken_pellerator_froz.cpp b/engines/titanic/game/broken_pellerator_froz.cpp new file mode 100644 index 0000000000..6b077d27ec --- /dev/null +++ b/engines/titanic/game/broken_pellerator_froz.cpp @@ -0,0 +1,47 @@ +/* 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/game/broken_pellerator_froz.h" + +namespace Titanic { + +void CBrokenPelleratorFroz::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + + CBrokenPellBase::save(file, indent); +} + +void CBrokenPelleratorFroz::load(SimpleFile *file) { + file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _string4 = file->readString(); + _string5 = file->readString(); + + CBrokenPellBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/broken_pellerator_froz.h b/engines/titanic/game/broken_pellerator_froz.h new file mode 100644 index 0000000000..1fded7c09f --- /dev/null +++ b/engines/titanic/game/broken_pellerator_froz.h @@ -0,0 +1,55 @@ +/* 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_BROKEN_PELLERATOR_FROZ_H +#define TITANIC_BROKEN_PELLERATOR_FROZ_H + +#include "titanic/game/broken_pell_base.h" + +namespace Titanic { + +class CBrokenPelleratorFroz : public CBrokenPellBase { +private: + CString _string2; + CString _string3; + CString _string4; + CString _string5; +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CBrokenPelleratorFroz"; } + + /** + * 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_BROKEN_PELLERATOR_FROZ_H */ diff --git a/engines/titanic/game/gondolier_base.cpp b/engines/titanic/game/gondolier_base.cpp index 32f434e3f2..59c9b5cd0c 100644 --- a/engines/titanic/game/gondolier_base.cpp +++ b/engines/titanic/game/gondolier_base.cpp @@ -24,13 +24,46 @@ namespace Titanic { +int CGondolierBase::_v1; +int CGondolierBase::_v2; +int CGondolierBase::_v3; +int CGondolierBase::_v4; +int CGondolierBase::_v5; +int CGondolierBase::_v6; +int CGondolierBase::_v7; +int CGondolierBase::_v8; +int CGondolierBase::_v9; +int CGondolierBase::_v10; + void CGondolierBase::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + file->writeNumberLine(_v3, indent); + file->writeNumberLine(_v4, indent); + file->writeNumberLine(_v5, indent); + file->writeNumberLine(_v6, indent); + file->writeNumberLine(_v7, indent); + file->writeNumberLine(_v8, indent); + file->writeNumberLine(_v9, indent); + file->writeNumberLine(_v10, indent); + CGameObject::save(file, indent); } void CGondolierBase::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + _v3 = file->readNumber(); + _v4 = file->readNumber(); + _v5 = file->readNumber(); + _v6 = file->readNumber(); + _v7 = file->readNumber(); + _v8 = file->readNumber(); + _v9 = file->readNumber(); + _v10 = file->readNumber(); + CGameObject::load(file); } diff --git a/engines/titanic/game/gondolier_base.h b/engines/titanic/game/gondolier_base.h index 99e0c99572..3f0cede70d 100644 --- a/engines/titanic/game/gondolier_base.h +++ b/engines/titanic/game/gondolier_base.h @@ -28,6 +28,17 @@ namespace Titanic { class CGondolierBase : public CGameObject { +private: + static int _v1; + static int _v2; + static int _v3; + static int _v4; + static int _v5; + static int _v6; + static int _v7; + static int _v8; + static int _v9; + static int _v10; public: /** * Return the class name diff --git a/engines/titanic/game/gondolier_mixer.cpp b/engines/titanic/game/gondolier_mixer.cpp new file mode 100644 index 0000000000..33cc883bb0 --- /dev/null +++ b/engines/titanic/game/gondolier_mixer.cpp @@ -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. + * + */ + +#include "titanic/game/gondolier_mixer.h" + +namespace Titanic { + +CGondolierMixer::CGondolierMixer() : CGondolierBase(), + _string1("c#0.wav"), _string2("c#1.wav"), + _fieldBC(-1), _fieldC0(-1), _fieldC4(0), _fieldC8(0), + _fieldE4(0) { +} + +void CGondolierMixer::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeNumberLine(_fieldC0, indent); + file->writeNumberLine(_fieldC4, indent); + file->writeNumberLine(_fieldC8, indent); + file->writeQuotedLine(_string1, indent); + file->writeQuotedLine(_string2, indent); + file->writeNumberLine(_fieldE4, indent); + + CGondolierBase::save(file, indent); +} + +void CGondolierMixer::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + _fieldC4 = file->readNumber(); + _fieldC8 = file->readNumber(); + _string1 = file->readString(); + _string2 = file->readString(); + _fieldE4 = file->readNumber(); + + CGondolierBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/gondolier_mixer.h b/engines/titanic/game/gondolier_mixer.h new file mode 100644 index 0000000000..dfc46210c3 --- /dev/null +++ b/engines/titanic/game/gondolier_mixer.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_GONDOLIER_MIXER_H +#define TITANIC_GONDOLIER_MIXER_H + +#include "titanic/game/gondolier_base.h" + +namespace Titanic { + +class CGondolierMixer : public CGondolierBase { +private: + int _fieldBC; + int _fieldC0; + int _fieldC4; + int _fieldC8; + CString _string1; + CString _string2; + int _fieldE4; +public: + CGondolierMixer(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CGondolierMixer"; } + + /** + * 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_GONDOLIER_MIXER_H */ diff --git a/engines/titanic/game/lemon_dispensor.cpp b/engines/titanic/game/lemon_dispensor.cpp index 3cf7cc9525..b13b6d8f0b 100644 --- a/engines/titanic/game/lemon_dispensor.cpp +++ b/engines/titanic/game/lemon_dispensor.cpp @@ -24,12 +24,19 @@ namespace Titanic { +int CLemonDispensor::_v1; +int CLemonDispensor::_v2; +int CLemonDispensor::_v3; + CLemonDispensor::CLemonDispensor() : CBackground(), _fieldE0(0), _fieldE4(9), _fieldE8(15), _fieldEC(0) { } void CLemonDispensor::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + file->writeNumberLine(_v3, indent); file->writeNumberLine(_fieldE0, indent); file->writeNumberLine(_fieldE4, indent); file->writeNumberLine(_fieldE8, indent); @@ -40,6 +47,9 @@ void CLemonDispensor::save(SimpleFile *file, int indent) const { void CLemonDispensor::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + _v3 = file->readNumber(); _fieldE0 = file->readNumber(); _fieldE4 = file->readNumber(); _fieldE8 = file->readNumber(); diff --git a/engines/titanic/game/lemon_dispensor.h b/engines/titanic/game/lemon_dispensor.h index 7f3164f192..c2c76eac6a 100644 --- a/engines/titanic/game/lemon_dispensor.h +++ b/engines/titanic/game/lemon_dispensor.h @@ -28,7 +28,11 @@ namespace Titanic { class CLemonDispensor : public CBackground { -public: +private: + static int _v1; + static int _v2; + static int _v3; + int _fieldE0; int _fieldE4; int _fieldE8; diff --git a/engines/titanic/game/maitred/maitred_arm_holder.cpp b/engines/titanic/game/maitred/maitred_arm_holder.cpp new file mode 100644 index 0000000000..b6fc494441 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_arm_holder.cpp @@ -0,0 +1,37 @@ +/* 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/game/maitred/maitred_arm_holder.h" + +namespace Titanic { + +void CMaitreDArmHolder::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CDropTarget::save(file, indent); +} + +void CMaitreDArmHolder::load(SimpleFile *file) { + file->readNumber(); + CDropTarget::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/maitred/maitred_arm_holder.h b/engines/titanic/game/maitred/maitred_arm_holder.h new file mode 100644 index 0000000000..b838109fa3 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_arm_holder.h @@ -0,0 +1,50 @@ +/* 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_ARM_HOLDER_H +#define TITANIC_MAITRED_ARM_HOLDER_H + +#include "titanic/core/drop_target.h" + +namespace Titanic { + +class CMaitreDArmHolder : public CDropTarget { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMaitreDArmHolder"; } + + /** + * 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_ARM_HOLDER_H */ diff --git a/engines/titanic/game/maitred/maitred_body.cpp b/engines/titanic/game/maitred/maitred_body.cpp new file mode 100644 index 0000000000..4cdd5899de --- /dev/null +++ b/engines/titanic/game/maitred/maitred_body.cpp @@ -0,0 +1,39 @@ +/* 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/game/maitred/maitred_legs.h" + +namespace Titanic { + +void CMaitreDLegs::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldC8, indent); + CMaitreDProdReceptor::save(file, indent); +} + +void CMaitreDLegs::load(SimpleFile *file) { + file->readNumber(); + _fieldC8 = file->readNumber(); + CMaitreDProdReceptor::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/maitred/maitred_body.h b/engines/titanic/game/maitred/maitred_body.h new file mode 100644 index 0000000000..29e528b1f6 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_body.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_MAITRED_BODY_H +#define TITANIC_MAITRED_BODY_H + +#include "titanic/game/maitred/maitred_prod_receptor.h" + +namespace Titanic { + +class CMaitreDBody : public CMaitreDProdReceptor { +private: + int _fieldC8; +public: + CMaitreDBody() : CMaitreDProdReceptor(), _fieldC8(1) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMaitreDBody"; } + + /** + * 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_BODY_H */ diff --git a/engines/titanic/game/maitred/maitred_legs.cpp b/engines/titanic/game/maitred/maitred_legs.cpp new file mode 100644 index 0000000000..ce7054e057 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_legs.cpp @@ -0,0 +1,39 @@ +/* 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/game/maitred/maitred_body.h" + +namespace Titanic { + +void CMaitreDBody::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldC8, indent); + CMaitreDProdReceptor::save(file, indent); +} + +void CMaitreDBody::load(SimpleFile *file) { + file->readNumber(); + _fieldC8 = file->readNumber(); + CMaitreDProdReceptor::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/maitred/maitred_legs.h b/engines/titanic/game/maitred/maitred_legs.h new file mode 100644 index 0000000000..e3ac93c870 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_legs.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_MAITRED_LEGS_H +#define TITANIC_MAITRED_LEGS_H + +#include "titanic/game/maitred/maitred_prod_receptor.h" + +namespace Titanic { + +class CMaitreDLegs : public CMaitreDProdReceptor { +private: + int _fieldC8; +public: + CMaitreDLegs() : CMaitreDProdReceptor(), _fieldC8(1) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMaitreDLegs"; } + + /** + * 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_LEGS_H */ diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.cpp b/engines/titanic/game/maitred/maitred_prod_receptor.cpp new file mode 100644 index 0000000000..6e6143c510 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_prod_receptor.cpp @@ -0,0 +1,45 @@ +/* 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/game/maitred/maitred_prod_receptor.h" + +namespace Titanic { + +void CMaitreDProdReceptor::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeNumberLine(_fieldC0, indent); + file->writeNumberLine(_fieldC4, indent); + + CGameObject::save(file, indent); +} + +void CMaitreDProdReceptor::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + _fieldC4 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.h b/engines/titanic/game/maitred/maitred_prod_receptor.h new file mode 100644 index 0000000000..130bc547b2 --- /dev/null +++ b/engines/titanic/game/maitred/maitred_prod_receptor.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_MAITRED_PROD_RECEPTOR_H +#define TITANIC_MAITRED_PROD_RECEPTOR_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CMaitreDProdReceptor : public CGameObject { +protected: + int _fieldBC; + int _fieldC0; + int _fieldC4; +public: + CMaitreDProdReceptor() : CGameObject(), + _fieldBC(0), _fieldC0(0), _fieldC4(1) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMaitreDProdReceptor"; } + + /** + * 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_PROD_RECEPTOR_H */ diff --git a/engines/titanic/game/maitred_arm_holder.cpp b/engines/titanic/game/maitred_arm_holder.cpp deleted file mode 100644 index 81ad43556b..0000000000 --- a/engines/titanic/game/maitred_arm_holder.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* 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/game/maitred_arm_holder.h" - -namespace Titanic { - -void CMaitreDArmHolder::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - CDropTarget::save(file, indent); -} - -void CMaitreDArmHolder::load(SimpleFile *file) { - file->readNumber(); - CGameObject::load(file); -} - -} // End of namespace Titanic diff --git a/engines/titanic/game/maitred_arm_holder.h b/engines/titanic/game/maitred_arm_holder.h deleted file mode 100644 index b838109fa3..0000000000 --- a/engines/titanic/game/maitred_arm_holder.h +++ /dev/null @@ -1,50 +0,0 @@ -/* 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_ARM_HOLDER_H -#define TITANIC_MAITRED_ARM_HOLDER_H - -#include "titanic/core/drop_target.h" - -namespace Titanic { - -class CMaitreDArmHolder : public CDropTarget { -public: - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CMaitreDArmHolder"; } - - /** - * 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_ARM_HOLDER_H */ diff --git a/engines/titanic/game/pickup/pick_up_hose.cpp b/engines/titanic/game/pickup/pick_up_hose.cpp index 35ac7f8049..e6902cb6b3 100644 --- a/engines/titanic/game/pickup/pick_up_hose.cpp +++ b/engines/titanic/game/pickup/pick_up_hose.cpp @@ -24,15 +24,21 @@ namespace Titanic { +int CPickUpHose::_v1; + void CPickUpHose::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_v1, indent); + CPickUp::save(file, indent); } void CPickUpHose::load(SimpleFile *file) { file->readNumber(); _string1 = file->readString(); + _v1 = file->readNumber(); + CPickUp::load(file); } diff --git a/engines/titanic/game/pickup/pick_up_hose.h b/engines/titanic/game/pickup/pick_up_hose.h index 56596c50fc..13d5810177 100644 --- a/engines/titanic/game/pickup/pick_up_hose.h +++ b/engines/titanic/game/pickup/pick_up_hose.h @@ -29,6 +29,8 @@ namespace Titanic { class CPickUpHose : public CPickUp { private: + static int _v1; + CString _string1; public: /** diff --git a/engines/titanic/game/service_elevator_door.cpp b/engines/titanic/game/service_elevator_door.cpp deleted file mode 100644 index 717b61dc72..0000000000 --- a/engines/titanic/game/service_elevator_door.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* 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/game/service_elevator_door.h" - -namespace Titanic { - -CServiceElevatorDoor::CServiceElevatorDoor() : CDoorAutoSoundEvent() { - _string1 = "z#31.wav"; - _string2 = "z#32.wav"; -} - -void CServiceElevatorDoor::save(SimpleFile *file, int indent) const { - file->writeNumberLine(1, indent); - file->writeQuotedLine(_string2, indent); - file->writeQuotedLine(_string1, indent); - - CDoorAutoSoundEvent::save(file, indent); -} - -void CServiceElevatorDoor::load(SimpleFile *file) { - file->readNumber(); - _string2 = file->readString(); - _string1 = file->readString(); - - CDoorAutoSoundEvent::load(file); -} - -} // End of namespace Titanic diff --git a/engines/titanic/game/service_elevator_door.h b/engines/titanic/game/service_elevator_door.h deleted file mode 100644 index 52465d842d..0000000000 --- a/engines/titanic/game/service_elevator_door.h +++ /dev/null @@ -1,52 +0,0 @@ -/* 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_SERVICE_ELEVATOR_DOOR_H -#define TITANIC_SERVICE_ELEVATOR_DOOR_H - -#include "titanic/sound/door_auto_sound_event.h" - -namespace Titanic { - -class CServiceElevatorDoor : public CDoorAutoSoundEvent { -public: - CServiceElevatorDoor(); - - /** - * Return the class name - */ - virtual const char *getClassName() const { return "CServiceElevatorDoor"; } - - /** - * 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_SERVICE_ELEVATOR_DOOR_H */ diff --git a/engines/titanic/game/speech_dispensor.cpp b/engines/titanic/game/speech_dispensor.cpp index d8fc66b07a..72873391db 100644 --- a/engines/titanic/game/speech_dispensor.cpp +++ b/engines/titanic/game/speech_dispensor.cpp @@ -26,11 +26,27 @@ namespace Titanic { void CSpeechDispensor::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldEC, indent); + file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_fieldF4, indent); + file->writeNumberLine(_fieldF8, indent); + file->writeNumberLine(_fieldFC, indent); + CBackground::save(file, indent); } void CSpeechDispensor::load(SimpleFile *file) { file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldEC = file->readNumber(); + _fieldF0 = file->readNumber(); + _fieldF4 = file->readNumber(); + _fieldF8 = file->readNumber(); + _fieldFC = file->readNumber(); + CBackground::load(file); } diff --git a/engines/titanic/game/speech_dispensor.h b/engines/titanic/game/speech_dispensor.h index 857750dc95..19f31fcf68 100644 --- a/engines/titanic/game/speech_dispensor.h +++ b/engines/titanic/game/speech_dispensor.h @@ -28,6 +28,15 @@ namespace Titanic { class CSpeechDispensor : public CBackground { +private: + int _fieldE0; + int _fieldE4; + int _fieldE8; + int _fieldEC; + int _fieldF0; + int _fieldF4; + int _fieldF8; + int _fieldFC; public: /** * Return the class name -- cgit v1.2.3