diff options
Diffstat (limited to 'engines/titanic/core/saveable_object.cpp')
-rw-r--r-- | engines/titanic/core/saveable_object.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/titanic/core/saveable_object.cpp b/engines/titanic/core/saveable_object.cpp index e831cca8b0..7ec4f949f2 100644 --- a/engines/titanic/core/saveable_object.cpp +++ b/engines/titanic/core/saveable_object.cpp @@ -406,6 +406,12 @@ namespace Titanic { +CSaveableObject *ClassDef::create() { + return new CSaveableObject(); +} + +/*------------------------------------------------------------------------*/ + Common::HashMap<Common::String, CSaveableObject::CreateFunction> * CSaveableObject::_classList = nullptr; Common::List<ClassDef *> *CSaveableObject::_classDefs; @@ -1573,10 +1579,15 @@ void CSaveableObject::saveFooter(SimpleFile *file, int indent) const { file->writeClassEnd(indent); } -/*------------------------------------------------------------------------*/ +bool CSaveableObject::isInstanceOf(const ClassDef &classDef) { + for (ClassDef *def = getType(); def != nullptr; def = def->_parent) { + if (def == &classDef) + return true; + } -CSaveableObject *ClassDef::create() { - return new CSaveableObject(); + return false; } + + } // End of namespace Titanic |