diff options
Diffstat (limited to 'engines/titanic')
27 files changed, 1005 insertions, 22 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index 7a8a082a37..2c3d070245 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -25,8 +25,8 @@ #include "titanic/titanic.h" #include "titanic/compressed_file.h" #include "titanic/core/dont_save_file_item.h" -#include "titanic/core/pet_control.h" #include "titanic/core/project_item.h" +#include "titanic/game/pet/pet_control.h" namespace Titanic { diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index 8966ea6e67..937fef9864 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -70,7 +70,6 @@ #include "titanic/core/movie_clip.h" #include "titanic/core/multi_drop_target.h" #include "titanic/core/node_item.h" -#include "titanic/core/pet_control.h" #include "titanic/core/project_item.h" #include "titanic/core/saveable_object.h" #include "titanic/core/static_image.h" @@ -162,6 +161,9 @@ #include "titanic/game/nose_holder.h" #include "titanic/game/null_port_hole.h" #include "titanic/game/nut_replacer.h" +#include "titanic/game/pet/pet_control.h" +#include "titanic/game/pet/pet_control_sub_base.h" +#include "titanic/game/pet/pet_control_sub1.h" #include "titanic/game/pet_disabler.h" #include "titanic/game/phonograph.h" #include "titanic/game/phonograph_lid.h" @@ -450,7 +452,6 @@ DEFFN(CMovieClip); DEFFN(CMovieClipList); DEFFN(CMultiDropTarget); DEFFN(CNodeItem); -DEFFN(CPetControl); DEFFN(CProjectItem); DEFFN(CStaticImage); DEFFN(CTurnOnObject); @@ -602,6 +603,7 @@ DEFFN(CPET); DEFFN(CPETClass1); DEFFN(CPETClass2); DEFFN(CPETClass3); +DEFFN(CPetControl); DEFFN(CPetDragChev); DEFFN(CPetGraphic); DEFFN(CPetGraphic2); @@ -993,7 +995,6 @@ void CSaveableObject::initClassList() { ADDFN(CMovieClipList); ADDFN(CMultiDropTarget); ADDFN(CNodeItem); - ADDFN(CPetControl); ADDFN(CProjectItem); ADDFN(CStaticImage); ADDFN(CTurnOnObject); @@ -1146,6 +1147,7 @@ void CSaveableObject::initClassList() { ADDFN(CPETClass1); ADDFN(CPETClass2); ADDFN(CPETClass3); + ADDFN(CPetControl); ADDFN(CPetDragChev); ADDFN(CPetGraphic); ADDFN(CPetGraphic2); diff --git a/engines/titanic/game/pet/pet_control.cpp b/engines/titanic/game/pet/pet_control.cpp new file mode 100644 index 0000000000..f85b767a85 --- /dev/null +++ b/engines/titanic/game/pet/pet_control.cpp @@ -0,0 +1,79 @@ +/* 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/pet/pet_control.h" + +namespace Titanic { + +void CPetControl::save(SimpleFile *file, int indent) const { + file->writeNumberLine(0, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeQuotedLine(_string1, indent); + file->writeQuotedLine(_string2, indent); + + saveSubObjects(file, indent); + CGameObject::save(file, indent); +} + +void CPetControl::load(SimpleFile *file) { + int val = file->readNumber(); + // TODO: sub_43A9E0 + + if (!val) { + _fieldBC = file->readNumber(); + _string1 = file->readString(); + _string2 = file->readString(); + + loadSubObjects(file); + } + + CGameObject::load(file); +} + +void CPetControl::gameLoaded() { + // TODO +} + +void CPetControl::loadSubObjects(SimpleFile *file) { + _sub1.load(file); + _sub2.load(file); + _sub3.load(file); + _sub4.load(file); + _sub5.load(file); + _sub6.load(file); + _sub7.load(file); + _sub8.load(file); +} + +void CPetControl::saveSubObjects(SimpleFile *file, int indent) const { + _sub1.save(file, indent); + _sub2.save(file, indent); + _sub3.save(file, indent); + _sub4.save(file, indent); + _sub5.save(file, indent); + _sub6.save(file, indent); + _sub7.save(file, indent); + _sub8.save(file, indent); +} + + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control.h b/engines/titanic/game/pet/pet_control.h new file mode 100644 index 0000000000..33fa11d847 --- /dev/null +++ b/engines/titanic/game/pet/pet_control.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_H +#define TITANIC_PET_CONTROL_H + +#include "titanic/core/game_object.h" +#include "titanic/game/pet/pet_control_sub1.h" +#include "titanic/game/pet/pet_control_sub2.h" +#include "titanic/game/pet/pet_control_sub3.h" +#include "titanic/game/pet/pet_control_sub4.h" +#include "titanic/game/pet/pet_control_sub5.h" +#include "titanic/game/pet/pet_control_sub6.h" +#include "titanic/game/pet/pet_control_sub7.h" +#include "titanic/game/pet/pet_control_sub8.h" + +namespace Titanic { + +class CPetControl : public CGameObject { +private: + int _fieldBC; + int _fieldC0; + int _fieldC4; + int _fieldC8; + CPetControlSub1 _sub1; + CPetControlSub2 _sub2; + CPetControlSub3 _sub3; + CPetControlSub4 _sub4; + CPetControlSub5 _sub5; + CPetControlSub6 _sub6; + CPetControlSub7 _sub7; + CPetControlSub8 _sub8; + int _field1384; + CString _string1; + int _field1394; + CString _string2; + int _field13A4; +private: + void loadSubObjects(SimpleFile *file); + + void saveSubObjects(SimpleFile *file, int indent) const; +public: + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CPetControl"; } + + /** + * 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); + + /** + * Called after loading a game has finished + */ + void gameLoaded(); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_CONTROL_H */ diff --git a/engines/titanic/core/pet_control.h b/engines/titanic/game/pet/pet_control_sub1.cpp index b1dc4610ae..5aa84bd192 100644 --- a/engines/titanic/core/pet_control.h +++ b/engines/titanic/game/pet/pet_control_sub1.cpp @@ -20,21 +20,16 @@ * */ -#ifndef TITANIC_PET_CONTROL_H -#define TITANIC_PET_CONTROL_H - -#include "titanic/core/game_object.h" +#include "titanic/game/pet/pet_control_sub1.h" namespace Titanic { -class CPetControl : public CGameObject { -public: - /** - * Called after loading a game has finished - */ - void gameLoaded(); -}; +void CPetControlSub1::save(SimpleFile *file, int indent) const { -} // End of namespace Titanic +} + +void CPetControlSub1::load(SimpleFile *file) { -#endif /* TITANIC_PET_CONTROL_H */ +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub1.h b/engines/titanic/game/pet/pet_control_sub1.h new file mode 100644 index 0000000000..31e1129cae --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub1.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB1_H +#define TITANIC_PET_CONTROL_SUB1_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub1 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_H */ diff --git a/engines/titanic/game/pet/pet_control_sub2.cpp b/engines/titanic/game/pet/pet_control_sub2.cpp new file mode 100644 index 0000000000..c8c905ef3c --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub2.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub2.h" + +namespace Titanic { + +void CPetControlSub2::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub2::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub2.h b/engines/titanic/game/pet/pet_control_sub2.h new file mode 100644 index 0000000000..c4e2b208fd --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub2.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB2_H +#define TITANIC_PET_CONTROL_SUB2_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub2 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB2_H */ diff --git a/engines/titanic/game/pet/pet_control_sub3.cpp b/engines/titanic/game/pet/pet_control_sub3.cpp new file mode 100644 index 0000000000..5504b1384f --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub3.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub3.h" + +namespace Titanic { + +void CPetControlSub3::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub3::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub3.h b/engines/titanic/game/pet/pet_control_sub3.h new file mode 100644 index 0000000000..1b67a1eb1f --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub3.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB3_H +#define TITANIC_PET_CONTROL_SUB3_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub3 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB3_H */ diff --git a/engines/titanic/game/pet/pet_control_sub4.cpp b/engines/titanic/game/pet/pet_control_sub4.cpp new file mode 100644 index 0000000000..eb605b8826 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub4.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub4.h" + +namespace Titanic { + +void CPetControlSub4::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub4::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub4.h b/engines/titanic/game/pet/pet_control_sub4.h new file mode 100644 index 0000000000..426137e519 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub4.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB4_H +#define TITANIC_PET_CONTROL_SUB4_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub4 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB4_H */ diff --git a/engines/titanic/game/pet/pet_control_sub5.cpp b/engines/titanic/game/pet/pet_control_sub5.cpp new file mode 100644 index 0000000000..d46b3db16c --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub5.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub5.h" + +namespace Titanic { + +void CPetControlSub5::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub5::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub5.h b/engines/titanic/game/pet/pet_control_sub5.h new file mode 100644 index 0000000000..d76cf8f8cc --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub5.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB5_H +#define TITANIC_PET_CONTROL_SUB5_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub5 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB5_H */ diff --git a/engines/titanic/game/pet/pet_control_sub6.cpp b/engines/titanic/game/pet/pet_control_sub6.cpp new file mode 100644 index 0000000000..2a3f26e0fa --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub6.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub6.h" + +namespace Titanic { + +void CPetControlSub6::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub6::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub6.h b/engines/titanic/game/pet/pet_control_sub6.h new file mode 100644 index 0000000000..4417665e16 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub6.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB6_H +#define TITANIC_PET_CONTROL_SUB6_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub6 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB6_H */ diff --git a/engines/titanic/game/pet/pet_control_sub7.cpp b/engines/titanic/game/pet/pet_control_sub7.cpp new file mode 100644 index 0000000000..7be9b11bc5 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub7.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub7.h" + +namespace Titanic { + +void CPetControlSub7::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub7::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub7.h b/engines/titanic/game/pet/pet_control_sub7.h new file mode 100644 index 0000000000..cc42f9e27f --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub7.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB7_H +#define TITANIC_PET_CONTROL_SUB7_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub7 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB7_H */ diff --git a/engines/titanic/game/pet/pet_control_sub8.cpp b/engines/titanic/game/pet/pet_control_sub8.cpp new file mode 100644 index 0000000000..f88e8fdcf0 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub8.cpp @@ -0,0 +1,35 @@ +/* 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/pet/pet_control_sub8.h" + +namespace Titanic { + +void CPetControlSub8::save(SimpleFile *file, int indent) const { + +} + +void CPetControlSub8::load(SimpleFile *file) { + +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub8.h b/engines/titanic/game/pet/pet_control_sub8.h new file mode 100644 index 0000000000..76dc6b1688 --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub8.h @@ -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. + * + */ + +#ifndef TITANIC_PET_CONTROL_SUB8_H +#define TITANIC_PET_CONTROL_SUB8_H + +#include "titanic/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +class CPetControlSub8 : public CPetControlSubBase { +public: + /** + * 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_PET_CONTROL_SUB8_H */ diff --git a/engines/titanic/game/pet/pet_control_sub_base.cpp b/engines/titanic/game/pet/pet_control_sub_base.cpp new file mode 100644 index 0000000000..9afb18895e --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub_base.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/game/pet/pet_control_sub_base.h" + +namespace Titanic { + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_control_sub_base.h b/engines/titanic/game/pet/pet_control_sub_base.h new file mode 100644 index 0000000000..b11f5cc78b --- /dev/null +++ b/engines/titanic/game/pet/pet_control_sub_base.h @@ -0,0 +1,49 @@ +/* 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_SUB_BASE_H +#define TITANIC_PET_CONTROL_SUB_BASE_H + +#include "titanic/simple_file.h" + +namespace Titanic { + +class CPetControlSubBase { +protected: + int _field4; +public: + CPetControlSubBase() : _field4(0) {} + + /** + * Save the data for the class to file + */ + virtual void save(SimpleFile *file, int indent) const = 0; + + /** + * Load the data for the class from file + */ + virtual void load(SimpleFile *file) = 0; +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_CONTROL_SUB_BASE_H */ diff --git a/engines/titanic/core/pet_control.cpp b/engines/titanic/game/pet/pet_val.cpp index eee18269d2..b978a8b724 100644 --- a/engines/titanic/core/pet_control.cpp +++ b/engines/titanic/game/pet/pet_val.cpp @@ -20,12 +20,9 @@ * */ -#include "titanic/core/pet_control.h" +#include "titanic/game/pet/pet_val.h" namespace Titanic { -void CPetControl::gameLoaded() { - // TODO -} } // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_val.h b/engines/titanic/game/pet/pet_val.h new file mode 100644 index 0000000000..f5cae8222d --- /dev/null +++ b/engines/titanic/game/pet/pet_val.h @@ -0,0 +1,41 @@ +/* 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_VAL_H +#define TITANIC_PET_VAL_H + +#include "titanic/game/pet/pet_val_base.h" + +namespace Titanic { + +class CPetVal: public CPetValBase { +private: + int _field18; + int _field1C; + int _field20; +public: + CPetVal() : CPetValBase(), _field18(0), _field1C(0), _field20(0) {} +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_VAL_H */ diff --git a/engines/titanic/game/pet/pet_val_base.cpp b/engines/titanic/game/pet/pet_val_base.cpp new file mode 100644 index 0000000000..d77f366436 --- /dev/null +++ b/engines/titanic/game/pet/pet_val_base.cpp @@ -0,0 +1,31 @@ +/* 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/pet/pet_val_base.h" + +namespace Titanic { + +CPetValBase::CPetValBase() : _field4(0), _field8(0), + _fieldC(0), _field10(0), _field14(0) { +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/pet/pet_val_base.h b/engines/titanic/game/pet/pet_val_base.h new file mode 100644 index 0000000000..310b0675b1 --- /dev/null +++ b/engines/titanic/game/pet/pet_val_base.h @@ -0,0 +1,61 @@ +/* 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_VAL_BASE_H +#define TITANIC_PET_VAL_BASE_H + +namespace Titanic { + +class CPetValBase { +protected: + int _field4; + int _field8; + int _fieldC; + int _field10; + int _field14; +public: + CPetValBase(); + + virtual void proc1() {} + virtual void proc2() {} + virtual void proc3() {} + virtual void proc4() {} + + virtual void proc5() {} + + virtual void proc6() {} + virtual void proc7() {} + virtual void proc8() {} + virtual void proc9() {} + virtual void proc10() {} + virtual void proc11() {} + virtual void proc12() {} + virtual void proc13() {} + virtual void proc14() {} + virtual void proc15() {} + virtual void proc16() {} + virtual void proc17() {} +}; + +} // End of namespace Titanic + +#endif /* TITANIC_PET_VAL_BASE_H */ diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index de45be024c..9edb440fa4 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -67,7 +67,6 @@ MODULE_OBJS := \ core/multi_drop_target.o \ core/named_item.o \ core/node_item.o \ - core/pet_control.o \ core/project_item.o \ core/resource_key.o \ core/saveable_object.o \ @@ -236,12 +235,24 @@ MODULE_OBJS := \ game/pet/pet_class3.o \ game/pet/pet_lift.o \ game/pet/pet_monitor.o \ + game/pet/pet_control.o \ + game/pet/pet_control_sub_base.o \ + game/pet/pet_control_sub1.o \ + game/pet/pet_control_sub2.o \ + game/pet/pet_control_sub3.o \ + game/pet/pet_control_sub4.o \ + game/pet/pet_control_sub5.o \ + game/pet/pet_control_sub6.o \ + game/pet/pet_control_sub7.o \ + game/pet/pet_control_sub8.o \ game/pet/pet_pellerator.o \ game/pet/pet_position.o \ game/pet/pet_sentinal.o \ game/pet/pet_sounds.o \ game/pet/pet_transition.o \ game/pet/pet_transport.o \ + game/pet/pet_val_base.o \ + game/pet/pet_val.o \ game/pickup/pick_up.o \ game/pickup/pick_up_bar_glass.o \ game/pickup/pick_up_hose.o \ |