SLUDGE: Refactor to use Engine debugger

This commit is contained in:
Paul Gilbert 2020-02-09 07:16:38 -08:00 committed by Filippos Karapetis
parent b396e56bd0
commit b6630049cd
2 changed files with 2 additions and 7 deletions

View File

@ -46,7 +46,7 @@ Graphics::PixelFormat *SludgeEngine::getScreenPixelFormat() const { return _pixe
Graphics::PixelFormat *SludgeEngine::getOrigPixelFormat() const { return _origFormat; }
SludgeEngine::SludgeEngine(OSystem *syst, const SludgeGameDescription *gameDesc) :
Engine(syst), _gameDescription(gameDesc), _console(nullptr) {
Engine(syst), _gameDescription(gameDesc) {
// register your random source
_rnd = new Common::RandomSource("sludge");
@ -98,10 +98,6 @@ SludgeEngine::~SludgeEngine() {
// Remove debug levels
DebugMan.clearAllDebugChannels();
// Dispose console
delete _console;
_console = nullptr;
// Dispose pixel formats
delete _origFormat;
_origFormat = nullptr;
@ -142,7 +138,7 @@ Common::Error SludgeEngine::run() {
g_sludge = this;
// create console
_console = new SludgeConsole(this);
setDebugger(new SludgeConsole(this));
// debug log
main_loop(getGameFile());

View File

@ -110,7 +110,6 @@ public:
const SludgeGameDescription *_gameDescription;
private:
SludgeConsole *_console;
Common::RandomSource *_rnd;
Graphics::PixelFormat *_pixelFormat;
Graphics::PixelFormat *_origFormat;