diff options
-rw-r--r-- | engines/titanic/carry/bridge_piece.cpp | 7 | ||||
-rw-r--r-- | engines/titanic/carry/bridge_piece.h | 3 | ||||
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 38 | ||||
-rw-r--r-- | engines/titanic/game/bottom_of_well_monitor.cpp | 7 | ||||
-rw-r--r-- | engines/titanic/game/bottom_of_well_monitor.h | 1 | ||||
-rw-r--r-- | engines/titanic/game/brain_slot.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/game/brain_slot.h | 5 | ||||
-rw-r--r-- | engines/titanic/game/code_wheel.cpp | 48 | ||||
-rw-r--r-- | engines/titanic/game/code_wheel.h | 56 | ||||
-rw-r--r-- | engines/titanic/game/head_slot.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/game/missiveomat_button.cpp | 41 | ||||
-rw-r--r-- | engines/titanic/game/missiveomat_button.h | 54 | ||||
-rw-r--r-- | engines/titanic/game/ship_setting_button.cpp | 11 | ||||
-rw-r--r-- | engines/titanic/game/ship_setting_button.h | 6 | ||||
-rw-r--r-- | engines/titanic/gfx/edit_control.cpp | 72 | ||||
-rw-r--r-- | engines/titanic/gfx/edit_control.h | 66 | ||||
-rw-r--r-- | engines/titanic/module.mk | 4 |
17 files changed, 414 insertions, 11 deletions
diff --git a/engines/titanic/carry/bridge_piece.cpp b/engines/titanic/carry/bridge_piece.cpp index b9c998d9d1..e93d3c455a 100644 --- a/engines/titanic/carry/bridge_piece.cpp +++ b/engines/titanic/carry/bridge_piece.cpp @@ -24,14 +24,13 @@ namespace Titanic { -CBridgePiece::CBridgePiece() : CCarry(), - _field138(0), _field13C(0), _field140(0) { +CBridgePiece::CBridgePiece() : CCarry(), _field140(0) { } void CBridgePiece::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); file->writeQuotedLine(_string6, indent); - file->writeNumberLine(_field138, indent); + file->writePoint(_pos3, indent); file->writeNumberLine(_field140, indent); CCarry::save(file, indent); @@ -40,7 +39,7 @@ void CBridgePiece::save(SimpleFile *file, int indent) const { void CBridgePiece::load(SimpleFile *file) { file->readNumber(); _string6 = file->readString(); - _field138 = file->readNumber(); + _pos3 = file->readPoint(); _field140 = file->readNumber(); CCarry::load(file); diff --git a/engines/titanic/carry/bridge_piece.h b/engines/titanic/carry/bridge_piece.h index f38e27e6c9..50a26c9048 100644 --- a/engines/titanic/carry/bridge_piece.h +++ b/engines/titanic/carry/bridge_piece.h @@ -30,8 +30,7 @@ namespace Titanic { class CBridgePiece : public CCarry { private: CString _string6; - int _field138; - int _field13C; + Common::Point _pos3; int _field140; public: CBridgePiece(); diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index db058cb121..a29bde69cd 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -86,7 +86,9 @@ #include "titanic/game/bar_menu_button.h" #include "titanic/game/belbot_get_light.h" #include "titanic/game/bomb.h" +#include "titanic/game/bottom_of_well_monitor.h" #include "titanic/game/bowl_unlocker.h" +#include "titanic/game/brain_slot.h" #include "titanic/game/bridge_view.h" #include "titanic/game/broken_pell_base.h" #include "titanic/game/cage.h" @@ -101,6 +103,7 @@ #include "titanic/game/close_broken_pel.h" #include "titanic/game/computer.h" #include "titanic/game/computer_screen.h" +#include "titanic/game/code_wheel.h" #include "titanic/game/cookie.h" #include "titanic/game/credits.h" #include "titanic/game/credits_button.h" @@ -130,6 +133,7 @@ #include "titanic/game/hammer_clip.h" #include "titanic/game/hammer_dispensor.h" #include "titanic/game/hammer_dispensor_button.h" +#include "titanic/game/head_slot.h" #include "titanic/game/head_smash_event.h" #include "titanic/game/head_smash_lever.h" #include "titanic/game/idle_summoner.h" @@ -139,6 +143,8 @@ #include "titanic/game/little_lift_button.h" #include "titanic/game/long_stick_dispenser.h" #include "titanic/game/maitred_arm_holder.h" +#include "titanic/game/missiveomat.h" +#include "titanic/game/missiveomat_button.h" #include "titanic/game/musical_instrument.h" #include "titanic/game/music_console_button.h" #include "titanic/game/music_room_phonograph.h" @@ -148,6 +154,9 @@ #include "titanic/game/nose_holder.h" #include "titanic/game/null_port_hole.h" #include "titanic/game/nut_replacer.h" +#include "titanic/game/pet_disabler.h" +#include "titanic/game/pet_graphic.h" +#include "titanic/game/pet_graphic2.h" #include "titanic/game/phonograph.h" #include "titanic/game/play_music_button.h" #include "titanic/game/play_on_act.h" @@ -164,6 +173,7 @@ #include "titanic/game/service_elevator_door.h" #include "titanic/game/service_elevator_window.h" #include "titanic/game/ship_setting.h" +#include "titanic/game/ship_setting_button.h" #include "titanic/game/speech_dispensor.h" #include "titanic/game/starling_puret.h" #include "titanic/game/start_action.h" @@ -173,6 +183,7 @@ #include "titanic/game/television.h" #include "titanic/game/third_class_canal.h" #include "titanic/game/throw_tv_down_well.h" +#include "titanic/game/titania_still_control.h" #include "titanic/game/tow_parrot_nav.h" #include "titanic/game/up_lighter.h" #include "titanic/game/wheel_button.h" @@ -244,6 +255,7 @@ #include "titanic/gfx/chev_right_on.h" #include "titanic/gfx/chev_send_rec_switch.h" #include "titanic/gfx/chev_switch.h" +#include "titanic/gfx/edit_control.h" #include "titanic/gfx/elevator_button.h" #include "titanic/gfx/get_from_succ.h" #include "titanic/gfx/helmet_on_off.h" @@ -407,8 +419,10 @@ DEFFN(CBarBell); DEFFN(CBarMenu); DEFFN(CBarMenuButton); DEFFN(CBelbotGetLight); -DEFFN(CBowlUnlocker); DEFFN(CBomb); +DEFFN(CBottomOfWellMonitor); +DEFFN(CBowlUnlocker); +DEFFN(CBrainSlot); DEFFN(CBridgeView); DEFFN(CBrokenPellBase) DEFFN(CCage); @@ -420,6 +434,7 @@ DEFFN(CCDROMTray); DEFFN(CCellPointButton); DEFFN(CChickenDispensor); DEFFN(CCloseBrokenPel); +DEFFN(CodeWheel); DEFFN(CComputer); DEFFN(CCookie); DEFFN(CComputerScreen); @@ -451,6 +466,7 @@ DEFFN(CGlassSmasher); DEFFN(CHammerClip); DEFFN(CHammerDispensor); DEFFN(CHammerDispensorButton); +DEFFN(CHeadSlot); DEFFN(CHeadSmashEvent); DEFFN(CHeadSmashLever); DEFFN(CIdleSummoner); @@ -460,6 +476,8 @@ DEFFN(CLightSwitch); DEFFN(CLittleLiftButton); DEFFN(CLongStickDispenser); DEFFN(CMaitreDArmHolder); +DEFFN(CMissiveOMat); +DEFFN(CMissiveOMatButton); DEFFN(CMusicalInstrument); DEFFN(CMusicConsoleButton); DEFFN(CMusicRoomPhonograph); @@ -469,6 +487,9 @@ DEFFN(CNoNutBowl); DEFFN(CNoseHolder); DEFFN(CNullPortHole); DEFFN(CNutReplacer); +DEFFN(CPetDisabler); +DEFFN(CPetGraphic); +DEFFN(CPetGraphic2); DEFFN(CPhonograph); DEFFN(CPlayMusicButton); DEFFN(CPlayOnAct); @@ -485,6 +506,7 @@ DEFFN(CSeasonalAdjustment); DEFFN(CServiceElevatorDoor); DEFFN(CServiceElevatorWindow); DEFFN(CShipSetting); +DEFFN(CShipSettingButton); DEFFN(CSpeechDispensor); DEFFN(CStarlingPuret); DEFFN(CStartAction); @@ -494,6 +516,7 @@ DEFFN(CSweetBowl); DEFFN(CTelevision); DEFFN(CThirdClassCanal); DEFFN(CThrowTVDownWell); +DEFFN(CTitaniaStillControl); DEFFN(CTOWParrotNav); DEFFN(CUpLighter); DEFFN(CWheelButton); @@ -567,6 +590,7 @@ DEFFN(CChevRightOff); DEFFN(CChevRightOn); DEFFN(CChevSendRecSwitch); DEFFN(CChevSwitch); +DEFFN(CEditControl); DEFFN(CElevatorButton); DEFFN(CGetFromSucc); DEFFN(CHelmetOnOff); @@ -896,6 +920,8 @@ void CSaveableObject::initClassList() { ADDFN(CBarMenuButton); ADDFN(CBelbotGetLight); ADDFN(CBomb); + ADDFN(CBottomOfWellMonitor); + ADDFN(CBrainSlot); ADDFN(CBowlUnlocker); ADDFN(CBridgeView); ADDFN(CBrokenPellBase); @@ -907,6 +933,7 @@ void CSaveableObject::initClassList() { ADDFN(CCDROMTray); ADDFN(CCellPointButton); ADDFN(CChickenDispensor); + ADDFN(CodeWheel); ADDFN(CComputerScreen); ADDFN(CCloseBrokenPel); ADDFN(CComputer); @@ -940,6 +967,7 @@ void CSaveableObject::initClassList() { ADDFN(CHammerClip); ADDFN(CHammerDispensor); ADDFN(CHammerDispensorButton); + ADDFN(CHeadSlot); ADDFN(CHeadSmashEvent); ADDFN(CHeadSmashLever); ADDFN(CIdleSummoner); @@ -949,6 +977,8 @@ void CSaveableObject::initClassList() { ADDFN(CLittleLiftButton); ADDFN(CLongStickDispenser); ADDFN(CMaitreDArmHolder); + ADDFN(CMissiveOMat); + ADDFN(CMissiveOMatButton); ADDFN(CMusicalInstrument); ADDFN(CMusicConsoleButton); ADDFN(CMusicRoomPhonograph); @@ -958,6 +988,9 @@ void CSaveableObject::initClassList() { ADDFN(CNoseHolder); ADDFN(CNullPortHole); ADDFN(CNutReplacer); + ADDFN(CPetDisabler); + ADDFN(CPetGraphic); + ADDFN(CPetGraphic2); ADDFN(CPhonograph); ADDFN(CPlayMusicButton); ADDFN(CPlayOnAct); @@ -974,6 +1007,7 @@ void CSaveableObject::initClassList() { ADDFN(CServiceElevatorDoor); ADDFN(CServiceElevatorWindow); ADDFN(CShipSetting); + ADDFN(CShipSettingButton); ADDFN(CSpeechDispensor); ADDFN(CStarlingPuret); ADDFN(CStartAction); @@ -983,6 +1017,7 @@ void CSaveableObject::initClassList() { ADDFN(CTelevision); ADDFN(CThirdClassCanal); ADDFN(CThrowTVDownWell); + ADDFN(CTitaniaStillControl); ADDFN(CTOWParrotNav); ADDFN(CUpLighter); ADDFN(CWheelButton); @@ -1056,6 +1091,7 @@ void CSaveableObject::initClassList() { ADDFN(CChevRightOn); ADDFN(CChevSendRecSwitch); ADDFN(CChevSwitch); + ADDFN(CEditControl); ADDFN(CElevatorButton); ADDFN(CGetFromSucc); ADDFN(CHelmetOnOff); diff --git a/engines/titanic/game/bottom_of_well_monitor.cpp b/engines/titanic/game/bottom_of_well_monitor.cpp index daca5dbb5f..b48b5ad291 100644 --- a/engines/titanic/game/bottom_of_well_monitor.cpp +++ b/engines/titanic/game/bottom_of_well_monitor.cpp @@ -24,14 +24,21 @@ namespace Titanic { +int CBottomOfWellMonitor::_v1; +int CBottomOfWellMonitor::_v2; + void CBottomOfWellMonitor::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeNumberLine(_v1, indent); + file->writeNumberLine(_v2, indent); file->writeNumberLine(_value, indent); CGameObject::save(file, indent); } void CBottomOfWellMonitor::load(SimpleFile *file) { file->readNumber(); + _v1 = file->readNumber(); + _v2 = file->readNumber(); _value = file->readNumber(); CGameObject::load(file); } diff --git a/engines/titanic/game/bottom_of_well_monitor.h b/engines/titanic/game/bottom_of_well_monitor.h index de07aacf35..f1a9f5d710 100644 --- a/engines/titanic/game/bottom_of_well_monitor.h +++ b/engines/titanic/game/bottom_of_well_monitor.h @@ -29,6 +29,7 @@ namespace Titanic { class CBottomOfWellMonitor : public CGameObject { public: + static int _v1, _v2; int _value; public: CBottomOfWellMonitor() : _value(1) {} diff --git a/engines/titanic/game/brain_slot.cpp b/engines/titanic/game/brain_slot.cpp index f8a029ed67..f655a963d5 100644 --- a/engines/titanic/game/brain_slot.cpp +++ b/engines/titanic/game/brain_slot.cpp @@ -30,7 +30,7 @@ int CBrainSlot::_v2; void CBrainSlot::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); file->writeNumberLine(_value1, indent); - file->writeNumberLine(_value2, indent); + file->writeQuotedLine(_value2, indent); file->writeNumberLine(_v1, indent); file->writeNumberLine(_v2, indent); @@ -40,7 +40,7 @@ void CBrainSlot::save(SimpleFile *file, int indent) const { void CBrainSlot::load(SimpleFile *file) { file->readNumber(); _value1 = file->readNumber(); - _value2 = file->readNumber(); + _value2 = file->readString(); _v1 = file->readNumber(); _v2 = file->readNumber(); diff --git a/engines/titanic/game/brain_slot.h b/engines/titanic/game/brain_slot.h index 982541f945..fa197a85d7 100644 --- a/engines/titanic/game/brain_slot.h +++ b/engines/titanic/game/brain_slot.h @@ -31,9 +31,10 @@ class CBrainSlot : public CGameObject { public: static int _v1, _v2; public: - int _value1, _value2; + int _value1; + CString _value2; public: - CBrainSlot() : CGameObject(), _value1(0), _value2(0) {} + CBrainSlot() : CGameObject(), _value1(0) {} /** * Return the class name diff --git a/engines/titanic/game/code_wheel.cpp b/engines/titanic/game/code_wheel.cpp new file mode 100644 index 0000000000..a10a70c974 --- /dev/null +++ b/engines/titanic/game/code_wheel.cpp @@ -0,0 +1,48 @@ +/* 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/code_wheel.h" + +namespace Titanic { + +CodeWheel::CodeWheel() : CBomb(), _field108(0), _field10C(4), _field110(0) { +} + +void CodeWheel::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_field108, indent); + file->writeNumberLine(_field10C, indent); + file->writeNumberLine(_field110, indent); + + CBomb::save(file, indent); +} + +void CodeWheel::load(SimpleFile *file) { + file->readNumber(); + _field108 = file->readNumber(); + _field10C = file->readNumber(); + _field110 = file->readNumber(); + + CBomb::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/code_wheel.h b/engines/titanic/game/code_wheel.h new file mode 100644 index 0000000000..70879826e9 --- /dev/null +++ b/engines/titanic/game/code_wheel.h @@ -0,0 +1,56 @@ +/* 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_CODE_WHEEL_H +#define TITANIC_CODE_WHEEL_H + +#include "titanic/game/bomb.h" + +namespace Titanic { + +class CodeWheel : public CBomb { +private: + int _field108; + int _field10C; + int _field110; +public: + CodeWheel(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CodeWheel"; } + + /** + * 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_CODE_WHEEL_H */ diff --git a/engines/titanic/game/head_slot.cpp b/engines/titanic/game/head_slot.cpp index c037238e7c..4cb15ccd1e 100644 --- a/engines/titanic/game/head_slot.cpp +++ b/engines/titanic/game/head_slot.cpp @@ -24,6 +24,8 @@ namespace Titanic { +int CHeadSlot::_v1; + CHeadSlot::CHeadSlot() : CGameObject(), _string1("NotWorking"), _string2("NULL"), _fieldBC(0), _fieldD8(0), _fieldDC(27), _fieldE0(56), _fieldE4(82), _fieldE8(112), _fieldEC(0) { diff --git a/engines/titanic/game/missiveomat_button.cpp b/engines/titanic/game/missiveomat_button.cpp new file mode 100644 index 0000000000..8f0918a294 --- /dev/null +++ b/engines/titanic/game/missiveomat_button.cpp @@ -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. + * + */ + +#include "titanic/game/missiveomat_button.h" + +namespace Titanic { + +void CMissiveOMatButton::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldFC, indent); + + CEditControl::save(file, indent); +} + +void CMissiveOMatButton::load(SimpleFile *file) { + file->readNumber(); + _fieldFC = file->readNumber(); + + CEditControl::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/game/missiveomat_button.h b/engines/titanic/game/missiveomat_button.h new file mode 100644 index 0000000000..f383e88798 --- /dev/null +++ b/engines/titanic/game/missiveomat_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_MISSIVEOMAT_BUTTON_H +#define TITANIC_MISSIVEOMAT_BUTTON_H + +#include "titanic/gfx/edit_control.h" + +namespace Titanic { + +class CMissiveOMatButton : public CEditControl { +public: + int _fieldFC; +public: + CMissiveOMatButton() : CEditControl(), _fieldFC(2) {} + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CMissiveOMatButton"; } + + /** + * 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_MISSIVEOMAT_BUTTON_H */ diff --git a/engines/titanic/game/ship_setting_button.cpp b/engines/titanic/game/ship_setting_button.cpp index c1318b1bc4..95507f3c90 100644 --- a/engines/titanic/game/ship_setting_button.cpp +++ b/engines/titanic/game/ship_setting_button.cpp @@ -24,13 +24,24 @@ namespace Titanic { +CShipSettingButton::CShipSettingButton() : CGameObject(), _fieldC8(0), _fieldCC(0) { +} + void CShipSettingButton::save(SimpleFile *file, int indent) const { file->writeNumberLine(1, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldC8, indent); + file->writeNumberLine(_fieldCC, indent); + CGameObject::save(file, indent); } void CShipSettingButton::load(SimpleFile *file) { file->readNumber(); + _string1 = file->readString(); + _fieldC8 = file->readNumber(); + _fieldCC = file->readNumber(); + CGameObject::load(file); } diff --git a/engines/titanic/game/ship_setting_button.h b/engines/titanic/game/ship_setting_button.h index 008ab783df..fb8d533a7f 100644 --- a/engines/titanic/game/ship_setting_button.h +++ b/engines/titanic/game/ship_setting_button.h @@ -28,7 +28,13 @@ namespace Titanic { class CShipSettingButton : public CGameObject { +private: + CString _string1; + int _fieldC8; + int _fieldCC; public: + CShipSettingButton(); + /** * Return the class name */ diff --git a/engines/titanic/gfx/edit_control.cpp b/engines/titanic/gfx/edit_control.cpp new file mode 100644 index 0000000000..17a56d6677 --- /dev/null +++ b/engines/titanic/gfx/edit_control.cpp @@ -0,0 +1,72 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "titanic/gfx/edit_control.h" + +namespace Titanic { + +CEditControl::CEditControl() : CGameObject(), _fieldBC(0), _fieldC0(0), + _fieldC4(0), _fieldC8(0), _fieldCC(0), _fieldD0(0), _fieldD4(2), + _fieldD8(0), _fieldDC(0), _fieldE0(0), _fieldF0(0), _fieldF4(0) + +{ +} + +void CEditControl::save(SimpleFile *file, int indent) const { + file->writeNumberLine(1, indent); + file->writeNumberLine(_fieldBC, indent); + file->writeNumberLine(_fieldC0, indent); + file->writeNumberLine(_fieldC4, indent); + file->writeNumberLine(_fieldC8, indent); + file->writeNumberLine(_fieldCC, indent); + file->writeNumberLine(_fieldD0, indent); + file->writeNumberLine(_fieldD4, indent); + file->writeNumberLine(_fieldD8, indent); + file->writeNumberLine(_fieldDC, indent); + file->writeNumberLine(_fieldC0, indent); + file->writeQuotedLine(_string1, indent); + file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_fieldF4, indent); + + CGameObject::save(file, indent); +} + +void CEditControl::load(SimpleFile *file) { + file->readNumber(); + _fieldBC = file->readNumber(); + _fieldC0 = file->readNumber(); + _fieldC4 = file->readNumber(); + _fieldC8 = file->readNumber(); + _fieldCC = file->readNumber(); + _fieldD0 = file->readNumber(); + _fieldD4 = file->readNumber(); + _fieldD8 = file->readNumber(); + _fieldDC = file->readNumber(); + _fieldE0 = file->readNumber(); + _string1 = file->readString(); + _fieldF0 = file->readNumber(); + _fieldF4 = file->readNumber(); + + CGameObject::load(file); +} + +} // End of namespace Titanic diff --git a/engines/titanic/gfx/edit_control.h b/engines/titanic/gfx/edit_control.h new file mode 100644 index 0000000000..79b20f7108 --- /dev/null +++ b/engines/titanic/gfx/edit_control.h @@ -0,0 +1,66 @@ +/* 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_EDIT_CONTROL_H +#define TITANIC_EDIT_CONTROL_H + +#include "titanic/gfx/toggle_switch.h" + +namespace Titanic { + +class CEditControl : public CGameObject { +protected: + int _fieldBC; + int _fieldC0; + int _fieldC4; + int _fieldC8; + int _fieldCC; + int _fieldD0; + int _fieldD4; + int _fieldD8; + int _fieldDC; + int _fieldE0; + CString _string1; + int _fieldF0; + int _fieldF4; +public: + CEditControl(); + + /** + * Return the class name + */ + virtual const char *getClassName() const { return "CEditControl"; } + + /** + * 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_EDIT_CONTROL_H */ diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 0a236d92ca..86ddafddef 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -86,6 +86,7 @@ MODULE_OBJS := \ game/bar_bell.o \ game/belbot_get_light.o \ game/bottom_of_well_monitor.o \ + game/bomb.o \ game/bowl_unlocker.o \ game/brain_slot.o \ game/bridge_door.o \ @@ -103,6 +104,7 @@ MODULE_OBJS := \ game/chicken_cooler.o \ game/chicken_dispensor.o \ game/close_broken_pel.o \ + game/code_wheel.o \ game/cookie.o \ game/computer.o \ game/computer_screen.o \ @@ -150,6 +152,7 @@ MODULE_OBJS := \ game/mail_man.o \ game/maitred_arm_holder.o \ game/missiveomat.o \ + game/missiveomat_button.o \ game/movie_tester.o \ game/music_console_button.o \ game/music_room_phonograph.o \ @@ -270,6 +273,7 @@ MODULE_OBJS := \ gfx/chev_right_on.o \ gfx/chev_send_rec_switch.o \ gfx/chev_switch.o \ + gfx/edit_control.o \ gfx/elevator_button.o \ gfx/get_from_succ.o \ gfx/helmet_on_off.o \ |