diff options
author | Paul Gilbert | 2016-03-01 23:40:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-03-01 23:40:59 -0500 |
commit | f7e057e4d74a7f38ac40024bba29ebc0071975c5 (patch) | |
tree | bf01ebc556d7e6df840da413785bbe8a8e5e44eb /engines/titanic/game/transport | |
parent | 9ce8e1130cc32c49e31a2160b2f4034f05430b4b (diff) | |
download | scummvm-rg350-f7e057e4d74a7f38ac40024bba29ebc0071975c5.tar.gz scummvm-rg350-f7e057e4d74a7f38ac40024bba29ebc0071975c5.tar.bz2 scummvm-rg350-f7e057e4d74a7f38ac40024bba29ebc0071975c5.zip |
TITANIC: Added more miscellaneous classes
Diffstat (limited to 'engines/titanic/game/transport')
-rw-r--r-- | engines/titanic/game/transport/exit_pellerator.cpp | 46 | ||||
-rw-r--r-- | engines/titanic/game/transport/exit_pellerator.h | 53 | ||||
-rw-r--r-- | engines/titanic/game/transport/pellerator.cpp | 9 | ||||
-rw-r--r-- | engines/titanic/game/transport/pellerator.h | 3 | ||||
-rw-r--r-- | engines/titanic/game/transport/service_elevator.cpp | 10 | ||||
-rw-r--r-- | engines/titanic/game/transport/service_elevator.h | 6 |
6 files changed, 126 insertions, 1 deletions
diff --git a/engines/titanic/game/transport/exit_pellerator.cpp b/engines/titanic/game/transport/exit_pellerator.cpp new file mode 100644 index 0000000000..400214a140 --- /dev/null +++ b/engines/titanic/game/transport/exit_pellerator.cpp @@ -0,0 +1,46 @@ +/* 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/transport/pellerator.h" + +namespace Titanic { + +int CPellerator::_v1; +int CPellerator::_v2; + +void CPellerator::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + + CTransport::save(file, indent); +} + +void CPellerator::load(SimpleFile *file) { + file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + + CTransport::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/transport/exit_pellerator.h b/engines/titanic/game/transport/exit_pellerator.h new file mode 100644 index 0000000000..d327ea6ba6 --- /dev/null +++ b/engines/titanic/game/transport/exit_pellerator.h @@ -0,0 +1,53 @@ +/* ScummVM - Graphic Adventure Engine +* +* ScummVM is the legal property of its developers, whose names +* are too numerous to list here. Please refer to the COPYRIGHT +* file distributed with this source distribution. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +*/ + +#ifndef TITANIC_PELLERATOR_H +#define TITANIC_PELLERATOR_H + +#include "titanic/game/transport/transport.h" + +namespace Titanic { + +class CPellerator : public CTransport { +private: + static int _v1; + static int _v2; +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CPellerator"; } + + /** + * 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_PELLERATOR_H */ diff --git a/engines/titanic/game/transport/pellerator.cpp b/engines/titanic/game/transport/pellerator.cpp index 1ab8935008..400214a140 100644 --- a/engines/titanic/game/transport/pellerator.cpp +++ b/engines/titanic/game/transport/pellerator.cpp @@ -24,13 +24,22 @@ namespace Titanic { +int CPellerator::_v1; +int CPellerator::_v2; + void CPellerator::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + CTransport::save(file, indent); } void CPellerator::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + CTransport::load(file); } diff --git a/engines/titanic/game/transport/pellerator.h b/engines/titanic/game/transport/pellerator.h index 6ccc56f595..d327ea6ba6 100644 --- a/engines/titanic/game/transport/pellerator.h +++ b/engines/titanic/game/transport/pellerator.h @@ -28,6 +28,9 @@ namespace Titanic { class CPellerator : public CTransport { +private: + static int _v1; + static int _v2; public: /** * Return the class name diff --git a/engines/titanic/game/transport/service_elevator.cpp b/engines/titanic/game/transport/service_elevator.cpp index df88c13454..ba68bc8c2b 100644 --- a/engines/titanic/game/transport/service_elevator.cpp +++ b/engines/titanic/game/transport/service_elevator.cpp @@ -24,12 +24,19 @@ namespace Titanic { +int CServiceElevator::_v1; +int CServiceElevator::_v2; +int CServiceElevator::_v3; + CServiceElevator::CServiceElevator() : CTransport(), _fieldF8(0), _fieldFC(0), _field100(0), _field104(0) { } void CServiceElevator::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); + file->writeNumberLine(_v3, indent); file->writeNumberLine(_fieldF8, indent); file->writeNumberLine(_fieldFC, indent); file->writeNumberLine(_field100, indent); @@ -40,6 +47,9 @@ void CServiceElevator::save(SimpleFile *file, int indent) const { void CServiceElevator::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); + _v3 = file->readNumber(); _fieldF8 = file->readNumber(); _fieldFC = file->readNumber(); _field100 = file->readNumber(); diff --git a/engines/titanic/game/transport/service_elevator.h b/engines/titanic/game/transport/service_elevator.h index b41c6b155c..f97e3bcd5e 100644 --- a/engines/titanic/game/transport/service_elevator.h +++ b/engines/titanic/game/transport/service_elevator.h @@ -28,7 +28,11 @@ namespace Titanic { class CServiceElevator : public CTransport { -public: +private: + static int _v1; + static int _v2; + static int _v3; + int _fieldF8; int _fieldFC; int _field100; |