From 6eb777fe362d77189425c2ae137bedab0af5ee5f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 28 Feb 2016 21:42:13 -0500 Subject: TITANIC: Added a lot of class definitions Let's be honest here, it's a s**t-load of class definitions --- engines/titanic/game/fan_control.cpp | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 engines/titanic/game/fan_control.cpp (limited to 'engines/titanic/game/fan_control.cpp') diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp new file mode 100644 index 0000000000..44e36b2b6c --- /dev/null +++ b/engines/titanic/game/fan_control.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/game/fan_control.h" + +namespace Titanic { + +CFanControl::CFanControl() : CGameObject(), _fieldBC(0), + _fieldC0(0), _fieldC4(0), _fieldC8(0), _fieldCC(0) { +} + +void CFanControl::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); + + CGameObject::save(file, indent); +} + +void CFanControl::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + _fieldC4 = file->readNumber(); + _fieldC8 = file->readNumber(); + _fieldCC = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic -- cgit v1.2.3 From 5ccc0a66da38d23520234e7060efaf966d3345b9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 29 Jun 2016 19:53:16 -0400 Subject: TITANIC: Removed const modifier from all saveable objects Turns out that CGameObject::save regenerates the _movieRangeInfo list. So the const suffix can no longer be used for the entire hierarchy --- engines/titanic/game/fan_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/titanic/game/fan_control.cpp') diff --git a/engines/titanic/game/fan_control.cpp b/engines/titanic/game/fan_control.cpp index 44e36b2b6c..a42e4dd5c1 100644 --- a/engines/titanic/game/fan_control.cpp +++ b/engines/titanic/game/fan_control.cpp @@ -28,7 +28,7 @@ CFanControl::CFanControl() : CGameObject(), _fieldBC(0), _fieldC0(0), _fieldC4(0), _fieldC8(0), _fieldCC(0) { } -void CFanControl::save(SimpleFile *file, int indent) const { +void CFanControl::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); file->writeNumberLine(_fieldBC, indent); file->writeNumberLine(_fieldC0, indent); -- cgit v1.2.3