aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/cge2/cge2.cpp9
-rw-r--r--engines/cge2/cge2.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp
index 41b6249382..56393d20db 100644
--- a/engines/cge2/cge2.cpp
+++ b/engines/cge2/cge2.cpp
@@ -34,14 +34,14 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription)
_resman = nullptr;
}
-CGE2Engine::~CGE2Engine() {
- delete _resman;
-}
-
void CGE2Engine::init() {
_resman = new ResourceManager();
}
+void CGE2Engine::deinit() {
+ delete _resman;
+}
+
bool CGE2Engine::hasFeature(EngineFeature f) const {
return false;
}
@@ -66,6 +66,7 @@ Common::Error CGE2Engine::saveGameState(int slot, const Common::String &desc) {
Common::Error CGE2Engine::run() {
init();
warning("STUB: CGE2Engine::run()");
+ deinit();
return Common::kNoError;
}
diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h
index 068b371ff6..f84c9a8212 100644
--- a/engines/cge2/cge2.h
+++ b/engines/cge2/cge2.h
@@ -37,7 +37,6 @@ namespace CGE2 {
class CGE2Engine : public Engine {
public:
CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription);
- ~CGE2Engine();
virtual bool hasFeature(EngineFeature f) const;
virtual bool canLoadGameStateCurrently();
virtual bool canSaveGameStateCurrently();
@@ -50,6 +49,7 @@ public:
ResourceManager *_resman;
private:
void init();
+ void deinit();
};
} // End of namespace CGE2