diff options
author | Paul Gilbert | 2016-02-28 08:09:29 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-02-28 08:09:29 -0500 |
commit | 6cb2a5e81f03ff984a2bc8b214c02f0a3c255952 (patch) | |
tree | b906780f8e06957e5e4372f98c20ab3f956c2325 | |
parent | 9cb1390c2636f6b586b0f6dfca6573bc05dc6592 (diff) | |
download | scummvm-rg350-6cb2a5e81f03ff984a2bc8b214c02f0a3c255952.tar.gz scummvm-rg350-6cb2a5e81f03ff984a2bc8b214c02f0a3c255952.tar.bz2 scummvm-rg350-6cb2a5e81f03ff984a2bc8b214c02f0a3c255952.zip |
TITANIC: Added CCredits
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 6 | ||||
-rw-r--r-- | engines/titanic/game/credits.cpp | 46 | ||||
-rw-r--r-- | engines/titanic/game/credits.h | 54 | ||||
-rw-r--r-- | engines/titanic/game/credits_button.cpp | 42 | ||||
-rw-r--r-- | engines/titanic/game/credits_button.h | 54 | ||||
-rw-r--r-- | engines/titanic/module.mk | 2 |
6 files changed, 204 insertions, 0 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 3ad4c7365b..799ee3c766 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -70,6 +70,8 @@ #include "titanic/game/cdrom_computer.h" #include "titanic/game/cdrom_tray.h" #include "titanic/game/computer_screen.h" +#include "titanic/game/credits.h" +#include "titanic/game/credits_button.h" #include "titanic/game/dead_area.h" #include "titanic/game/desk_click_responder.h" #include "titanic/game/doorbot_home_handler.h" @@ -203,6 +205,8 @@ DEFFN(CCDROM); DEFFN(CCDROMComputer); DEFFN(CCDROMTray); DEFFN(CComputerScreen); +DEFFN(CCredits); +DEFFN(CCreditsButton); DEFFN(CDeadArea); DEFFN(CDeskClickResponder); DEFFN(CDoorbotHomeHandler); @@ -499,6 +503,8 @@ void CSaveableObject::initClassList() { ADDFN(CCDROMComputer); ADDFN(CCDROMTray); ADDFN(CComputerScreen); + ADDFN(CCredits); + ADDFN(CCreditsButton); ADDFN(CDeadArea); ADDFN(CDeskClickResponder); ADDFN(CDoorbotHomeHandler); diff --git a/engines/titanic/game/credits.cpp b/engines/titanic/game/credits.cpp new file mode 100644 index 0000000000..178d268fb6 --- /dev/null +++ b/engines/titanic/game/credits.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/credits.h" + +namespace Titanic { + +CCredits::CCredits() : CGameObject(), _fieldBC(-1), _fieldC0(1) { +} + +void CCredits::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeNumberLine(_fieldC0, indent); + + CGameObject::save(file, indent); +} + +void CCredits::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/credits.h b/engines/titanic/game/credits.h new file mode 100644 index 0000000000..0e35a58174 --- /dev/null +++ b/engines/titanic/game/credits.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_CREDITS_H +#define TITANIC_CREDITS_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CCredits : public CGameObject { +public: + int _fieldBC, _fieldC0; +public: + CCredits(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CCredits"; } + + /** + * 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_CREDITS_H */ diff --git a/engines/titanic/game/credits_button.cpp b/engines/titanic/game/credits_button.cpp new file mode 100644 index 0000000000..0ab23c1efc --- /dev/null +++ b/engines/titanic/game/credits_button.cpp @@ -0,0 +1,42 @@ +/* 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/credits_button.h" + +namespace Titanic { + +CCreditsButton::CCreditsButton() : CBackground(), _fieldE0(1) { +} + +void CCreditsButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldE0, indent); + CBackground::save(file, indent); +} + +void CCreditsButton::load(SimpleFile *file) { + file->readNumber(); + _fieldE0 = file->readNumber(); + CBackground::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/credits_button.h b/engines/titanic/game/credits_button.h new file mode 100644 index 0000000000..b22ce79a3b --- /dev/null +++ b/engines/titanic/game/credits_button.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_CREDITS_BUTTON_H +#define TITANIC_CREDITS_BUTTON_H + +#include "titanic/core/background.h" + +namespace Titanic { + +class CCreditsButton : public CBackground { +public: + int _fieldE0; +public: + CCreditsButton(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CCreditsButton"; } + + /** + * 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_CREDITS_BUTTON_H */ diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 855ba0bcb7..9faf157534 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -67,6 +67,8 @@ MODULE_OBJS := \ game/cdrom_computer.o \ game/cdrom_tray.o \ game/computer_screen.o \ + game/credits.o \ + game/credits_button.o \ game/dead_area.o \ game/desk_click_responder.o \ game/doorbot_home_handler.o \ |