diff options
Diffstat (limited to 'engines/mads/mads.cpp')
-rw-r--r-- | engines/mads/mads.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/engines/mads/mads.cpp b/engines/mads/mads.cpp index deccb5ba4f..414473bb82 100644 --- a/engines/mads/mads.cpp +++ b/engines/mads/mads.cpp @@ -38,6 +38,11 @@ namespace MADS { MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) : _gameDescription(gameDesc), Engine(syst), _randomSource("MADS") { + // Set up debug channels + DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level"); + DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts"); + DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling"); + // Initialize game/engine options _easyMouse = true; _invObjectsAnimated = true; @@ -58,6 +63,7 @@ MADSEngine::MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc) : _resources = nullptr; _sound = nullptr; _audio = nullptr; + _screen = nullptr; } MADSEngine::~MADSEngine() { @@ -77,11 +83,6 @@ MADSEngine::~MADSEngine() { } void MADSEngine::initialize() { - // Set up debug channels - DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level"); - DebugMan.addDebugChannel(kDebugScripts, "scripts", "Game scripts"); - DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics handling"); - // Initial sub-system engine references MSurface::setVm(this); MSprite::setVm(this); @@ -94,7 +95,7 @@ void MADSEngine::initialize() { _palette = new Palette(this); Font::init(this); _font = new Font(); - _screen.init(); + _screen = new Screen(); _sound = new SoundManager(this, _mixer); _audio = new AudioPlayer(_mixer, getGameID()); _game = Game::init(this); @@ -102,7 +103,7 @@ void MADSEngine::initialize() { loadOptions(); - _screen.empty(); + _screen->clear(); } void MADSEngine::loadOptions() { |