From 8a45f47c2e1e483b5a17b2d4abe22473eaf1e143 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 29 Mar 2016 21:19:12 -0400 Subject: TITANIC: More renamings of PET sections --- engines/titanic/module.mk | 6 +- engines/titanic/pet_control/pet_control.cpp | 24 ++++---- engines/titanic/pet_control/pet_control.h | 14 ++--- engines/titanic/pet_control/pet_control_sub1.cpp | 42 ------------- engines/titanic/pet_control/pet_control_sub1.h | 69 ---------------------- engines/titanic/pet_control/pet_control_sub2.cpp | 59 ------------------ engines/titanic/pet_control/pet_control_sub2.h | 69 ---------------------- engines/titanic/pet_control/pet_control_sub3.cpp | 27 --------- engines/titanic/pet_control/pet_control_sub3.h | 55 ----------------- .../pet_control/pet_conversation_section.cpp | 43 ++++++++++++++ .../titanic/pet_control/pet_conversation_section.h | 69 ++++++++++++++++++++++ engines/titanic/pet_control/pet_remote_section.cpp | 27 +++++++++ engines/titanic/pet_control/pet_remote_section.h | 55 +++++++++++++++++ engines/titanic/pet_control/pet_rooms_section.cpp | 59 ++++++++++++++++++ engines/titanic/pet_control/pet_rooms_section.h | 69 ++++++++++++++++++++++ 15 files changed, 344 insertions(+), 343 deletions(-) delete mode 100644 engines/titanic/pet_control/pet_control_sub1.cpp delete mode 100644 engines/titanic/pet_control/pet_control_sub1.h delete mode 100644 engines/titanic/pet_control/pet_control_sub2.cpp delete mode 100644 engines/titanic/pet_control/pet_control_sub2.h delete mode 100644 engines/titanic/pet_control/pet_control_sub3.cpp delete mode 100644 engines/titanic/pet_control/pet_control_sub3.h create mode 100644 engines/titanic/pet_control/pet_conversation_section.cpp create mode 100644 engines/titanic/pet_control/pet_conversation_section.h create mode 100644 engines/titanic/pet_control/pet_remote_section.cpp create mode 100644 engines/titanic/pet_control/pet_remote_section.h create mode 100644 engines/titanic/pet_control/pet_rooms_section.cpp create mode 100644 engines/titanic/pet_control/pet_rooms_section.h diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 914df8cdb0..3e018a25c5 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -382,10 +382,10 @@ MODULE_OBJS := \ pet_control/pet_control.o \ pet_control/pet_control_list_item.o \ pet_control/pet_control_list_item2.o \ + pet_control/pet_conversation_section.o \ pet_control/pet_section.o \ - pet_control/pet_control_sub1.o \ - pet_control/pet_control_sub2.o \ - pet_control/pet_control_sub3.o \ + pet_control/pet_rooms_section.o \ + pet_control/pet_remote_section.o \ pet_control/pet_inventory_section.o \ pet_control/pet_control_sub5.o \ pet_control/pet_control_sub6.o \ diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp index f3e78a2212..7ef4c1494b 100644 --- a/engines/titanic/pet_control/pet_control.cpp +++ b/engines/titanic/pet_control/pet_control.cpp @@ -52,17 +52,17 @@ void CPetControl::load(SimpleFile *file) { } bool CPetControl::isValid() const { - return _sub1.isValid() && _sub2.isValid() - && _sub3.isValid() && _sub4.isValid() + return _convSection.isValid() && _roomsSection.isValid() + && _remoteSection.isValid() && _invSection.isValid() && _sub5.isValid() && _sub6.isValid() && _sub7.isValid() && _sub8.isValid(); } void CPetControl::loadSubObjects(SimpleFile *file, int param) { - _sub1.load(file, param); - _sub2.load(file, param); - _sub3.load(file, param); - _sub4.load(file, param); + _convSection.load(file, param); + _roomsSection.load(file, param); + _remoteSection.load(file, param); + _invSection.load(file, param); _sub5.load(file, param); _sub6.load(file, param); _sub7.load(file, param); @@ -70,10 +70,10 @@ void CPetControl::loadSubObjects(SimpleFile *file, int param) { } void CPetControl::saveSubObjects(SimpleFile *file, int indent) const { - _sub1.save(file, indent); - _sub2.save(file, indent); - _sub3.save(file, indent); - _sub4.save(file, indent); + _convSection.save(file, indent); + _roomsSection.save(file, indent); + _remoteSection.save(file, indent); + _invSection.save(file, indent); _sub5.save(file, indent); _sub6.save(file, indent); _sub7.save(file, indent); @@ -93,8 +93,8 @@ void CPetControl::enterNode(CNodeItem *node) { } void CPetControl::enterRoom(CRoomItem *room) { - _sub2.enterRoom(room); - _sub3.enterRoom(room); + _roomsSection.enterRoom(room); + _remoteSection.enterRoom(room); } void CPetControl::clear() { diff --git a/engines/titanic/pet_control/pet_control.h b/engines/titanic/pet_control/pet_control.h index e4ea16ef46..d6fc9d01a2 100644 --- a/engines/titanic/pet_control/pet_control.h +++ b/engines/titanic/pet_control/pet_control.h @@ -26,10 +26,10 @@ #include "titanic/core/game_object.h" #include "titanic/core/node_item.h" #include "titanic/core/room_item.h" -#include "titanic/pet_control/pet_control_sub1.h" -#include "titanic/pet_control/pet_control_sub2.h" -#include "titanic/pet_control/pet_control_sub3.h" +#include "titanic/pet_control/pet_conversation_section.h" #include "titanic/pet_control/pet_inventory_section.h" +#include "titanic/pet_control/pet_remote_section.h" +#include "titanic/pet_control/pet_rooms_section.h" #include "titanic/pet_control/pet_control_sub5.h" #include "titanic/pet_control/pet_control_sub6.h" #include "titanic/pet_control/pet_control_sub7.h" @@ -43,10 +43,10 @@ private: int _fieldC0; int _fieldC4; int _fieldC8; - CPetControlSub1 _sub1; - CPetControlSub2 _sub2; - CPetControlSub3 _sub3; - CPetInventorySection _sub4; + CPetConversationSection _convSection; + CPetInventorySection _invSection; + CPetRemoteSection _remoteSection; + CPetRoomsSection _roomsSection; CPetControlSub5 _sub5; CPetControlSub6 _sub6; CPetControlSub7 _sub7; diff --git a/engines/titanic/pet_control/pet_control_sub1.cpp b/engines/titanic/pet_control/pet_control_sub1.cpp deleted file mode 100644 index 0daae0637d..0000000000 --- a/engines/titanic/pet_control/pet_control_sub1.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* 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/pet_control/pet_control_sub1.h" - -namespace Titanic { - -CPetControlSub1::CPetControlSub1() : _field414(0), _field418(0) { -} - -void CPetControlSub1::save(SimpleFile *file, int indent) const { - -} - -void CPetControlSub1::load(SimpleFile *file, int param) { - _sub2.load(file, param); - _sub1.load(file, param); - - for (int idx = 0; idx < 3; ++idx) - _valArray3[idx] = file->readNumber(); -} - -} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_control_sub1.h b/engines/titanic/pet_control/pet_control_sub1.h deleted file mode 100644 index 8812581f80..0000000000 --- a/engines/titanic/pet_control/pet_control_sub1.h +++ /dev/null @@ -1,69 +0,0 @@ -/* 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_PET_CONTROL_SUB1_H -#define TITANIC_PET_CONTROL_SUB1_H - -#include "titanic/pet_control/pet_section.h" -#include "titanic/pet_control/pet_control_sub12.h" -#include "titanic/pet_control/pet_val.h" - -namespace Titanic { - -class CPetControlSub1 : public CPetSection { -private: - CPetVal _val1; - CPetVal _val2; - CPetVal _val3; - CPetVal _valArray1[3]; - CPetVal _val4; - CPetVal _val5; - CPetVal _val6; - int _field14C; - CPetVal _val7; - CPetVal _val8; - CPetVal _val9; - CPetVal _valArray2[9]; - int _field30C; - CPetControlSub12 _sub1; - CPetControlSub12 _sub2; - int _valArray3[3]; - int _field414; - int _field418; - CString _string1; -public: - CPetControlSub1(); - - /** - * 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, int param); -}; - -} // End of namespace Titanic - -#endif /* TITANIC_PET_CONTROL_SUB1_H */ diff --git a/engines/titanic/pet_control/pet_control_sub2.cpp b/engines/titanic/pet_control/pet_control_sub2.cpp deleted file mode 100644 index 2e8b35e2f0..0000000000 --- a/engines/titanic/pet_control/pet_control_sub2.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* 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/pet_control/pet_control_sub2.h" - -namespace Titanic { - -CPetControlSub2::CPetControlSub2() : - _field100(0), _field104(0), _field108(0), _field10C(0), - _field110(0), _field114(0), _field118(0), _field11C(0), - _field1C0(0), _field1C4(0), _field1C8(0), _field1CC(0), - _field1D0(0), _field1D4(0) { -} - -void CPetControlSub2::save(SimpleFile *file, int indent) const { - -} - -void CPetControlSub2::load(SimpleFile *file, int param) { - if (!param) { - int count = file->readNumber(); - - for (int idx = 0; idx < count; ++idx) { - int v1 = file->readNumber(); - int v2 = file->readNumber(); - warning("TODO: CPetControlSub2::load - %d,%d", v1, v2); - } - - _listItem.setField34(file->readNumber()); - file->readNumber(); - _field1C0 = file->readNumber(); - _field1C4 = file->readNumber(); - _field1C8 = file->readNumber(); - _field1CC = file->readNumber(); - _field1D0 = file->readNumber(); - _field1D4 = file->readNumber(); - } -} - -} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_control_sub2.h b/engines/titanic/pet_control/pet_control_sub2.h deleted file mode 100644 index a3eb834b74..0000000000 --- a/engines/titanic/pet_control/pet_control_sub2.h +++ /dev/null @@ -1,69 +0,0 @@ -/* 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_PET_CONTROL_SUB2_H -#define TITANIC_PET_CONTROL_SUB2_H - -#include "titanic/pet_control/pet_section.h" -#include "titanic/pet_control/pet_control_sub11.h" -#include "titanic/pet_control/pet_control_sub12.h" -#include "titanic/pet_control/pet_control_list_item2.h" - -namespace Titanic { - -class CPetControlSub2 : public CPetSection { -private: - CPetControlSub11 _sub11; - CPetControlListItem2 _listItem; - int _field100; - int _field104; - int _field108; - int _field10C; - int _field110; - int _field114; - int _field118; - int _field11C; - CPetVal _val1; - CPetControlSub12 _sub12; - int _field1C0; - int _field1C4; - int _field1C8; - int _field1CC; - int _field1D0; - int _field1D4; -public: - CPetControlSub2(); - - /** - * 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, int param); -}; - -} // End of namespace Titanic - -#endif /* TITANIC_PET_CONTROL_SUB2_H */ diff --git a/engines/titanic/pet_control/pet_control_sub3.cpp b/engines/titanic/pet_control/pet_control_sub3.cpp deleted file mode 100644 index d134b1bbc3..0000000000 --- a/engines/titanic/pet_control/pet_control_sub3.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* 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/pet_control/pet_control_sub3.h" - -namespace Titanic { - -} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_control_sub3.h b/engines/titanic/pet_control/pet_control_sub3.h deleted file mode 100644 index 4143697d6d..0000000000 --- a/engines/titanic/pet_control/pet_control_sub3.h +++ /dev/null @@ -1,55 +0,0 @@ -/* 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_PET_CONTROL_SUB3_H -#define TITANIC_PET_CONTROL_SUB3_H - -#include "titanic/pet_control/pet_section.h" -#include "titanic/pet_control/pet_control_sub10.h" -#include "titanic/pet_control/pet_control_sub12.h" -#include "titanic/pet_control/pet_val.h" - -namespace Titanic { - -class CPetControlSub3 : public CPetSection { -private: - CPetControlSub10 _sub10; - CPetVal _val1; - CPetVal _val2; - CPetVal _val3; - CPetVal _val4; - CPetVal _val5; - CPetVal _val6; - CPetVal _val7; - CPetVal _val8; - CPetVal _val9; - CPetVal _val10; - CPetVal _val11; - CPetControlSub12 _sub12; -public: - - -}; - -} // End of namespace Titanic - -#endif /* TITANIC_PET_CONTROL_SUB3_H */ diff --git a/engines/titanic/pet_control/pet_conversation_section.cpp b/engines/titanic/pet_control/pet_conversation_section.cpp new file mode 100644 index 0000000000..890a03dac6 --- /dev/null +++ b/engines/titanic/pet_control/pet_conversation_section.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/pet_control/pet_conversation_section.h" + +namespace Titanic { + +CPetConversationSection::CPetConversationSection() : CPetSection(), + _field414(0), _field418(0) { +} + +void CPetConversationSection::save(SimpleFile *file, int indent) const { + +} + +void CPetConversationSection::load(SimpleFile *file, int param) { + _sub2.load(file, param); + _sub1.load(file, param); + + for (int idx = 0; idx < 3; ++idx) + _valArray3[idx] = file->readNumber(); +} + +} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_conversation_section.h b/engines/titanic/pet_control/pet_conversation_section.h new file mode 100644 index 0000000000..c9f4547a20 --- /dev/null +++ b/engines/titanic/pet_control/pet_conversation_section.h @@ -0,0 +1,69 @@ +/* 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_PET_CONVERSATION_SECTION_H +#define TITANIC_PET_CONVERSATION_SECTION_H + +#include "titanic/pet_control/pet_section.h" +#include "titanic/pet_control/pet_control_sub12.h" +#include "titanic/pet_control/pet_val.h" + +namespace Titanic { + +class CPetConversationSection : public CPetSection { +private: + CPetVal _val1; + CPetVal _val2; + CPetVal _val3; + CPetVal _valArray1[3]; + CPetVal _val4; + CPetVal _val5; + CPetVal _val6; + int _field14C; + CPetVal _val7; + CPetVal _val8; + CPetVal _val9; + CPetVal _valArray2[9]; + int _field30C; + CPetControlSub12 _sub1; + CPetControlSub12 _sub2; + int _valArray3[3]; + int _field414; + int _field418; + CString _string1; +public: + CPetConversationSection(); + + /** + * 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, int param); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_CONVERSATION_SECTION_H */ diff --git a/engines/titanic/pet_control/pet_remote_section.cpp b/engines/titanic/pet_control/pet_remote_section.cpp new file mode 100644 index 0000000000..7cdde01252 --- /dev/null +++ b/engines/titanic/pet_control/pet_remote_section.cpp @@ -0,0 +1,27 @@ +/* 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/pet_control/pet_remote_section.h" + +namespace Titanic { + +} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_remote_section.h b/engines/titanic/pet_control/pet_remote_section.h new file mode 100644 index 0000000000..e3b543c3fa --- /dev/null +++ b/engines/titanic/pet_control/pet_remote_section.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_PET_REMOTE_SECTION_H +#define TITANIC_PET_REMOTE_SECTION_H + +#include "titanic/pet_control/pet_section.h" +#include "titanic/pet_control/pet_control_sub10.h" +#include "titanic/pet_control/pet_control_sub12.h" +#include "titanic/pet_control/pet_val.h" + +namespace Titanic { + +class CPetRemoteSection : public CPetSection { +private: + CPetControlSub10 _sub10; + CPetVal _val1; + CPetVal _val2; + CPetVal _val3; + CPetVal _val4; + CPetVal _val5; + CPetVal _val6; + CPetVal _val7; + CPetVal _val8; + CPetVal _val9; + CPetVal _val10; + CPetVal _val11; + CPetControlSub12 _sub12; +public: + + +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_REMOTE_SECTION_H */ diff --git a/engines/titanic/pet_control/pet_rooms_section.cpp b/engines/titanic/pet_control/pet_rooms_section.cpp new file mode 100644 index 0000000000..b866fb349d --- /dev/null +++ b/engines/titanic/pet_control/pet_rooms_section.cpp @@ -0,0 +1,59 @@ +/* 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/pet_control/pet_rooms_section.h" + +namespace Titanic { + +CPetRoomsSection::CPetRoomsSection() : + _field100(0), _field104(0), _field108(0), _field10C(0), + _field110(0), _field114(0), _field118(0), _field11C(0), + _field1C0(0), _field1C4(0), _field1C8(0), _field1CC(0), + _field1D0(0), _field1D4(0) { +} + +void CPetRoomsSection::save(SimpleFile *file, int indent) const { + +} + +void CPetRoomsSection::load(SimpleFile *file, int param) { + if (!param) { + int count = file->readNumber(); + + for (int idx = 0; idx < count; ++idx) { + int v1 = file->readNumber(); + int v2 = file->readNumber(); + warning("TODO: CPetRoomsSection::load - %d,%d", v1, v2); + } + + _listItem.setField34(file->readNumber()); + file->readNumber(); + _field1C0 = file->readNumber(); + _field1C4 = file->readNumber(); + _field1C8 = file->readNumber(); + _field1CC = file->readNumber(); + _field1D0 = file->readNumber(); + _field1D4 = file->readNumber(); + } +} + +} // End of namespace Titanic diff --git a/engines/titanic/pet_control/pet_rooms_section.h b/engines/titanic/pet_control/pet_rooms_section.h new file mode 100644 index 0000000000..54996fa950 --- /dev/null +++ b/engines/titanic/pet_control/pet_rooms_section.h @@ -0,0 +1,69 @@ +/* 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_PET_ROOMS_SECTION_H +#define TITANIC_PET_ROOMS_SECTION_H + +#include "titanic/pet_control/pet_section.h" +#include "titanic/pet_control/pet_control_sub11.h" +#include "titanic/pet_control/pet_control_sub12.h" +#include "titanic/pet_control/pet_control_list_item2.h" + +namespace Titanic { + +class CPetRoomsSection : public CPetSection { +private: + CPetControlSub11 _sub11; + CPetControlListItem2 _listItem; + int _field100; + int _field104; + int _field108; + int _field10C; + int _field110; + int _field114; + int _field118; + int _field11C; + CPetVal _val1; + CPetControlSub12 _sub12; + int _field1C0; + int _field1C4; + int _field1C8; + int _field1CC; + int _field1D0; + int _field1D4; +public: + CPetRoomsSection(); + + /** + * 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, int param); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_ROOMS_SECTION_H */ -- cgit v1.2.3