aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-06 23:38:46 -0400
committerPaul Gilbert2016-04-06 23:38:46 -0400
commit826dcf1f42fc1a5c5a4e7c34f395e51c6f5944df (patch)
tree8e545552e181075ab3ea6d445dc15fd1501e1577
parent51dc36a9a52f95815b4b1109b080d070247bf247 (diff)
downloadscummvm-rg350-826dcf1f42fc1a5c5a4e7c34f395e51c6f5944df.tar.gz
scummvm-rg350-826dcf1f42fc1a5c5a4e7c34f395e51c6f5944df.tar.bz2
scummvm-rg350-826dcf1f42fc1a5c5a4e7c34f395e51c6f5944df.zip
TITANIC: Fix class hierarchy in ClassDef structures
-rw-r--r--engines/titanic/core/saveable_object.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp
index 1e359837a3..9f0ac320e2 100644
--- a/engines/titanic/core/saveable_object.cpp
+++ b/engines/titanic/core/saveable_object.cpp
@@ -421,7 +421,8 @@ Common::List<ClassDef *> *CSaveableObject::_classDefs;
#define DEFFN(T) ClassDef *T::_type; \
CSaveableObject *Function##T() { return new T(); }
-#define ADDFN(CHILD, PARENT) CHILD::_type = new TypeTemplate<CHILD>(#CHILD, nullptr); \
+#define ADDFN(CHILD, PARENT) \
+ CHILD::_type = new TypeTemplate<CHILD>(#CHILD, PARENT::_type); \
(*_classList)[#CHILD] = Function##CHILD
DEFFN(CArm)
@@ -1321,7 +1322,7 @@ void CSaveableObject::initClassList() {
ADDFN(CSmallChevLeftOn, CToggleSwitch);
ADDFN(CSmallChevRightOff, CToggleSwitch);
ADDFN(CSmallChevRightOn, CToggleSwitch);
- ADDFN(CStatusChangeButton, CSTButtonClass);
+ ADDFN(CStatusChangeButton, CSTButton);
ADDFN(CSTButton, CBackground);
ADDFN(CTextDown, CPetGraphic);
ADDFN(CTextSkrew, CPetGraphic);