From 4fbcefba65f78e2346fb9a03e7b7c4cfbaf6133d Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 24 Feb 2016 20:22:22 -0500 Subject: TITANIC: Fix loading of CRoomItem class --- engines/titanic/objects/movie_clip.cpp | 1 + engines/titanic/objects/movie_clip.h | 24 ++++++++---------------- engines/titanic/objects/saveable_object.cpp | 3 +-- engines/titanic/rooms/room_item.cpp | 1 + 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 @@ -27,22 +27,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 { -public: - virtual const char *getClassName() const { return "CMovieClipList"; } -}; - /** * Movie clip */ @@ -77,6 +61,14 @@ public: virtual void load(SimpleFile *file); }; +/** + * Movie clip list + */ +class CMovieClipList: public List { +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: -- cgit v1.2.3