aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-02-24 20:22:22 -0500
committerPaul Gilbert2016-02-24 20:22:22 -0500
commit4fbcefba65f78e2346fb9a03e7b7c4cfbaf6133d (patch)
tree3db7795dbd3f2a2fcc3205ac0cdb9738349381d1
parent03f387b2bc624bbbea01f0894dc9a2a218e9ef6d (diff)
downloadscummvm-rg350-4fbcefba65f78e2346fb9a03e7b7c4cfbaf6133d.tar.gz
scummvm-rg350-4fbcefba65f78e2346fb9a03e7b7c4cfbaf6133d.tar.bz2
scummvm-rg350-4fbcefba65f78e2346fb9a03e7b7c4cfbaf6133d.zip
TITANIC: Fix loading of CRoomItem class
-rw-r--r--engines/titanic/objects/movie_clip.cpp1
-rw-r--r--engines/titanic/objects/movie_clip.h24
-rw-r--r--engines/titanic/objects/saveable_object.cpp3
-rw-r--r--engines/titanic/rooms/room_item.cpp1
4 files changed, 11 insertions, 18 deletions
diff --git a/engines/titanic/objects/movie_clip.cpp b/engines/titanic/objects/movie_clip.cpp
index 2910051ce8..2914cc844c 100644
--- a/engines/titanic/objects/movie_clip.cpp
+++ b/engines/titanic/objects/movie_clip.cpp
@@ -53,6 +53,7 @@ void CMovieClip::load(SimpleFile *file) {
break;
case 2:
+ file->readString();
_string1 = file->readString();
_field18 = file->readNumber();
_field1C = file->readNumber();
diff --git a/engines/titanic/objects/movie_clip.h b/engines/titanic/objects/movie_clip.h
index 18446c6dc2..e259d970fe 100644
--- a/engines/titanic/objects/movie_clip.h
+++ b/engines/titanic/objects/movie_clip.h
@@ -28,22 +28,6 @@
namespace Titanic {
/**
- * Movie clip item
- */
-class CMovieClipItem : public ListItem {
-public:
- virtual const char *getClassName() const { return "CMovieClipItem"; }
-};
-
-/**
- * Movie clip list
- */
-class CMovieClipList: public List<CMovieClipItem> {
-public:
- virtual const char *getClassName() const { return "CMovieClipList"; }
-};
-
-/**
* Movie clip
*/
class CMovieClip : public ListItem {
@@ -77,6 +61,14 @@ public:
virtual void load(SimpleFile *file);
};
+/**
+ * Movie clip list
+ */
+class CMovieClipList: public List<CMovieClip> {
+public:
+ virtual const char *getClassName() const { return "CMovieClipList"; }
+};
+
} // End of namespace Titanic
#endif /* TITANIC_MOVIE_CLIP_H */
diff --git a/engines/titanic/objects/saveable_object.cpp b/engines/titanic/objects/saveable_object.cpp
index adc03697a5..45161be277 100644
--- a/engines/titanic/objects/saveable_object.cpp
+++ b/engines/titanic/objects/saveable_object.cpp
@@ -44,7 +44,6 @@ DEFFN(CFileItem);
DEFFN(CProjectItem);
DEFFN(CRoomItem);
DEFFN(CMovieClip);
-DEFFN(CMovieClipItem);
DEFFN(CMovieClipList);
void CSaveableObject::initClassList() {
@@ -56,7 +55,6 @@ void CSaveableObject::initClassList() {
ADDFN(CProjectItem);
ADDFN(CRoomItem);
ADDFN(CMovieClip);
- ADDFN(CMovieClipItem);
ADDFN(CMovieClipList);
}
@@ -65,6 +63,7 @@ void CSaveableObject::freeClassList() {
}
CSaveableObject *CSaveableObject::createInstance(const Common::String &name) {
+warning("%s", name.c_str());
return (*_classList)[name]();
}
diff --git a/engines/titanic/rooms/room_item.cpp b/engines/titanic/rooms/room_item.cpp
index 9e0c699cc6..dce2bc093b 100644
--- a/engines/titanic/rooms/room_item.cpp
+++ b/engines/titanic/rooms/room_item.cpp
@@ -89,6 +89,7 @@ void CRoomItem::load(SimpleFile *file) {
_roomRect.right = file->readNumber();
_roomRect.bottom = file->readNumber();
file->readBuffer();
+ _roomNumber = file->readNumber();
break;
default: