diff options
author | Strangerke | 2013-03-24 15:31:59 +0100 |
---|---|---|
committer | Strangerke | 2013-03-24 15:31:59 +0100 |
commit | 1952a47787d868d4091d8a26f3aad6c000625a27 (patch) | |
tree | 05c4dfbaf98ba07b1e2a38cdc093213fc753a85f /engines | |
parent | 4ff6e13e023c3ad95f22caabdab81af9b3bc7d02 (diff) | |
download | scummvm-rg350-1952a47787d868d4091d8a26f3aad6c000625a27.tar.gz scummvm-rg350-1952a47787d868d4091d8a26f3aad6c000625a27.tar.bz2 scummvm-rg350-1952a47787d868d4091d8a26f3aad6c000625a27.zip |
HOPKINS: Add clearAll() to EventsManager
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/events.cpp | 7 | ||||
-rw-r--r-- | engines/hopkins/events.h | 2 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 50b2850c73..66692da429 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -51,7 +51,7 @@ EventsManager::EventsManager(HopkinsEngine *vm) { _gameKey = KEY_NONE; _mouseCursorId = 0; _oldIconId = 0; - _objectBuf = NULL; + _objectBuf = g_PTRNUL; Common::fill(&_keyState[0], &_keyState[256], false); _priorCounterTime = 0; @@ -63,6 +63,11 @@ EventsManager::~EventsManager() { _vm->_globals->freeMemory(_mouseCursor); } +void EventsManager::clearAll() { + _objectBuf = _vm->_globals->freeMemory(_objectBuf); + _objectBuf = _vm->_globals->allocMemory(2500); +} + void EventsManager::initMouseData() { if (_vm->getPlatform() == Common::kPlatformLinux) _mouseLinuxFl = true; diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h index da07817afa..265cf53aae 100644 --- a/engines/hopkins/events.h +++ b/engines/hopkins/events.h @@ -71,6 +71,7 @@ public: EventsManager(HopkinsEngine *vm); ~EventsManager(); + void clearAll(); void initMouseData(); void delay(int totalMilli); @@ -85,7 +86,6 @@ public: void mouseOn(); void mouseOff(); void setMouseOn(); - void refreshScreenAndEvents(); }; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 6d48599c96..940e18afaf 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -238,7 +238,6 @@ void Globals::clearAll() { initVBob(); _objectDataBuf = g_PTRNUL; _curObjectFileNum = 0; - _vm->_eventsManager->_objectBuf = g_PTRNUL; _vm->_dialogsManager->clearAll(); _answerBuffer = g_PTRNUL; SPRITE_ECRAN = g_PTRNUL; @@ -253,7 +252,7 @@ void Globals::clearAll() { _boxWidth = 240; - _vm->_eventsManager->_objectBuf = allocMemory(2500); + _vm->_eventsManager->clearAll(); _objectDataBuf = g_PTRNUL; } |