TITANIC: Implemented state room classes

This commit is contained in:
Paul Gilbert 2016-02-27 11:49:48 -05:00
parent dd5fdcd8d9
commit 9364b27917
20 changed files with 1003 additions and 0 deletions

View File

@ -70,10 +70,14 @@
#include "titanic/game/cdrom_tray.h"
#include "titanic/game/computer_screen.h"
#include "titanic/game/dead_area.h"
#include "titanic/game/doorbot_home_handler.h"
#include "titanic/game/drawer.h"
#include "titanic/game/drop_target.h"
#include "titanic/game/hammer_dispensor_button.h"
#include "titanic/game/pet_position.h"
#include "titanic/game/room_item.h"
#include "titanic/game/service_elevator_door.h"
#include "titanic/game/sgt_state_room.h"
#include "titanic/game/start_action.h"
#include "titanic/game/sub_glass.h"
#include "titanic/game/television.h"
@ -194,10 +198,13 @@ DEFFN(CCDROMComputer);
DEFFN(CCDROMTray);
DEFFN(CComputerScreen);
DEFFN(CDeadArea);
DEFFN(CDoorbotHomeHandler);
DEFFN(CDropTarget);
DEFFN(CHammerDispensorButton);
DEFFN(CPETPosition);
DEFFN(CRoomItem);
DEFFN(CServiceElevatorDoor);
DEFFN(CSGTStateRoom);
DEFFN(CStartAction);
DEFFN(CSUBGlass);
DEFFN(CTelevision);
@ -311,10 +318,13 @@ void CSaveableObject::initClassList() {
ADDFN(CCDROMTray);
ADDFN(CComputerScreen);
ADDFN(CDeadArea);
ADDFN(CDoorbotHomeHandler);
ADDFN(CDropTarget);
ADDFN(CHammerDispensorButton);
ADDFN(CPETPosition);
ADDFN(CRoomItem);
ADDFN(CServiceElevatorDoor);
ADDFN(CSGTStateRoom);
ADDFN(CStartAction);
ADDFN(CSUBGlass);
ADDFN(CTelevision);

View File

@ -0,0 +1,40 @@
/* 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/doorbot_home_handler.h"
namespace Titanic {
CDoorbotHomeHandler::CDoorbotHomeHandler() {
}
void CDoorbotHomeHandler::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
CGameObject::save(file, indent);
}
void CDoorbotHomeHandler::load(SimpleFile *file) {
file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -0,0 +1,52 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef TITANIC_DOORBOT_HOME_HANDLER_H
#define TITANIC_DOORBOT_HOME_HANDLER_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CDoorbotHomeHandler : public CGameObject {
public:
CDoorbotHomeHandler();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CDoorbotHomeHandler"; }
/**
* 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_DOORBOT_HOME_HANDLER_H */

View File

@ -0,0 +1,42 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/game/drawer.h"
namespace Titanic {
CDrawer::CDrawer() : CSGTStateRoom(), _fieldF4(0) {
}
void CDrawer::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldF4, indent);
CSGTStateRoom::save(file, indent);
}
void CDrawer::load(SimpleFile *file) {
file->readNumber();
_fieldF4 = file->readNumber();
CSGTStateRoom::load(file);
}
} // End of namespace Titanic

View File

