From 826dcf1f42fc1a5c5a4e7c34f395e51c6f5944df Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 6 Apr 2016 23:38:46 -0400 Subject: TITANIC: Fix class hierarchy in ClassDef structures --- engines/titanic/core/saveable_object.cpp | 5 +++-- 1 file 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 *CSaveableObject::_classDefs; #define DEFFN(T) ClassDef *T::_type; \ CSaveableObject *Function##T() { return new T(); } -#define ADDFN(CHILD, PARENT) CHILD::_type = new TypeTemplate(#CHILD, nullptr); \ +#define ADDFN(CHILD, PARENT) \ + CHILD::_type = new TypeTemplate(#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); -- cgit v1.2.3