diff options
author | Paul Gilbert | 2016-02-28 21:42:13 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-02-28 21:42:13 -0500 |
commit | 6eb777fe362d77189425c2ae137bedab0af5ee5f (patch) | |
tree | 2df00b84121ccb83115cacd8a62ef686e125dbfc /engines/titanic/game/sgt | |
parent | 0471a25575d7cabff26f8abbace55c1dadaf6320 (diff) | |
download | scummvm-rg350-6eb777fe362d77189425c2ae137bedab0af5ee5f.tar.gz scummvm-rg350-6eb777fe362d77189425c2ae137bedab0af5ee5f.tar.bz2 scummvm-rg350-6eb777fe362d77189425c2ae137bedab0af5ee5f.zip |
TITANIC: Added a lot of class definitions
Let's be honest here, it's a s**t-load of class definitions
Diffstat (limited to 'engines/titanic/game/sgt')
-rw-r--r-- | engines/titanic/game/sgt/sgt_doors.cpp | 43 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_doors.h | 54 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_navigation.cpp | 37 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_navigation.h | 50 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_restaurant_doors.cpp | 37 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_restaurant_doors.h | 50 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_state_room.cpp | 85 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_state_room.h | 77 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_upper_doors_sound.cpp | 45 | ||||
-rw-r--r-- | engines/titanic/game/sgt/sgt_upper_doors_sound.h | 52 |
10 files changed, 530 insertions, 0 deletions
diff --git a/engines/titanic/game/sgt/sgt_doors.cpp b/engines/titanic/game/sgt/sgt_doors.cpp new file mode 100644 index 0000000000..587a961ac1 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_doors.cpp @@ -0,0 +1,43 @@ +/* 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/sgt/sgt_doors.h" + +namespace Titanic { + +void CSGTDoors::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_value1, indent); + file->writeNumberLine(_value2, indent); + + CGameObject::save(file, indent); +} + +void CSGTDoors::load(SimpleFile *file) { + file->readNumber(); + _value1 = file->readNumber(); + _value2 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_doors.h b/engines/titanic/game/sgt/sgt_doors.h new file mode 100644 index 0000000000..946404936f --- /dev/null +++ b/engines/titanic/game/sgt/sgt_doors.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_SGT_DOORS_H +#define TITANIC_SGT_DOORS_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CSGTDoors : public CGameObject { +public: + int _value1, _value2; +public: + CSGTDoors() : CGameObject(), _value1(0), _value2(0) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSGTDoors"; } + + /** + * 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_SGT_DOORS_H */ diff --git a/engines/titanic/game/sgt/sgt_navigation.cpp b/engines/titanic/game/sgt/sgt_navigation.cpp new file mode 100644 index 0000000000..eba37fd4f3 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_navigation.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/sgt/sgt_navigation.h" + +namespace Titanic { + +void CSGTNavigation::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CGameObject::save(file, indent); +} + +void CSGTNavigation::load(SimpleFile *file) { + file->readNumber(); + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_navigation.h b/engines/titanic/game/sgt/sgt_navigation.h new file mode 100644 index 0000000000..15c903f35c --- /dev/null +++ b/engines/titanic/game/sgt/sgt_navigation.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_SGT_NAVIGATION_H +#define TITANIC_SGT_NAVIGATION_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CSGTNavigation : public CGameObject { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSGTNavigation"; } + + /** + * 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_SGT_NAVIGATION_H */ diff --git a/engines/titanic/game/sgt/sgt_restaurant_doors.cpp b/engines/titanic/game/sgt/sgt_restaurant_doors.cpp new file mode 100644 index 0000000000..e7d8f7bda1 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_restaurant_doors.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/sgt/sgt_restaurant_doors.h" + +namespace Titanic { + +void CSGTRestaurantDoors::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + CGameObject::save(file, indent); +} + +void CSGTRestaurantDoors::load(SimpleFile *file) { + file->readNumber(); + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_restaurant_doors.h b/engines/titanic/game/sgt/sgt_restaurant_doors.h new file mode 100644 index 0000000000..287452e074 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_restaurant_doors.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_SGT_RESTAURANT_DOORS_H +#define TITANIC_SGT_RESTAURANT_DOORS_H + +#include "titanic/core/game_object.h" + +namespace Titanic { + +class CSGTRestaurantDoors : public CGameObject { +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSGTRestaurantDoors"; } + + /** + * 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_SGT_RESTAURANT_DOORS_H */ diff --git a/engines/titanic/game/sgt/sgt_state_room.cpp b/engines/titanic/game/sgt/sgt_state_room.cpp new file mode 100644 index 0000000000..d244309351 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_state_room.cpp @@ -0,0 +1,85 @@ +/* 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/sgt/sgt_state_room.h" + +namespace Titanic { + +CSGTStateRoomStatics *_statics; + +CSGTStateRoom::CSGTStateRoom() : CBackground(), _fieldE0(1), + _fieldE4(1), _fieldE8(0), _fieldEC(1), _fieldF0(1) { +} + +void CSGTStateRoom::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_statics->_v1, indent); + file->writeQuotedLine(_statics->_v2, indent); + file->writeQuotedLine(_statics->_v3, indent); + file->writeQuotedLine(_statics->_v4, indent); + file->writeQuotedLine(_statics->_v5, indent); + file->writeQuotedLine(_statics->_v6, indent); + file->writeQuotedLine(_statics->_v7, indent); + file->writeQuotedLine(_statics->_v8, indent); + file->writeQuotedLine(_statics->_v9, indent); + file->writeQuotedLine(_statics->_v10, indent); + file->writeQuotedLine(_statics->_v11, indent); + file->writeQuotedLine(_statics->_v12, indent); + + file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_fieldE4, indent); + file->writeNumberLine(_statics->_v13, indent); + file->writeNumberLine(_statics->_v14, indent); + file->writeNumberLine(_fieldE8, indent); + file->writeNumberLine(_fieldEC, indent); + file->writeNumberLine(_fieldF0, indent); + + CBackground::save(file, indent); +} + +void CSGTStateRoom::load(SimpleFile *file) { + file->readNumber(); + _statics->_v1 = file->readString(); + _statics->_v2 = file->readString(); + _statics->_v3 = file->readString(); + _statics->_v4 = file->readString(); + _statics->_v5 = file->readString(); + _statics->_v6 = file->readString(); + _statics->_v7 = file->readString(); + _statics->_v8 = file->readString(); + _statics->_v9 = file->readString(); + _statics->_v10 = file->readString(); + _statics->_v11 = file->readString(); + _statics->_v12 = file->readString(); + + _fieldE0 = file->readNumber(); + _fieldE4 = file->readNumber(); + _statics->_v13 = file->readNumber(); + _statics->_v14 = file->readNumber(); + _fieldE8 = file->readNumber(); + _fieldEC = file->readNumber(); + _fieldF0 = file->readNumber(); + + CBackground::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_state_room.h b/engines/titanic/game/sgt/sgt_state_room.h new file mode 100644 index 0000000000..ba70e541a3 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_state_room.h @@ -0,0 +1,77 @@ +/* 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_SGT_STATE_ROOM_H +#define TITANIC_SGT_STATE_ROOM_H + +#include "titanic/core/background.h" + +namespace Titanic { + +struct CSGTStateRoomStatics { + CString _v1; + CString _v2; + CString _v3; + CString _v4; + CString _v5; + CString _v6; + CString _v7; + CString _v8; + CString _v9; + CString _v10; + CString _v11; + CString _v12; + int _v13; + int _v14; +}; + +class CSGTStateRoom : public CBackground { +private: + CSGTStateRoomStatics *_statics; +private: + int _fieldE0; + int _fieldE4; + int _fieldE8; + int _fieldEC; + int _fieldF0; +public: + CSGTStateRoom(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSGTStateRoom"; } + + /** + * 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_SGT_STATE_ROOM_H */ diff --git a/engines/titanic/game/sgt/sgt_upper_doors_sound.cpp b/engines/titanic/game/sgt/sgt_upper_doors_sound.cpp new file mode 100644 index 0000000000..83a500e022 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_upper_doors_sound.cpp @@ -0,0 +1,45 @@ +/* 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/sgt/sgt_upper_doors_sound.h" + +namespace Titanic { + +CSGTUpperDoorsSound::CSGTUpperDoorsSound() { + _string2 = "b#53.wav"; +} + +void CSGTUpperDoorsSound::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeQuotedLine(_string2, indent); + + CClickResponder::save(file, indent); +} + +void CSGTUpperDoorsSound::load(SimpleFile *file) { + file->readNumber(); + _string2 = file->readString(); + + CClickResponder::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/sgt/sgt_upper_doors_sound.h b/engines/titanic/game/sgt/sgt_upper_doors_sound.h new file mode 100644 index 0000000000..ed97627315 --- /dev/null +++ b/engines/titanic/game/sgt/sgt_upper_doors_sound.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_SGT_UPPER_DOORS_SOUND_H +#define TITANIC_SGT_UPPER_DOORS_SOUND_H + +#include "titanic/core/click_responder.h" + +namespace Titanic { + +class CSGTUpperDoorsSound : public CClickResponder { +public: + CSGTUpperDoorsSound(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CSGTUpperDoorsSound"; } + + /** + * 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_SGT_UPPER_DOORS_SOUND_H */ |