From 34ffd06c7896ec0b9c4874800a57d8003862c8c4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 26 Feb 2016 20:35:12 -0500 Subject: TITANIC: Implemented CSTButton class and descendents --- engines/titanic/gfx/act_button.cpp | 40 +++++++++++++++++ engines/titanic/gfx/act_button.h | 52 ++++++++++++++++++++++ engines/titanic/gfx/changes_season_button.cpp | 40 +++++++++++++++++ engines/titanic/gfx/changes_season_button.h | 52 ++++++++++++++++++++++ engines/titanic/gfx/elevator_button.cpp | 40 +++++++++++++++++ engines/titanic/gfx/elevator_button.h | 52 ++++++++++++++++++++++ engines/titanic/gfx/move_object_button.cpp | 46 +++++++++++++++++++ engines/titanic/gfx/move_object_button.h | 55 +++++++++++++++++++++++ engines/titanic/gfx/slider_button.cpp | 51 ++++++++++++++++++++++ engines/titanic/gfx/slider_button.h | 57 ++++++++++++++++++++++++ engines/titanic/gfx/st_button.cpp | 63 +++++++++++++++++++++++++++ engines/titanic/gfx/st_button.h | 60 +++++++++++++++++++++++++ engines/titanic/gfx/status_change_button.cpp | 40 +++++++++++++++++ engines/titanic/gfx/status_change_button.h | 52 ++++++++++++++++++++++ 14 files changed, 700 insertions(+) create mode 100644 engines/titanic/gfx/act_button.cpp create mode 100644 engines/titanic/gfx/act_button.h create mode 100644 engines/titanic/gfx/changes_season_button.cpp create mode 100644 engines/titanic/gfx/changes_season_button.h create mode 100644 engines/titanic/gfx/elevator_button.cpp create mode 100644 engines/titanic/gfx/elevator_button.h create mode 100644 engines/titanic/gfx/move_object_button.cpp create mode 100644 engines/titanic/gfx/move_object_button.h create mode 100644 engines/titanic/gfx/slider_button.cpp create mode 100644 engines/titanic/gfx/slider_button.h create mode 100644 engines/titanic/gfx/st_button.cpp create mode 100644 engines/titanic/gfx/st_button.h create mode 100644 engines/titanic/gfx/status_change_button.cpp create mode 100644 engines/titanic/gfx/status_change_button.h (limited to 'engines/titanic/gfx') diff --git a/engines/titanic/gfx/act_button.cpp b/engines/titanic/gfx/act_button.cpp new file mode 100644 index 0000000000..3e79a171c1 --- /dev/null +++ b/engines/titanic/gfx/act_button.cpp @@ -0,0 +1,40 @@ +/* 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/gfx/act_button.h" + +namespace Titanic { + +CActButton::CActButton() : CSTButton() { +} + +void CActButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CSTButton::save(file, indent); +} + +void CActButton::load(SimpleFile *file) { + file->readNumber(); + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/act_button.h b/engines/titanic/gfx/act_button.h new file mode 100644 index 0000000000..0ae2d4d92e --- /dev/null +++ b/engines/titanic/gfx/act_button.h @@ -0,0 +1,52 @@ +/* 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_ACT_BUTTON_H +#define TITANIC_ACT_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CActButton : public CSTButton { +public: + CActButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CActButton"; } + + /** + * 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_ACT_BUTTON_H */ diff --git a/engines/titanic/gfx/changes_season_button.cpp b/engines/titanic/gfx/changes_season_button.cpp new file mode 100644 index 0000000000..a5f6778815 --- /dev/null +++ b/engines/titanic/gfx/changes_season_button.cpp @@ -0,0 +1,40 @@ +/* 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/gfx/changes_season_button.h" + +namespace Titanic { + +CChangesSeasonButton::CChangesSeasonButton() : CSTButton() { +} + +void CChangesSeasonButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CSTButton::save(file, indent); +} + +void CChangesSeasonButton::load(SimpleFile *file) { + file->readNumber(); + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/changes_season_button.h b/engines/titanic/gfx/changes_season_button.h new file mode 100644 index 0000000000..8a756341fd --- /dev/null +++ b/engines/titanic/gfx/changes_season_button.h @@ -0,0 +1,52 @@ +/* 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_CHANGES_SEASON_BUTTON_H +#define TITANIC_CHANGES_SEASON_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CChangesSeasonButton : public CSTButton { +public: + CChangesSeasonButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CChangesSeasonButton"; } + + /** + * 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_CHANGES_SEASON_BUTTON_H */ diff --git a/engines/titanic/gfx/elevator_button.cpp b/engines/titanic/gfx/elevator_button.cpp new file mode 100644 index 0000000000..81c9598b03 --- /dev/null +++ b/engines/titanic/gfx/elevator_button.cpp @@ -0,0 +1,40 @@ +/* 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/gfx/elevator_button.h" + +namespace Titanic { + +CElevatorButton::CElevatorButton() : CSTButton() { +} + +void CElevatorButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CSTButton::save(file, indent); +} + +void CElevatorButton::load(SimpleFile *file) { + file->readNumber(); + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/elevator_button.h b/engines/titanic/gfx/elevator_button.h new file mode 100644 index 0000000000..1090ea800a --- /dev/null +++ b/engines/titanic/gfx/elevator_button.h @@ -0,0 +1,52 @@ +/* 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_ELEVATOR_BUTTON_H +#define TITANIC_ELEVATOR_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CElevatorButton : public CSTButton { +public: + CElevatorButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CElevatorButton"; } + + /** + * 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_ELEVATOR_BUTTON_H */ diff --git a/engines/titanic/gfx/move_object_button.cpp b/engines/titanic/gfx/move_object_button.cpp new file mode 100644 index 0000000000..4ab0825864 --- /dev/null +++ b/engines/titanic/gfx/move_object_button.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/gfx/move_object_button.h" + +namespace Titanic { + +CMoveObjectButton::CMoveObjectButton() : CSTButton(), _field11C(1) { +} + +void CMoveObjectButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writePoint(_pos1, indent); + file->writeNumberLine(_field11C, indent); + + CSTButton::save(file, indent); +} + +void CMoveObjectButton::load(SimpleFile *file) { + file->readNumber(); + _pos1 = file->readPoint(); + _field11C = file->readNumber(); + + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/move_object_button.h b/engines/titanic/gfx/move_object_button.h new file mode 100644 index 0000000000..b00ba7b00f --- /dev/null +++ b/engines/titanic/gfx/move_object_button.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_MOVE_OBJECT_BUTTON_H +#define TITANIC_MOVE_OBJECT_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CMoveObjectButton : public CSTButton { +private: + Common::Point _pos1; + int _field11C; +public: + CMoveObjectButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMoveObjectButton"; } + + /** + * 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_MOVE_OBJECT_BUTTON_H */ diff --git a/engines/titanic/gfx/slider_button.cpp b/engines/titanic/gfx/slider_button.cpp new file mode 100644 index 0000000000..bcd9adde57 --- /dev/null +++ b/engines/titanic/gfx/slider_button.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/gfx/slider_button.h" + +namespace Titanic { + +CSliderButton::CSliderButton() : CSTButton(), _field114(0), + _field118(0), _field11C(0) { +} + +void CSliderButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field114, indent); + file->writeNumberLine(_field118, indent); + file->writeNumberLine(_field11C, indent); + file->writePoint(_pos1, indent); + + CSTButton::save(file, indent); +} + +void CSliderButton::load(SimpleFile *file) { + file->readNumber(); + _field114 = file->readNumber(); + _field118 = file->readNumber(); + _field11C = file->readNumber(); + _pos1 = file->readPoint(); + + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/slider_button.h b/engines/titanic/gfx/slider_button.h new file mode 100644 index 0000000000..e39a5f8c41 --- /dev/null +++ b/engines/titanic/gfx/slider_button.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_SLIDER_BUTTON_H +#define TITANIC_SLIDER_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CSliderButton : public CSTButton { +private: + int _field114; + int _field118; + int _field11C; + Common::Point _pos1; +public: + CSliderButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSliderButton"; } + + /** + * 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_SLIDER_BUTTON_H */ diff --git a/engines/titanic/gfx/st_button.cpp b/engines/titanic/gfx/st_button.cpp new file mode 100644 index 0000000000..44aa5cb7c5 --- /dev/null +++ b/engines/titanic/gfx/st_button.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/gfx/st_button.h" + +namespace Titanic { + +CSTButton::CSTButton() : CBackground() { + _fieldE0 = 0; + _string3 = "NULL"; + _fieldF0 = 0; + _fieldF4 = 0; + _string4 = "NULL"; + _string5 = "NULL"; + _field110 = 0; +} + +void CSTButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldE0, indent); + file->writeQuotedLine(_string3, indent); + file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_fieldF4, indent); + file->writeQuotedLine(_string4, indent); + file->writeQuotedLine(_string5, indent); + file->writeNumberLine(_field110, indent); + + CBackground::save(file, indent); +} + +void CSTButton::load(SimpleFile *file) { + file->readNumber(); + _fieldE0 = file->readNumber(); + _string3 = file->readString(); + _fieldF0 = file->readNumber(); + _fieldF4 = file->readNumber(); + _string4 = file->readString(); + _string5 = file->readString(); + _field110 = file->readNumber(); + + CBackground::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/st_button.h b/engines/titanic/gfx/st_button.h new file mode 100644 index 0000000000..39b3765848 --- /dev/null +++ b/engines/titanic/gfx/st_button.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_ST_BUTTON_H +#define TITANIC_ST_BUTTON_H + +#include "titanic/core/background.h" + +namespace Titanic { + +class CSTButton : public CBackground { +private: + int _fieldE0; + CString _string3; + int _fieldF0; + int _fieldF4; + CString _string4; + CString _string5; + int _field110; +public: + CSTButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSTButton"; } + + /** + * 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_ST_BUTTON_H */ diff --git a/engines/titanic/gfx/status_change_button.cpp b/engines/titanic/gfx/status_change_button.cpp new file mode 100644 index 0000000000..36037a2564 --- /dev/null +++ b/engines/titanic/gfx/status_change_button.cpp @@ -0,0 +1,40 @@ +/* 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/gfx/status_change_button.h" + +namespace Titanic { + +CStatusChangeButton::CStatusChangeButton() : CSTButton() { +} + +void CStatusChangeButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CSTButton::save(file, indent); +} + +void CStatusChangeButton::load(SimpleFile *file) { + file->readNumber(); + CSTButton::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/status_change_button.h b/engines/titanic/gfx/status_change_button.h new file mode 100644 index 0000000000..b3b41254b3 --- /dev/null +++ b/engines/titanic/gfx/status_change_button.h @@ -0,0 +1,52 @@ +/* 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_STATUS_CHANGE_BUTTON_H +#define TITANIC_STATUS_CHANGE_BUTTON_H + +#include "titanic/gfx/st_button.h" + +namespace Titanic { + +class CStatusChangeButton : public CSTButton { +public: + CStatusChangeButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CStatusChangeButton"; } + + /** + * 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_STATUS_CHANGE_BUTTON_H */ -- cgit v1.2.3