@ -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_DRAWER_H
#define TITANIC_DRAWER_H
#include "titanic/game/sgt_state_room.h"
namespace Titanic {
class CDrawer : public CSGTStateRoom {
private:
int _fieldF4;
public:
CDrawer();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CDrawer"; }
/**
* 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_DRAWER_H */

View File

@ -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/game/drop_target.h"
namespace Titanic {
CDropTarget::CDropTarget() : CGameObject(), _fieldC4(0),
_fieldD4(0), _fieldE4(0), _fieldF4(0), _fieldF8(0),
_fieldFC(0), _field10C(1), _field110(8), _field114(20) {
}
void CDropTarget::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writePoint(_pos1, indent);
file->writeNumberLine(_fieldC4, indent);
file->writeQuotedLine(_string1, indent);
file->writeNumberLine(_fieldD4, indent);
file->writeQuotedLine(_string2, indent);
file->writeNumberLine(_fieldE4, indent);
file->writeQuotedLine(_string3, indent);
file->writeNumberLine(_fieldF4, indent);
file->writeNumberLine(_fieldF8, indent);
file->writeNumberLine(_fieldFC, indent);
file->writeQuotedLine(_string4, indent);
file->writeNumberLine(_field10C, indent);
file->writeNumberLine(_field110, indent);
file->writeNumberLine(_field114, indent);
CGameObject::save(file, indent);
}
void CDropTarget::load(SimpleFile *file) {
file->readNumber();
_pos1 = file->readPoint();
_fieldC4 = file->readNumber();
_string1 = file->readString();
_fieldD4 = file->readNumber();
_string2 = file->readString();
_fieldE4 = file->readNumber();
_string3 = file->readString();
_fieldF4 = file->readNumber();
_fieldF8 = file->readNumber();
_fieldFC = file->readNumber();
_string4 = file->readString();
_field10C = file->readNumber();
_field110 = file->readNumber();
_field114 = file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -0,0 +1,67 @@
/* 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_DROP_TARGET_H
#define TITANIC_DROP_TARGET_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CDropTarget : public CGameObject {
private:
Common::Point _pos1;
int _fieldC4;
CString _string1;
int _fieldD4;
CString _string2;
int _fieldE4;
CString _string3;
int _fieldF4;
int _fieldF8;
int _fieldFC;
CString _string4;
int _field10C;
int _field110;
int _field114;
public:
CDropTarget();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CDropTarget"; }
/**
* 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_DROP_TARGET_H */

View File

@ -0,0 +1,85 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/game/sgt_state_room.h"
namespace Titanic {
CSGTStateRoomStatics *_statics;
CSGTStateRoom::CSGTStateRoom() : CBackground(), _fieldE0(1),
_fieldE4(1), _fieldE8(0), _fieldEC(1), _fieldF0(1) {
}
void CSGTStateRoom::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeQuotedLine(_statics->_v1, indent);
file->writeQuotedLine(_statics->_v2, indent);
file->writeQuotedLine(_statics->_v3, indent);
file->writeQuotedLine(_statics->_v4, indent);
file->writeQuotedLine(_statics->_v5, indent);
file->writeQuotedLine(_statics->_v6, indent);
file->writeQuotedLine(_statics->_v7, indent);
file->writeQuotedLine(_statics->_v8, indent);
file->writeQuotedLine(_statics->_v9, indent);
file->writeQuotedLine(_statics->_v10, indent);
file->writeQuotedLine(_statics->_v11, indent);
file->writeQuotedLine(_statics->_v12, indent);
file->writeNumberLine(_fieldE0, indent);
file->writeNumberLine(_fieldE4, indent);
file->writeNumberLine(_statics->_v13, indent);
file->writeNumberLine(_statics->_v14, indent);
file->writeNumberLine(_fieldE8, indent);
file->writeNumberLine(_fieldEC, indent);
file->writeNumberLine(_fieldF0, indent);
CBackground::save(file, indent);
}
void CSGTStateRoom::load(SimpleFile *file) {
file->readNumber();
_statics->_v1 = file->readString();
_statics->_v2 = file->readString();
_statics->_v3 = file->readString();
_statics->_v4 = file->readString();
_statics->_v5 = file->readString();
_statics->_v6 = file->readString();
_statics->_v7 = file->readString();
_statics->_v8 = file->readString();
_statics->_v9 = file->readString();
_statics->_v10 = file->readString();
_statics->_v11 = file->readString();
_statics->_v12 = file->readString();
_fieldE0 = file->readNumber();
_fieldE4 = file->readNumber();
_statics->_v13 = file->readNumber();
_statics->_v14 = file->readNumber();
_fieldE8 = file->readNumber();
_fieldEC = file->readNumber();
_fieldF0 = file->readNumber();
CBackground::load(file);
}
} // End of namespace Titanic

View File

@ -0,0 +1,77 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef TITANIC_SGT_STATE_ROOM_H
#define TITANIC_SGT_STATE_ROOM_H
#include "titanic/core/background.h"
namespace Titanic {
struct CSGTStateRoomStatics {
CString _v1;
CString _v2;
CString _v3;
CString _v4;
CString _v5;
CString _v6;
CString _v7;
CString _v8;
CString _v9;
CString _v10;
CString _v11;
CString _v12;
int _v13;
int _v14;
};
class CSGTStateRoom : public CBackground {
private:
CSGTStateRoomStatics *_statics;
private:
int _fieldE0;
int _fieldE4;
int _fieldE8;
int _fieldEC;
int _fieldF0;
public:
CSGTStateRoom();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CSGTStateRoom"; }
/**
* Save the data for the class to file
*/
virtual void save(SimpleFile *file, int indent) const;
/**
* Load the data for the class from file
*/
virtual void load(SimpleFile *file);
};
} // End of namespace Titanic
#endif /* TITANIC_SGT_STATE_ROOM_H */

View File

@ -0,0 +1,46 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/messages/auto_sound_event.h"
namespace Titanic {
CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
}
void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldBC, indent);
file->writeNumberLine(_fieldC0, indent);
CGameObject::save(file, indent);
}
void CAutoSoundEvent::load(SimpleFile *file) {
file->readNumber();
_fieldBC = file->readNumber();
_fieldC0 = file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -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_DOORBOT_NEEDED_IN_ELEVATOR_MSG_H
#define TITANIC_DOORBOT_NEEDED_IN_ELEVATOR_MSG_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CAutoSoundEvent : public CMessage {
protected:
int _fieldBC;
int _fieldC0;
public:
CAutoSoundEvent();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CAutoSoundEvent"; }
/**
* 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_DOORBOT_NEEDED_IN_ELEVATOR_MSG_H */

View File

@ -0,0 +1,46 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/messages/auto_sound_event.h"
namespace Titanic {
CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
}
void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldBC, indent);
file->writeNumberLine(_fieldC0, indent);
CGameObject::save(file, indent);
}
void CAutoSoundEvent::load(SimpleFile *file) {
file->readNumber();
_fieldBC = file->readNumber();
_fieldC0 = file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -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_AUTO_SOUND_EVENT_H
#define TITANIC_AUTO_SOUND_EVENT_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CAutoSoundEvent : public CGameObject {
protected:
int _fieldBC;
int _fieldC0;
public:
CAutoSoundEvent();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CAutoSoundEvent"; }
/**
* 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_AUTO_SOUND_EVENT_H */

View File

@ -0,0 +1,46 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/messages/auto_sound_event.h"
namespace Titanic {
CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
}
void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldBC, indent);
file->writeNumberLine(_fieldC0, indent);
CGameObject::save(file, indent);
}
void CAutoSoundEvent::load(SimpleFile *file) {
file->readNumber();
_fieldBC = file->readNumber();
_fieldC0 = file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -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_AUTO_SOUND_EVENT_H
#define TITANIC_AUTO_SOUND_EVENT_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CAutoSoundEvent : public CGameObject {
protected:
int _fieldBC;
int _fieldC0;
public:
CAutoSoundEvent();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CAutoSoundEvent"; }
/**
* 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_AUTO_SOUND_EVENT_H */

View File

@ -0,0 +1,46 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "titanic/messages/auto_sound_event.h"
namespace Titanic {
CAutoSoundEvent::CAutoSoundEvent() : CGameObject(), _fieldBC(-1), _fieldC0(0xFFFFFF) {
}
void CAutoSoundEvent::save(SimpleFile *file, int indent) const {
file->writeNumberLine(1, indent);
file->writeNumberLine(_fieldBC, indent);
file->writeNumberLine(_fieldC0, indent);
CGameObject::save(file, indent);
}
void CAutoSoundEvent::load(SimpleFile *file) {
file->readNumber();
_fieldBC = file->readNumber();
_fieldC0 = file->readNumber();
CGameObject::load(file);
}
} // End of namespace Titanic

View File

@ -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_AUTO_SOUND_EVENT_H
#define TITANIC_AUTO_SOUND_EVENT_H
#include "titanic/core/game_object.h"
namespace Titanic {
class CAutoSoundEvent : public CGameObject {
protected:
int _fieldBC;
int _fieldC0;
public:
CAutoSoundEvent();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CAutoSoundEvent"; }
/**
* 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_AUTO_SOUND_EVENT_H */

View File

@ -0,0 +1,39 @@
/* 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/messages/message.h"
namespace Titanic {
CMessage::CMessage() : CSaveableObject() {
}
void CMessage::save(SimpleFile *file, int indent) const {
file->writeNumberLine(0, indent);
}
void CMessage::load(SimpleFile *file) {
file->readNumber();
CSaveableObject::load(file);
}
} // End of namespace Titanic

View File

@ -0,0 +1,52 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef TITANIC_MESSAGE_H
#define TITANIC_MESSAGE_H
#include "titanic/core/saveable_object.h"
namespace Titanic {
class CMessage : public CSaveableObject {
public:
CMessage();
/**
* Return the class name
*/
virtual const char *getClassName() const { return "CMessage"; }
/**
* 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_MESSAGE_H */

View File

@ -67,10 +67,14 @@ MODULE_OBJS := \
game/cdrom_tray.o \
game/computer_screen.o \
game/dead_area.o \
game/doorbot_home_handler.o \
game/drawer.o \
game/drop_target.o \
game/hammer_dispensor_button.o \
game/pet_position.o \
game/room_item.o \
game/service_elevator_door.o \
game/sgt_state_room.o \
game/start_action.o \
game/sub_glass.o \
game/television.o \
@ -107,6 +111,11 @@ MODULE_OBJS := \
gfx/toggle_switch.o \
messages/auto_sound_event.o \
messages/door_auto_sound_event.o \
messages/doorbot_needed_in_elevator_msg.o \
messages/doorbot_needed_in_home_msg.o \
messages/drop_object_msg.o \
messages/drop_zone_got_object_msg.o \
messages/message.o \
moves/enter_bomb_room.o \
moves/exit_arboretum.o \
moves/exit_bridge.o \