mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 05:36:12 +00:00
TITANIC: Implemented CAnnounce, CPETPosition, CSUBGlass
This commit is contained in:
parent
27f5f9e926
commit
906aa791ee
@ -31,9 +31,12 @@ MODULE_OBJS := \
|
||||
objects/saveable_object.o \
|
||||
objects/tree_item.o \
|
||||
objects/view_item.o \
|
||||
rooms/announce.o \
|
||||
rooms/door_auto_sound_event.o \
|
||||
rooms/pet_position.o \
|
||||
rooms/room_item.o \
|
||||
rooms/service_elevator_door.o
|
||||
rooms/service_elevator_door.o \
|
||||
rooms/sub_glass.o
|
||||
|
||||
# This module can be built as a plugin
|
||||
ifeq ($(ENABLE_TITANIC), DYNAMIC_PLUGIN)
|
||||
|
@ -28,10 +28,14 @@
|
||||
#include "titanic/objects/movie_clip.h"
|
||||
#include "titanic/objects/node_item.h"
|
||||
#include "titanic/objects/project_item.h"
|
||||
#include "titanic/objects/saveable_object.h"
|
||||
#include "titanic/objects/tree_item.h"
|
||||
#include "titanic/objects/view_item.h"
|
||||
#include "titanic/rooms/announce.h"
|
||||
#include "titanic/rooms/pet_position.h"
|
||||
#include "titanic/rooms/room_item.h"
|
||||
#include "titanic/rooms/service_elevator_door.h"
|
||||
#include "titanic/rooms/sub_glass.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
@ -41,6 +45,7 @@ Common::HashMap<Common::String, CSaveableObject::CreateFunction> *
|
||||
#define DEFFN(T) CSaveableObject *Function##T() { return new T(); }
|
||||
#define ADDFN(T) (*_classList)[#T] = Function##T
|
||||
|
||||
DEFFN(CAnnounce);
|
||||
DEFFN(CFileItem);
|
||||
DEFFN(CFileListItem);
|
||||
DEFFN(CLinkItem);
|
||||
@ -48,14 +53,17 @@ DEFFN(CMessageTarget);
|
||||
DEFFN(CMovieClip);
|
||||
DEFFN(CMovieClipList);
|
||||
DEFFN(CNodeItem);
|
||||
DEFFN(CPETPosition);
|
||||
DEFFN(CProjectItem);
|
||||
DEFFN(CRoomItem);
|
||||
DEFFN(CServiceElevatorDoor);
|
||||
DEFFN(CSUBGlass);
|
||||
DEFFN(CTreeItem);
|
||||
DEFFN(CViewItem);
|
||||
|
||||
void CSaveableObject::initClassList() {
|
||||
_classList = new Common::HashMap<Common::String, CreateFunction>();
|
||||
ADDFN(CAnnounce);
|
||||
ADDFN(CFileItem);
|
||||
ADDFN(CFileListItem);
|
||||
ADDFN(CLinkItem);
|
||||
@ -63,9 +71,11 @@ void CSaveableObject::initClassList() {
|
||||
ADDFN(CMovieClip);
|
||||
ADDFN(CMovieClipList);
|
||||
ADDFN(CNodeItem);
|
||||
ADDFN(CPETPosition);
|
||||
ADDFN(CProjectItem);
|
||||
ADDFN(CRoomItem);
|
||||
ADDFN(CServiceElevatorDoor);
|
||||
ADDFN(CSUBGlass);
|
||||
ADDFN(CTreeItem);
|
||||
ADDFN(CViewItem);
|
||||
}
|
||||
|
50
engines/titanic/rooms/announce.cpp
Normal file
50
engines/titanic/rooms/announce.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/rooms/announce.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
CAnnounce::CAnnounce() : _fieldBC(0), _fieldC0(0), _fieldC4(1), _fieldC8(0) {
|
||||
}
|
||||
|
||||
void CAnnounce::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);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CAnnounce::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldBC = file->readNumber();
|
||||
_fieldC0 = file->readNumber();
|
||||
_fieldC4 = file->readNumber();
|
||||
_fieldC8 = file->readNumber();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
57
engines/titanic/rooms/announce.h
Normal file
57
engines/titanic/rooms/announce.h
Normal file
@ -0,0 +1,57 @@
|
||||
/* 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_ANNOUNCE_H
|
||||
#define TITANIC_ANNOUNCE_H
|
||||
|
||||
#include "titanic/objects/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CAnnounce : public CGameObject {
|
||||
private:
|
||||
int _fieldBC;
|
||||
int _fieldC0;
|
||||
int _fieldC4;
|
||||
int _fieldC8;
|
||||
public:
|
||||
CAnnounce();
|
||||
|
||||
/**
|
||||
* Return the class name
|
||||
*/
|
||||
virtual const char *getClassName() const { return "CAnnounce"; }
|
||||
|
||||
/**
|
||||
* 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_ROOM_ITEM_H */
|
37
engines/titanic/rooms/pet_position.cpp
Normal file
37
engines/titanic/rooms/pet_position.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/rooms/pet_position.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
void CPETPosition::save(SimpleFile *file, int indent) const {
|
||||
file->writeNumberLine(1, indent);
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CPETPosition::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
50
engines/titanic/rooms/pet_position.h
Normal file
50
engines/titanic/rooms/pet_position.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_PET_POSITION_H
|
||||
#define TITANIC_PET_POSITION_H
|
||||
|
||||
#include "titanic/objects/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CPETPosition : public CGameObject {
|
||||
public:
|
||||
/**
|
||||
* Return the class name
|
||||
*/
|
||||
virtual const char *getClassName() const { return "CPETPosition"; }
|
||||
|
||||
/**
|
||||
* 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_ROOM_ITEM_H */
|
54
engines/titanic/rooms/sub_glass.cpp
Normal file
54
engines/titanic/rooms/sub_glass.cpp
Normal 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "titanic/rooms/sub_glass.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
CSUBGlass::CSUBGlass() : _fieldBC(0), _fieldC0(0), _fieldC4(1), _fieldC8(0) {
|
||||
}
|
||||
|
||||
void CSUBGlass::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->writeQuotedLine(_string, indent);
|
||||
|
||||
CGameObject::save(file, indent);
|
||||
}
|
||||
|
||||
void CSUBGlass::load(SimpleFile *file) {
|
||||
file->readNumber();
|
||||
_fieldBC = file->readNumber();
|
||||
_fieldC0 = file->readNumber();
|
||||
_fieldC4 = file->readNumber();
|
||||
_fieldC8 = file->readNumber();
|
||||
_fieldCC = file->readNumber();
|
||||
_string = file->readString();
|
||||
|
||||
CGameObject::load(file);
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
59
engines/titanic/rooms/sub_glass.h
Normal file
59
engines/titanic/rooms/sub_glass.h
Normal file
@ -0,0 +1,59 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TITANIC_SUB_GLASS_H
|
||||
#define TITANIC_SUB_GLASS_H
|
||||
|
||||
#include "titanic/objects/game_object.h"
|
||||
|
||||
namespace Titanic {
|
||||
|
||||
class CSUBGlass : public CGameObject {
|
||||
private:
|
||||
int _fieldBC;
|
||||
int _fieldC0;
|
||||
int _fieldC4;
|
||||
int _fieldC8;
|
||||
int _fieldCC;
|
||||
CString _string;
|
||||
public:
|
||||
CSUBGlass();
|
||||
|
||||
/**
|
||||
* Return the class name
|
||||
*/
|
||||
virtual const char *getClassName() const { return "CSUBGlass"; }
|
||||
|
||||
/**
|
||||
* 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_ROOM_ITEM_H */
|
Loading…
x
Reference in New Issue
Block a user