aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/mortevielle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mortevielle/mortevielle.cpp')
-rw-r--r--engines/mortevielle/mortevielle.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp
index 01750b0512..01e0492d4a 100644
--- a/engines/mortevielle/mortevielle.cpp
+++ b/engines/mortevielle/mortevielle.cpp
@@ -47,15 +47,14 @@ namespace Mortevielle {
MortevielleEngine *g_vm;
MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescription *gameDesc):
- Engine(system), _gameDescription(gameDesc), _randomSource("mortevielle"),
- _soundManager(_mixer) {
+ Engine(system), _gameDescription(gameDesc), _randomSource("mortevielle") {
g_vm = this;
_debugger.setParent(this);
_dialogManager.setParent(this);
_screenSurface.setParent(this);
_mouse = new MouseHandler(this);
- _text.setParent(this);
- _soundManager.setParent(this);
+ _text = new TextHandler(this);
+ _soundManager = new SoundManager(this, _mixer);
_savegameManager.setParent(this);
_menu = new Menu(this);
@@ -106,6 +105,8 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const MortevielleGameDescr
MortevielleEngine::~MortevielleEngine() {
delete _menu;
+ delete _soundManager;
+ delete _text;
delete _mouse;
free(_curPict);
@@ -238,8 +239,8 @@ Common::ErrorCode MortevielleEngine::initialize() {
testKeyboard();
clearScreen();
- _soundManager.loadNoise();
- _soundManager.loadAmbiantSounds();
+ _soundManager->loadNoise();
+ _soundManager->loadAmbiantSounds();
return Common::kNoError;
}
@@ -372,7 +373,7 @@ Common::Error MortevielleEngine::run() {
showIntroduction();
else {
_caff = 51;
- _text.taffich();
+ _text->taffich();
}
// Either load the initial game state savegame, or the specified savegame number
@@ -386,7 +387,7 @@ Common::Error MortevielleEngine::run() {
// Cleanup (allocated in initialize())
_screenSurface.free();
- free(_soundManager._cfiphBuffer);
+ free(_soundManager->_cfiphBuffer);
free(_cfiecBuffer);
return Common::kNoError;