From 7e71865e91a19b022a5ad839802f79a5f300fe8d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 25 Jul 2009 12:59:46 +0000 Subject: Move the event recorder to its own class (EventRecoder inside common/EventRecorder.[h/cpp]). svn-id: r42751 --- engines/drascula/drascula.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/drascula/drascula.cpp') diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a3c56be1f4..84c2dd8073 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -24,6 +24,7 @@ */ #include "common/events.h" +#include "common/EventRecorder.h" #include "common/keyboard.h" #include "common/file.h" #include "common/savefile.h" @@ -92,7 +93,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam *textName = 0; _rnd = new Common::RandomSource(); - syst->getEventManager()->registerRandomSource(*_rnd, "drascula"); + g_eventRec.registerRandomSource(*_rnd, "drascula"); int cd_num = ConfMan.getInt("cdrom"); if (cd_num >= 0) -- cgit v1.2.3 From d14f0ccfb51d44e36a8508be7e7795306b785ed8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 4 Aug 2009 17:22:18 +0000 Subject: Removed the superfluous VGA buffer, replacing it with direct writes to the video buffer svn-id: r43048 --- engines/drascula/drascula.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'engines/drascula/drascula.cpp') diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 84c2dd8073..46524b03db 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -182,10 +182,6 @@ Common::Error DrasculaEngine::run() { for (;;) { int i; - - VGA = (byte *)malloc(320 * 200); - memset(VGA, 0, 64000); - takeObject = 0; _menuBar = false; _menuScreen = false; @@ -296,7 +292,6 @@ void DrasculaEngine::endChapter() { MusicFadeout(); stopMusic(); freeMemory(); - free(VGA); } bool DrasculaEngine::runCurrentChapter() { -- cgit v1.2.3 From 4af0cfbdbdc9feafca2728cee8deca7ae9b472b1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 4 Aug 2009 21:56:59 +0000 Subject: Cleanup svn-id: r43056 --- engines/drascula/drascula.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/drascula/drascula.cpp') diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 46524b03db..2e3db3478e 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -712,7 +712,8 @@ bool DrasculaEngine::verify2() { Common::KeyCode DrasculaEngine::getScan() { updateEvents(); - if (_keyBufferHead == _keyBufferTail) return Common::KEYCODE_INVALID; + if (_keyBufferHead == _keyBufferTail) + return Common::KEYCODE_INVALID; Common::KeyCode key = _keyBuffer[_keyBufferTail].keycode; _keyBufferTail = (_keyBufferTail + 1) % KEYBUFSIZE; -- cgit v1.2.3