diff options
author | Paul Gilbert | 2016-03-02 23:40:06 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-03-02 23:40:06 -0500 |
commit | e688850e932f0c8be6d10a73fe416c90799733b0 (patch) | |
tree | 48f01b46022f32b5b83089a830df8d5fa11a6192 /engines/titanic/game/gondolier | |
parent | 3ae4e63c80cda635f941370e72536988bde67698 (diff) | |
download | scummvm-rg350-e688850e932f0c8be6d10a73fe416c90799733b0.tar.gz scummvm-rg350-e688850e932f0c8be6d10a73fe416c90799733b0.tar.bz2 scummvm-rg350-e688850e932f0c8be6d10a73fe416c90799733b0.zip |
TITANIC: Implemented more saveable classes
Diffstat (limited to 'engines/titanic/game/gondolier')
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_base.cpp | 70 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_base.h | 61 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_chest.cpp | 37 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_chest.h | 50 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_face.cpp | 39 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_face.h | 54 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_mixer.cpp | 59 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_mixer.h | 60 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_slider.cpp | 82 | ||||
-rw-r--r-- | engines/titanic/game/gondolier/gondolier_slider.h | 71 |
10 files changed, 583 insertions, 0 deletions
diff --git a/engines/titanic/game/gondolier/gondolier_base.cpp b/engines/titanic/game/gondolier/gondolier_base.cpp new file mode 100644 index 0000000000..bf54ed4d8d --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_base.cpp @@ -0,0 +1,70 @@ +/* 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/gondolier_base.h" + +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); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/gondolier/gondolier_base.h b/engines/titanic/game/gondolier/gondolier_base.h new file mode 100644 index 0000000000..3f0cede70d --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_base.h @@ -0,0 +1,61 @@ +/* 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_BASE_H +#define TITANIC_GONDOLIER_BASE_H + +#include "titanic/core/game_object.h" + +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 + */ + virtual const char *getClassName() const { return "CGondolierBase"; } + + /** + * 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_BASE_H */ diff --git a/engines/titanic/game/gondolier/gondolier_chest.cpp b/engines/titanic/game/gondolier/gondolier_chest.cpp new file mode 100644 index 0000000000..441a8bac31 --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_chest.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/gondolier/gondolier_chest.h" + +namespace Titanic { + +void CGondolierChest::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CGondolierBase::save(file, indent); +} + +void CGondolierChest::load(SimpleFile *file) { + file->readNumber(); + CGondolierBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/gondolier/gondolier_chest.h b/engines/titanic/game/gondolier/gondolier_chest.h new file mode 100644 index 0000000000..277faf994f --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_chest.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_GONDOLIER_CHEST_H +#define TITANIC_GONDOLIER_CHEST_H + +#include "titanic/game/gondolier/gondolier_base.h" + +namespace Titanic { + +class CGondolierChest : public CGondolierBase { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CGondolierChest"; } + + /** + * 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_CHEST_H */ diff --git a/engines/titanic/game/gondolier/gondolier_face.cpp b/engines/titanic/game/gondolier/gondolier_face.cpp new file mode 100644 index 0000000000..6db23d8a1a --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_face.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/gondolier/gondolier_face.h" + +namespace Titanic { + +void CGondolierFace::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + CGondolierBase::save(file, indent); +} + +void CGondolierFace::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + CGondolierBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/gondolier/gondolier_face.h b/engines/titanic/game/gondolier/gondolier_face.h new file mode 100644 index 0000000000..5007431337 --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_face.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_GONDOLIER_FACE_H +#define TITANIC_GONDOLIER_FACE_H + +#include "titanic/game/gondolier/gondolier_base.h" + +namespace Titanic { + +class CGondolierFace : public CGondolierBase { +private: + int _fieldBC; +public: + CGondolierFace() : CGondolierBase(), _fieldBC(0) {} + + /** + * 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_FACE_H */ diff --git a/engines/titanic/game/gondolier/gondolier_mixer.cpp b/engines/titanic/game/gondolier/gondolier_mixer.cpp new file mode 100644 index 0000000000..e81ad34c87 --- /dev/null +++ b/engines/titanic/game/gondolier/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/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/gondolier_mixer.h b/engines/titanic/game/gondolier/gondolier_mixer.h new file mode 100644 index 0000000000..5b92bc2fb8 --- /dev/null +++ b/engines/titanic/game/gondolier/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/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/gondolier/gondolier_slider.cpp b/engines/titanic/game/gondolier/gondolier_slider.cpp new file mode 100644 index 0000000000..dff464ce64 --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_slider.cpp @@ -0,0 +1,82 @@ +/* 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/gondolier_slider.h" + +namespace Titanic { + +CGondolierSlider::CGondolierSlider() : CGondolierBase(), + _fieldBC(0), _fieldC0(0), _fieldC4(0), _fieldC8(0), + _fieldCC(0), _fieldD0(0), _fieldD4(0), _fieldD8(0), + _fieldDC(0), _fieldE0(0), _fieldE4(0), _fieldE8(0), + _fieldEC(0), _string1("NULL"), _fieldFC(0), _field118(0) { +} + +void CGondolierSlider::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->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + file->writeNumberLine(_fieldD4, indent); + file->writeNumberLine(_fieldD8, indent); + file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_fieldE8, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldFC, indent); + file->writeQuotedLine(_string2, indent); + file->writeQuotedLine(_string3, indent); + file->writeNumberLine(_field118, indent); + + CGondolierBase::save(file, indent); +} + +void CGondolierSlider::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + _fieldC4 = file->readNumber(); + _fieldC8 = file->readNumber(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + _fieldD4 = file->readNumber(); + _fieldD8 = file->readNumber(); + _fieldDC = file->readNumber(); + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _fieldE8 = file->readNumber(); + _fieldEC = file->readNumber(); + _string1 = file->readString(); + _fieldFC = file->readNumber(); + _string2 = file->readString(); + _string3 = file->readString(); + _field118 = file->readNumber(); + + CGondolierBase::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/gondolier/gondolier_slider.h b/engines/titanic/game/gondolier/gondolier_slider.h new file mode 100644 index 0000000000..9522483dc0 --- /dev/null +++ b/engines/titanic/game/gondolier/gondolier_slider.h @@ -0,0 +1,71 @@ +/* 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_SLIDER_H +#define TITANIC_GONDOLIER_SLIDER_H + +#include "titanic/game/gondolier/gondolier_base.h" + +namespace Titanic { + +class CGondolierSlider : public CGondolierBase { +private: + int _fieldBC; + int _fieldC0; + int _fieldC4; + int _fieldC8; + int _fieldCC; + int _fieldD0; + int _fieldD4; + int _fieldD8; + int _fieldDC; + int _fieldE0; + int _fieldE4; + int _fieldE8; + int _fieldEC; + CString _string1; + int _fieldFC; + CString _string2; + CString _string3; + int _field118; +public: + CGondolierSlider(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CGondolierSlider"; } + + /** + * 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_SLIDER_H */ |