aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hopkins/anim.cpp150
-rw-r--r--engines/hopkins/computer.cpp80
-rw-r--r--engines/hopkins/debugger.cpp7
-rw-r--r--engines/hopkins/debugger.h3
-rw-r--r--engines/hopkins/dialogs.cpp122
-rw-r--r--engines/hopkins/events.cpp17
-rw-r--r--engines/hopkins/events.h3
-rw-r--r--engines/hopkins/font.cpp14
-rw-r--r--engines/hopkins/globals.cpp4
-rw-r--r--engines/hopkins/graphics.cpp40
-rw-r--r--engines/hopkins/hopkins.cpp334
-rw-r--r--engines/hopkins/hopkins.h5
-rw-r--r--engines/hopkins/lines.cpp32
-rw-r--r--engines/hopkins/menu.cpp20
-rw-r--r--engines/hopkins/objects.cpp342
-rw-r--r--engines/hopkins/saveload.cpp4
-rw-r--r--engines/hopkins/script.cpp134
-rw-r--r--engines/hopkins/sound.cpp12
-rw-r--r--engines/hopkins/talk.cpp76
19 files changed, 697 insertions, 702 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp
index d1854027ec..c21bb8ee01 100644
--- a/engines/hopkins/anim.cpp
+++ b/engines/hopkins/anim.cpp
@@ -56,7 +56,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
if (_vm->shouldQuit())
return;
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
bool hasScreenCopy = false;
byte *screenP = _vm->_graphicsManager._vesaScreen;
@@ -105,22 +105,22 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
_vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_vm->_graphicsManager.updateScreen();
}
- _vm->_eventsManager._rateCounter = 0;
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_rateCounter = 0;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_soundManager.loadAnimSound();
if (_vm->_globals.iRegul == 1) {
// Do pre-animation delay
do {
- if (_vm->_eventsManager._escKeyFl)
+ if (_vm->_eventsManager->_escKeyFl)
break;
- _vm->_eventsManager.refreshEvents();
- } while (!_vm->shouldQuit() && _vm->_eventsManager._rateCounter < rate1);
+ _vm->_eventsManager->refreshEvents();
+ } while (!_vm->shouldQuit() && _vm->_eventsManager->_rateCounter < rate1);
}
- if (!_vm->_eventsManager._escKeyFl) {
- _vm->_eventsManager._rateCounter = 0;
+ if (!_vm->_eventsManager->_escKeyFl) {
+ _vm->_eventsManager->_rateCounter = 0;
int frameNumber = 0;
while (!_vm->shouldQuit()) {
++frameNumber;
@@ -138,16 +138,16 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
if (_vm->_globals.iRegul == 1) {
do {
- if (_vm->_eventsManager._escKeyFl)
+ if (_vm->_eventsManager->_escKeyFl)
break;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (!_vm->shouldQuit() && _vm->_eventsManager._rateCounter < rate2);
+ } while (!_vm->shouldQuit() && _vm->_eventsManager->_rateCounter < rate2);
}
- if (!_vm->_eventsManager._escKeyFl) {
- _vm->_eventsManager._rateCounter = 0;
+ if (!_vm->_eventsManager->_escKeyFl) {
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_graphicsManager.lockScreen();
if (hasScreenCopy) {
if (*screenP != kByteStop) {
@@ -166,19 +166,19 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
}
}
- if (_vm->_globals.iRegul == 1 && !_vm->_eventsManager._escKeyFl) {
+ if (_vm->_globals.iRegul == 1 && !_vm->_eventsManager->_escKeyFl) {
// Do post-animation delay
do {
- if (_vm->_eventsManager._escKeyFl)
+ if (_vm->_eventsManager->_escKeyFl)
break;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (_vm->_eventsManager._rateCounter < rate3);
+ } while (_vm->_eventsManager->_rateCounter < rate3);
}
- if (!_vm->_eventsManager._escKeyFl) {
- _vm->_eventsManager._rateCounter = 0;
+ if (!_vm->_eventsManager->_escKeyFl) {
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_soundManager.checkSoundEnd();
}
@@ -220,7 +220,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
f.close();
_vm->_graphicsManager._skipVideoLockFl = false;
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->mouseOn();
}
/**
@@ -235,7 +235,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
if (_vm->shouldQuit())
return;
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
bool hasScreenCopy = false;
while (!_vm->shouldQuit()) {
@@ -292,22 +292,22 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
_vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_vm->_graphicsManager.updateScreen();
}
- _vm->_eventsManager._rateCounter = 0;
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_rateCounter = 0;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_soundManager.loadAnimSound();
if (_vm->_globals.iRegul == 1) {
- while (!_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate1) {
- _vm->_eventsManager.refreshEvents();
+ while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate1) {
+ _vm->_eventsManager->refreshEvents();
}
}
break;
}
- if (!_vm->_eventsManager._escKeyFl) {
- _vm->_eventsManager._rateCounter = 0;
+ if (!_vm->_eventsManager->_escKeyFl) {
+ _vm->_eventsManager->_rateCounter = 0;
int frameNumber = 0;
for (;;) {
- if (_vm->_eventsManager._escKeyFl)
+ if (_vm->_eventsManager->_escKeyFl)
break;
++frameNumber;
_vm->_soundManager.playAnimSound(frameNumber);
@@ -321,13 +321,13 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
f.read(screenP, READ_LE_UINT32(imageStr + 8));
if (_vm->_globals.iRegul == 1) {
- while (!_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate2) {
- _vm->_eventsManager.refreshEvents();
+ while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate2) {
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
}
}
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_graphicsManager.lockScreen();
if (*screenP != kByteStop) {
if (hasScreenCopy) {
@@ -345,8 +345,8 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
}
if (_vm->_globals.iRegul == 1) {
- while (!_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate3) {
- _vm->_eventsManager.refreshEvents();
+ while (!_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate3) {
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
}
}
@@ -403,7 +403,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
_vm->_graphicsManager.setScreenWidth(2 * SCREEN_WIDTH);
_vm->_graphicsManager._maxX = 2 * SCREEN_WIDTH;
_vm->_graphicsManager.lockScreen();
- _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
} else {
_vm->_graphicsManager.setScreenWidth(SCREEN_WIDTH);
_vm->_graphicsManager._maxX = SCREEN_WIDTH;
@@ -417,7 +417,7 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 rate1, u
_vm->_graphicsManager.fadeInShort();
_vm->_graphicsManager.updateScreen();
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->mouseOn();
}
/**
@@ -616,9 +616,9 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
return;
bool hasScreenCopy = false;
- _vm->_eventsManager._mouseFl = false;
+ _vm->_eventsManager->_mouseFl = false;
if (!NO_COUL) {
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_graphicsManager._lineNbr == SCREEN_WIDTH)
_vm->_saveLoadManager.saveFile("TEMP.SCR", _vm->_graphicsManager._vesaScreen, 307200);
@@ -668,41 +668,41 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
}
bool skipFl = false;
if (_vm->getIsDemo()) {
- _vm->_eventsManager._rateCounter = 0;
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_rateCounter = 0;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_soundManager.loadAnimSound();
if (_vm->_globals.iRegul == 1) {
do {
- if (_vm->shouldQuit() || (_vm->_eventsManager._escKeyFl && !skipEscFl)) {
+ if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) {
skipFl = true;
break;
}
- _vm->_eventsManager._escKeyFl = false;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->_escKeyFl = false;
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (_vm->_eventsManager._rateCounter < rate1);
+ } while (_vm->_eventsManager->_rateCounter < rate1);
}
} else {
if (NO_COUL)
_vm->_graphicsManager.fadeInDefaultLength(screenP);
- _vm->_eventsManager._rateCounter = 0;
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_rateCounter = 0;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_soundManager.loadAnimSound();
if (_vm->_globals.iRegul == 1) {
do {
- if (_vm->shouldQuit() || (_vm->_eventsManager._escKeyFl && !skipEscFl)) {
+ if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) {
skipFl = true;
break;
}
- _vm->_eventsManager._escKeyFl = false;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->_escKeyFl = false;
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (_vm->_eventsManager._rateCounter < rate1);
+ } while (_vm->_eventsManager->_rateCounter < rate1);
}
}
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
if (!skipFl) {
int soundNumber = 0;
for (;;) {
@@ -719,21 +719,21 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
f.read(screenP, READ_LE_UINT32(imageStr + 8));
if (_vm->_globals.iRegul == 1) {
do {
- if (_vm->shouldQuit() || (_vm->_eventsManager._escKeyFl && !skipEscFl)) {
+ if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) {
skipFl = true;
break;
}
- _vm->_eventsManager._escKeyFl = false;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->_escKeyFl = false;
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (_vm->_eventsManager._rateCounter < rate2);
+ } while (_vm->_eventsManager->_rateCounter < rate2);
}
if (skipFl)
break;
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_graphicsManager.lockScreen();
if (hasScreenCopy) {
if (*screenP != kByteStop) {
@@ -753,19 +753,19 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
if (_vm->_globals.iRegul == 1 && !skipFl) {
do {
- if (_vm->shouldQuit() || (_vm->_eventsManager._escKeyFl && !skipEscFl)) {
+ if (_vm->shouldQuit() || (_vm->_eventsManager->_escKeyFl && !skipEscFl)) {
skipFl = true;
break;
}
- _vm->_eventsManager._escKeyFl = false;
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->_escKeyFl = false;
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (_vm->_eventsManager._rateCounter < rate3);
+ } while (_vm->_eventsManager->_rateCounter < rate3);
}
if (!skipFl)
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_graphicsManager._skipVideoLockFl = false;
f.close();
@@ -774,7 +774,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
_vm->_saveLoadManager.load("TEMP.SCR", _vm->_graphicsManager._vesaScreen);
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
- _vm->_eventsManager._mouseFl = true;
+ _vm->_eventsManager->_mouseFl = true;
}
if (hasScreenCopy)
_vm->_globals.freeMemory(screenCopy);
@@ -794,7 +794,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
if (_vm->shouldQuit())
return;
- _vm->_eventsManager._mouseFl = false;
+ _vm->_eventsManager->_mouseFl = false;
screenP = _vm->_graphicsManager._vesaScreen;
if (!f.open(file))
@@ -830,20 +830,20 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
_vm->_graphicsManager.addRefreshRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
_vm->_graphicsManager.updateScreen();
}
- _vm->_eventsManager._rateCounter = 0;
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_rateCounter = 0;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_soundManager.loadAnimSound();
if (_vm->_globals.iRegul == 1) {
do {
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (!_vm->shouldQuit() && !_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate1);
+ } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate1);
}
break;
}
- if (!_vm->_eventsManager._escKeyFl) {
- _vm->_eventsManager._rateCounter = 0;
+ if (!_vm->_eventsManager->_escKeyFl) {
+ _vm->_eventsManager->_rateCounter = 0;
frameNumber = 0;
while (!_vm->shouldQuit()) {
_vm->_soundManager.playAnimSound(frameNumber++);
@@ -859,11 +859,11 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
f.read(screenP, READ_LE_UINT32(imageStr + 8));
if (_vm->_globals.iRegul == 1) {
do {
- _vm->_eventsManager.refreshEvents();
- } while (!_vm->shouldQuit() && !_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate2);
+ _vm->_eventsManager->refreshEvents();
+ } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate2);
}
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
_vm->_graphicsManager.lockScreen();
if (multiScreenFl) {
if (*screenP != kByteStop) {
@@ -884,12 +884,12 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
if (_vm->_globals.iRegul == 1) {
// Wait for third rate delay
do {
- _vm->_eventsManager.refreshEvents();
+ _vm->_eventsManager->refreshEvents();
_vm->_soundManager.checkSoundEnd();
- } while (!_vm->shouldQuit() && !_vm->_eventsManager._escKeyFl && _vm->_eventsManager._rateCounter < rate3);
+ } while (!_vm->shouldQuit() && !_vm->_eventsManager->_escKeyFl && _vm->_eventsManager->_rateCounter < rate3);
}
- _vm->_eventsManager._rateCounter = 0;
+ _vm->_eventsManager->_rateCounter = 0;
if (_vm->_graphicsManager.FADE_LINUX == 2 && !multiScreenFl) {
byte *ptra = _vm->_globals.allocMemory(307200);
@@ -926,7 +926,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
_vm->_graphicsManager.FADE_LINUX = 0;
f.close();
- _vm->_eventsManager._mouseFl = true;
+ _vm->_eventsManager->_mouseFl = true;
}
} // End of namespace Hopkins
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 824d52249c..8bde4dc5e7 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -90,7 +90,7 @@ void ComputerManager::setTextMode() {
_vm->_graphicsManager.loadImage("WINTEXT");
_vm->_graphicsManager.fadeInLong();
loadMenu();
- _vm->_eventsManager._mouseFl = false;
+ _vm->_eventsManager->_mouseFl = false;
}
/**
@@ -124,7 +124,7 @@ void ComputerManager::setTextPosition(int yp, int xp) {
* @param mode Which computer to display
*/
void ComputerManager::showComputer(ComputerEnum mode) {
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_escKeyFl = false;
_vm->_graphicsManager.resetDirtyRects();
setVideoMode();
setTextColor(4);
@@ -156,7 +156,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
if (passwordMatch) {
while (!_vm->shouldQuit()) {
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_escKeyFl = false;
clearScreen();
setTextColor(4);
setTextPosition(2, 4);
@@ -198,7 +198,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
bool numericFlag = false;
char keyPressed;
do {
- keyPressed = _vm->_eventsManager.waitKeyPress();
+ keyPressed = _vm->_eventsManager->waitKeyPress();
if (_vm->shouldQuit())
return;
@@ -268,8 +268,8 @@ void ComputerManager::showComputer(ComputerEnum mode) {
setTextColor(4);
setTextPosition(16, 25);
outText(Common::String(_menuText[5]._line));
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.delay(1000);
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->delay(1000);
memset(_vm->_graphicsManager._vesaBuffer, 0, 307199);
_vm->_graphicsManager.lockScreen();
@@ -277,7 +277,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
_vm->_graphicsManager.unlockScreen();
_vm->_graphicsManager.updateScreen();
restoreFBIRoom();
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
}
if (mode == COMPUTER_HOPKINS)
@@ -402,12 +402,12 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) {
int x2 = 0;
int textIndex = 0;
- bool oldMouseFlag = _vm->_eventsManager._mouseFl;
- _vm->_eventsManager._mouseFl = false;
+ bool oldMouseFlag = _vm->_eventsManager->_mouseFl;
+ _vm->_eventsManager->_mouseFl = false;
_vm->_fontManager.displayTextVesa(xp, yp, "_", 252);
do {
- curChar = _vm->_eventsManager.waitKeyPress();
+ curChar = _vm->_eventsManager->waitKeyPress();
if (_vm->shouldQuit())
return;
@@ -438,15 +438,15 @@ void ComputerManager::displayMessage(int xp, int yp, int textIdx) {
++textIndex;
x1 += _vm->_fontManager._fontFixedWidth;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (textIndex != textIdx && curChar != 13);
_vm->_graphicsManager.Copy_Mem(_vm->_graphicsManager._vesaScreen, x1, yp, _vm->_fontManager._fontFixedWidth, 12, _vm->_graphicsManager._vesaBuffer, x1, yp);
_vm->_graphicsManager.addDirtyRect(x1, yp, _vm->_fontManager._fontFixedWidth + x1, yp + 12);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_inputBuf[textIndex] = 0;
- _vm->_eventsManager._mouseFl = oldMouseFlag;
+ _vm->_eventsManager->_mouseFl = oldMouseFlag;
}
/**
@@ -472,14 +472,14 @@ void ComputerManager::restoreFBIRoom() {
_vm->_fontManager._fontFixedWidth = 12;
_vm->_fontManager._fontFixedHeight = 21;
- _vm->_eventsManager._mouseFl = true;
+ _vm->_eventsManager->_mouseFl = true;
}
/**
* Display texts for the given menu entry
*/
void ComputerManager::readText(int idx) {
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_escKeyFl = false;
Common::String filename;
if (_vm->_globals._language == LANG_EN)
@@ -513,7 +513,7 @@ void ComputerManager::readText(int idx) {
outText(curStr);
++lineNum;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
curStr = "";
} else if (curChar != '%') {
curStr += curChar;
@@ -522,7 +522,7 @@ void ComputerManager::readText(int idx) {
assert(pos <= fileSize);
} while (curChar != '%');
- _vm->_eventsManager.waitKeyPress();
+ _vm->_eventsManager->waitKeyPress();
ptr = _vm->_globals.freeMemory(ptr);
}
@@ -534,9 +534,9 @@ void ComputerManager::displayGamesSubMenu() {
uint oldSpeed = _vm->_globals._speed;
_vm->_globals._speed = 1;
- _vm->_eventsManager.changeMouseCursor(0);
+ _vm->_eventsManager->changeMouseCursor(0);
_breakoutSpr = g_PTRNUL;
- _vm->_eventsManager._breakoutFl = true;
+ _vm->_eventsManager->_breakoutFl = true;
_breakoutLevel = (int16 *)g_PTRNUL;
_breakoutBrickNbr = 0;
_breakoutScore = 0;
@@ -568,7 +568,7 @@ void ComputerManager::displayGamesSubMenu() {
_vm->_soundManager.removeSample(2);
_vm->_soundManager.removeSample(3);
_vm->_globals._speed = oldSpeed;
- _vm->_eventsManager._breakoutFl = false;
+ _vm->_eventsManager->_breakoutFl = false;
setVideoMode();
setTextColor(15);
clearScreen();
@@ -651,7 +651,7 @@ void ComputerManager::newLevel() {
_vm->_objectsManager.animateSprite(0);
_vm->_objectsManager.animateSprite(1);
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->mouseOn();
_vm->_soundManager.playSample(3, 5);
}
@@ -725,27 +725,27 @@ void ComputerManager::playBreakout() {
while (!_vm->shouldQuit()) {
while (!_vm->shouldQuit()) {
// Set up the racket and ball
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_ballPosition = Common::Point(_padPositionX + 14, 187);
_vm->_objectsManager.setSpriteY(1, 187);
_vm->_objectsManager.setSpriteX(1, _ballPosition.x);
_vm->_graphicsManager.resetDirtyRects();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager.fadeInBreakout();
// Wait for mouse press to start playing
do {
- _padPositionX = _vm->_eventsManager.getMouseX();
- if (_vm->_eventsManager._mousePos.x <= 4)
+ _padPositionX = _vm->_eventsManager->getMouseX();
+ if (_vm->_eventsManager->_mousePos.x <= 4)
_padPositionX = 5;
if (_padPositionX > 282)
_padPositionX = 282;
_vm->_objectsManager.setSpriteX(0, _padPositionX);
_vm->_objectsManager.setSpriteX(1, _padPositionX + 14);
_vm->_objectsManager.setSpriteY(1, 187);
- _vm->_eventsManager.refreshScreenAndEvents();
- } while (!_vm->shouldQuit() && _vm->_eventsManager.getMouseButton() != 1);
+ _vm->_eventsManager->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && _vm->_eventsManager->getMouseButton() != 1);
_breakoutSpeed = 1;
_ballPosition = Common::Point(_padPositionX + 14, 187);
@@ -756,14 +756,14 @@ void ComputerManager::playBreakout() {
do {
_vm->_soundManager.checkSounds();
- _padPositionX = _vm->_eventsManager.getMouseX();
- if (_vm->_eventsManager._mousePos.x <= 4)
+ _padPositionX = _vm->_eventsManager->getMouseX();
+ if (_vm->_eventsManager->_mousePos.x <= 4)
_padPositionX = 5;
if (_padPositionX > 282)
_padPositionX = 282;
_vm->_objectsManager.setSpriteX(0, _padPositionX);
lastBreakoutEvent = moveBall();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (!_vm->shouldQuit() && !lastBreakoutEvent);
if (lastBreakoutEvent != 1)
break;
@@ -777,7 +777,7 @@ void ComputerManager::playBreakout() {
}
_vm->_graphicsManager.fadeOutBreakout();
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->mouseOn();
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.removeSprite(1);
if (_breakoutScore > _breakoutHiscore)
@@ -836,19 +836,19 @@ int ComputerManager::displayHiscores() {
_vm->_graphicsManager.resetDirtyRects();
int buttonIndex = 0;
do {
- _vm->_eventsManager.refreshEvents();
- xp = _vm->_eventsManager.getMouseX();
- yp = _vm->_eventsManager.getMouseY();
+ _vm->_eventsManager->refreshEvents();
+ xp = _vm->_eventsManager->getMouseX();
+ yp = _vm->_eventsManager->getMouseY();
- if (_vm->_eventsManager.getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13)
+ if (_vm->_eventsManager->getMouseButton() == 1 && ABS(xp - 79) <= 33 && ABS(yp - 396) <= 13)
buttonIndex = 1;
- else if (_vm->_eventsManager.getMouseButton() == 1 && ABS(xp - 583) <= 32 && ABS(yp - 396) <= 13)
+ else if (_vm->_eventsManager->getMouseButton() == 1 && ABS(xp - 583) <= 32 && ABS(yp - 396) <= 13)
buttonIndex = 2;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (!buttonIndex && !_vm->shouldQuit());
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_vm->_graphicsManager.fadeOutBreakout();
_vm->_globals.freeMemory(ptr);
return buttonIndex;
@@ -868,7 +868,7 @@ void ComputerManager::getScoreName() {
for (int strPos = 0; strPos <= 4; strPos++) {
displayHiscoreLine(ptr, 9 * strPos + 140, 78, 1);
- char curChar = toupper(_vm->_eventsManager.waitKeyPress());
+ char curChar = toupper(_vm->_eventsManager->waitKeyPress());
if ((curChar < '0') && (curChar > 'Z'))
curChar = ' ';
if ((curChar > '9') && (curChar < 'A'))
@@ -878,7 +878,7 @@ void ComputerManager::getScoreName() {
displayHiscoreLine(ptr, 9 * strPos + 140, 78, curChar);
for (int idx = 0; idx < 12; ++idx)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
_score[5]._score = " ";
diff --git a/engines/hopkins/debugger.cpp b/engines/hopkins/debugger.cpp
index 07a0c92be6..8e53b94eec 100644
--- a/engines/hopkins/debugger.cpp
+++ b/engines/hopkins/debugger.cpp
@@ -28,15 +28,12 @@
namespace Hopkins {
-Debugger::Debugger() : GUI::Debugger() {
+Debugger::Debugger(HopkinsEngine *vm) : GUI::Debugger() {
+ _vm = vm;
DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit));
DCmd_Register("rects", WRAP_METHOD(Debugger, cmd_DirtyRects));
}
-void Debugger::setParent(HopkinsEngine *vm) {
- _vm = vm;
-}
-
// Turns dirty rects on or off
bool Debugger::cmd_DirtyRects(int argc, const char **argv) {
if (argc != 2) {
diff --git a/engines/hopkins/debugger.h b/engines/hopkins/debugger.h
index 1ce018b38c..ed99b4479d 100644
--- a/engines/hopkins/debugger.h
+++ b/engines/hopkins/debugger.h
@@ -35,9 +35,8 @@ private:
HopkinsEngine *_vm;
public:
- Debugger();
+ Debugger(HopkinsEngine *vm);
virtual ~Debugger() {}
- void setParent(HopkinsEngine *vm);
bool cmd_DirtyRects(int argc, const char **argv);
};
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index 6da15e4953..78ced9897e 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -55,8 +55,8 @@ DialogsManager::~DialogsManager() {
}
void DialogsManager::showOptionsDialog() {
- _vm->_eventsManager.changeMouseCursor(0);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->changeMouseCursor(0);
+ _vm->_eventsManager->refreshScreenAndEvents();
Common::String filename;
if (_vm->getPlatform() == Common::kPlatformOS2 || _vm->getPlatform() == Common::kPlatformBeOS)
filename = "OPTION.SPR";
@@ -75,10 +75,10 @@ void DialogsManager::showOptionsDialog() {
int scrollOffset = _vm->_graphicsManager._scrollOffset;
bool doneFlag = false;
do {
- if (_vm->_eventsManager.getMouseButton()) {
- Common::Point mousePos(_vm->_eventsManager.getMouseX(), _vm->_eventsManager.getMouseY());
- mousePos.x = _vm->_eventsManager.getMouseX();
- mousePos.y = _vm->_eventsManager.getMouseY();
+ if (_vm->_eventsManager->getMouseButton()) {
+ Common::Point mousePos(_vm->_eventsManager->getMouseX(), _vm->_eventsManager->getMouseY());
+ mousePos.x = _vm->_eventsManager->getMouseX();
+ mousePos.y = _vm->_eventsManager->getMouseY();
if (!_vm->_soundManager._musicOffFl) {
if (mousePos.x >= scrollOffset + 300 && mousePos.y > 113 && mousePos.x <= scrollOffset + 327 && mousePos.y <= 138) {
@@ -295,7 +295,7 @@ void DialogsManager::showOptionsDialog() {
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (!doneFlag);
_vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, scrollOffset + 164,
@@ -315,17 +315,17 @@ void DialogsManager::showInventory() {
_vm->_objectsManager._visibleFl = false;
for (int i = 0; i <= 1; i++) {
inventAnim();
- _vm->_eventsManager.getMouseX();
- _vm->_eventsManager.getMouseY();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->getMouseX();
+ _vm->_eventsManager->getMouseY();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
_inventWin1 = g_PTRNUL;
bool loopFl;
do {
loopFl = false;
- _vm->_eventsManager._curMouseButton = 0;
- _vm->_eventsManager._mouseButton = 0;
+ _vm->_eventsManager->_curMouseButton = 0;
+ _vm->_eventsManager->_mouseButton = 0;
_vm->_globals._disableInventFl = true;
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
@@ -382,7 +382,7 @@ void DialogsManager::showInventory() {
curPosY += 38;
}
_vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, _inventWin1, _inventX, _inventY, _inventWidth, _inventHeight);
- _vm->_eventsManager._curMouseButton = 0;
+ _vm->_eventsManager->_curMouseButton = 0;
int newInventoryItem = 0;
// Main loop to select an inventory item
@@ -390,38 +390,38 @@ void DialogsManager::showInventory() {
// Turn on drawing the inventory dialog in the event manager
_inventDisplayedFl = true;
- int mousePosX = _vm->_eventsManager.getMouseX();
- int mousePosY = _vm->_eventsManager.getMouseY();
- int mouseButton = _vm->_eventsManager.getMouseButton();
+ int mousePosX = _vm->_eventsManager->getMouseX();
+ int mousePosY = _vm->_eventsManager->getMouseY();
+ int mouseButton = _vm->_eventsManager->getMouseButton();
int oldInventoryItem = newInventoryItem;
newInventoryItem = _vm->_linesManager.checkInventoryHotspots(mousePosX, mousePosY);
if (newInventoryItem != oldInventoryItem)
_vm->_objectsManager.initBorder(newInventoryItem);
- if (_vm->_eventsManager._mouseCursorId != 1 && _vm->_eventsManager._mouseCursorId != 2 && _vm->_eventsManager._mouseCursorId != 3 && _vm->_eventsManager._mouseCursorId != 16) {
+ if (_vm->_eventsManager->_mouseCursorId != 1 && _vm->_eventsManager->_mouseCursorId != 2 && _vm->_eventsManager->_mouseCursorId != 3 && _vm->_eventsManager->_mouseCursorId != 16) {
if (mouseButton == 2) {
_vm->_objectsManager.nextObjectIcon(newInventoryItem);
- if (_vm->_eventsManager._mouseCursorId != 23)
- _vm->_eventsManager.changeMouseCursor(_vm->_eventsManager._mouseCursorId);
+ if (_vm->_eventsManager->_mouseCursorId != 23)
+ _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId);
}
}
if (mouseButton == 1) {
- if (_vm->_eventsManager._mouseCursorId == 1 || _vm->_eventsManager._mouseCursorId == 2 || _vm->_eventsManager._mouseCursorId == 3 || _vm->_eventsManager._mouseCursorId == 16 || !_vm->_eventsManager._mouseCursorId)
+ if (_vm->_eventsManager->_mouseCursorId == 1 || _vm->_eventsManager->_mouseCursorId == 2 || _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16 || !_vm->_eventsManager->_mouseCursorId)
break;
_vm->_objectsManager.takeInventoryObject(_vm->_globals._inventory[newInventoryItem]);
- if (_vm->_eventsManager._mouseCursorId == 8)
+ if (_vm->_eventsManager->_mouseCursorId == 8)
break;
_vm->_scriptManager._tempObjectFl = true;
_vm->_globals._saveData->_data[svLastObjectIndex] = _vm->_objectsManager._curObjectIndex;
_vm->_globals._saveData->_data[svLastInventoryItem] = _vm->_globals._inventory[newInventoryItem];
- _vm->_globals._saveData->_data[svLastInvMouseCursor] = _vm->_eventsManager._mouseCursorId;
+ _vm->_globals._saveData->_data[svLastInvMouseCursor] = _vm->_eventsManager->_mouseCursorId;
_vm->_objectsManager.OPTI_OBJET();
_vm->_scriptManager._tempObjectFl = false;
if (_vm->_soundManager._voiceOffFl) {
do
- _vm->_eventsManager.refreshScreenAndEvents();
- while (!_vm->_globals._exitId && _vm->_eventsManager.getMouseButton() != 1);
+ _vm->_eventsManager->refreshScreenAndEvents();
+ while (!_vm->_globals._exitId && _vm->_eventsManager->getMouseButton() != 1);
_vm->_fontManager.hideText(9);
}
if (_vm->_globals._exitId) {
@@ -440,7 +440,7 @@ void DialogsManager::showInventory() {
}
if (_removeInventFl)
break;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_globals._screenId >= 35 && _vm->_globals._screenId <= 40)
_vm->_objectsManager.handleSpecialGames();
}
@@ -457,15 +457,15 @@ void DialogsManager::showInventory() {
_inventWin1 = _vm->_globals.freeMemory(_inventWin1);
_inventBuf2 = _vm->_globals.freeMemory(_inventBuf2);
- if (_vm->_eventsManager._mouseCursorId == 1)
+ if (_vm->_eventsManager->_mouseCursorId == 1)
showOptionsDialog();
- else if (_vm->_eventsManager._mouseCursorId == 3)
+ else if (_vm->_eventsManager->_mouseCursorId == 3)
showLoadGame();
- else if (_vm->_eventsManager._mouseCursorId == 2)
+ else if (_vm->_eventsManager->_mouseCursorId == 2)
showSaveGame();
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(4);
_vm->_objectsManager._oldBorderPos = Common::Point(0, 0);
_vm->_objectsManager._borderPos = Common::Point(0, 0);
_vm->_globals._disableInventFl = false;
@@ -523,13 +523,13 @@ void DialogsManager::inventAnim() {
*/
void DialogsManager::testDialogOpening() {
if (_vm->_globals._cityMapEnabledFl)
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
- if ((_vm->_eventsManager._gameKey == KEY_NONE) || _inventFl)
+ if ((_vm->_eventsManager->_gameKey == KEY_NONE) || _inventFl)
return;
- DIALOG_KEY key = _vm->_eventsManager._gameKey;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ DIALOG_KEY key = _vm->_eventsManager->_gameKey;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
_inventFl = true;
switch (key) {
@@ -556,24 +556,24 @@ void DialogsManager::testDialogOpening() {
}
_inventFl = false;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
}
/**
* Load Game dialog
*/
void DialogsManager::showLoadGame() {
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
showSaveLoad(MODE_LOAD);
int slotNumber;
do {
slotNumber = searchSavegames();
- _vm->_eventsManager.refreshScreenAndEvents();
- } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager.getMouseButton() != 1));
+ _vm->_eventsManager->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1));
_vm->_objectsManager._saveLoadFl = false;
- _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x + 183, 60);
- _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager._startPos.x + 183, 60, 457, 413);
+ _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60);
+ _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, 457, 413);
_vm->_objectsManager.BOBTOUS = true;
_vm->_objectsManager._saveLoadSprite = _vm->_globals.freeMemory(_vm->_objectsManager._saveLoadSprite);
_vm->_objectsManager._saveLoadSprite2 = _vm->_globals.freeMemory(_vm->_objectsManager._saveLoadSprite2);
@@ -591,18 +591,18 @@ void DialogsManager::showLoadGame() {
* Save Game dialog
*/
void DialogsManager::showSaveGame() {
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
showSaveLoad(MODE_SAVE);
int slotNumber;
do {
slotNumber = searchSavegames();
- _vm->_eventsManager.refreshScreenAndEvents();
- } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager.getMouseButton() != 1));
+ _vm->_eventsManager->refreshScreenAndEvents();
+ } while (!_vm->shouldQuit() && (!slotNumber || _vm->_eventsManager->getMouseButton() != 1));
_vm->_objectsManager._saveLoadFl = false;
- _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager._startPos.x + 183, 60);
- _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager._startPos.x + 183, 60, _vm->_eventsManager._startPos.x + 457, 413);
+ _vm->_graphicsManager.copySurface(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353, _vm->_graphicsManager._vesaBuffer, _vm->_eventsManager->_startPos.x + 183, 60);
+ _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413);
_vm->_objectsManager.BOBTOUS = true;
_vm->_objectsManager._saveLoadSprite = _vm->_globals.freeMemory(_vm->_objectsManager._saveLoadSprite);
_vm->_objectsManager._saveLoadSprite2 = _vm->_globals.freeMemory(_vm->_objectsManager._saveLoadSprite2);
@@ -642,18 +642,18 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) {
_vm->_objectsManager._saveLoadSprite = _vm->_objectsManager.loadSprite(filename);
_vm->_objectsManager._saveLoadSprite2 = _vm->_objectsManager.loadSprite("SAVE2.SPR");
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 483, 360, 0);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 483, 360, 0);
if (_vm->_globals._language == LANG_FR) {
if (mode == MODE_SAVE)
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 525, 375, 1);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 525, 375, 1);
else if (mode == MODE_LOAD)
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 515, 375, 2);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 515, 375, 2);
} else {
if (mode == MODE_SAVE)
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 535, 372, 1);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 535, 372, 1);
else if (mode == MODE_LOAD)
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 539, 372, 2);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 539, 372, 2);
}
for (int slotNumber = 1; slotNumber <= 6; ++slotNumber) {
@@ -666,22 +666,22 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) {
switch (slotNumber) {
case 1:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 112, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 112, 128, 87);
break;
case 2:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 112, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 112, 128, 87);
break;
case 3:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 203, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 203, 128, 87);
break;
case 4:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 203, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 203, 128, 87);
break;
case 5:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 190, 294, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 190, 294, 128, 87);
break;
case 6:
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager._startPos.x + 323, 294, 128, 87);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, thumb, _vm->_eventsManager->_startPos.x + 323, 294, 128, 87);
break;
}
@@ -691,7 +691,7 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) {
}
}
- _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager._startPos.x + 183, 60, 274, 353);
+ _vm->_graphicsManager.copySurfaceRect(_vm->_graphicsManager._vesaBuffer, _vm->_objectsManager._saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353);
_vm->_objectsManager._saveLoadFl = true;
_vm->_objectsManager._saveLoadX = 0;
_vm->_objectsManager._saveLoadY = 0;
@@ -701,14 +701,14 @@ void DialogsManager::showSaveLoad(SaveLoadMode mode) {
* Search savegames
*/
int DialogsManager::searchSavegames() {
- int xp = _vm->_eventsManager.getMouseX();
- int yp = _vm->_eventsManager.getMouseY();
+ int xp = _vm->_eventsManager->getMouseX();
+ int yp = _vm->_eventsManager->getMouseY();
- _vm->_graphicsManager._scrollOffset = _vm->_eventsManager._startPos.x;
+ _vm->_graphicsManager._scrollOffset = _vm->_eventsManager->_startPos.x;
int slotNumber = 0;
if (yp >= 112 && yp <= 198) {
- if (xp > _vm->_eventsManager._startPos.x + 189 && xp < _vm->_eventsManager._startPos.x + 318) {
+ if (xp > _vm->_eventsManager->_startPos.x + 189 && xp < _vm->_eventsManager->_startPos.x + 318) {
slotNumber = 1;
_vm->_objectsManager._saveLoadX = 189;
_vm->_objectsManager._saveLoadY = 111;
diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp
index b69d777f32..7732c4d386 100644
--- a/engines/hopkins/events.cpp
+++ b/engines/hopkins/events.cpp
@@ -33,7 +33,8 @@
namespace Hopkins {
-EventsManager::EventsManager() {
+EventsManager::EventsManager(HopkinsEngine *vm) {
+ _vm = vm;
_mouseFl = false;
_mouseLinuxFl = false;
_mouseSizeX = _mouseSizeY = 0;
@@ -62,10 +63,6 @@ EventsManager::~EventsManager() {
_vm->_globals.freeMemory(_mouseCursor);
}
-void EventsManager::setParent(HopkinsEngine *vm) {
- _vm = vm;
-}
-
void EventsManager::initMouseData() {
if (_vm->getPlatform() == Common::kPlatformLinux)
_mouseLinuxFl = true;
@@ -225,7 +222,7 @@ void EventsManager::checkForNextFrameCounter() {
_vm->_graphicsManager.updateScreen();
// Signal the ScummVM debugger
- _vm->_debugger.onFrame();
+ _vm->_debugger->onFrame();
}
}
@@ -292,8 +289,8 @@ void EventsManager::handleKey(Common::Event &event) {
// Check for debugger
if ((event.kbd.keycode == Common::KEYCODE_d) && (event.kbd.flags & Common::KBD_CTRL)) {
// Attach to the debugger
- _vm->_debugger.attach();
- _vm->_debugger.onFrame();
+ _vm->_debugger->attach();
+ _vm->_debugger->onFrame();
}
}
@@ -406,11 +403,11 @@ void EventsManager::refreshScreenAndEvents() {
if (yp + height > _vm->_graphicsManager._maxY)
height = _vm->_graphicsManager._maxY - yp;
if (width > 1 && height > 1) {
- _vm->_eventsManager.updateCursor();
+ updateCursor();
}
}
} else if (yp < _vm->_graphicsManager._maxY && xp < _vm->_graphicsManager._maxX && width > 1 && height > 1) {
- _vm->_eventsManager.updateCursor();
+ updateCursor();
_vm->_graphicsManager.addDirtyRect(xp, yp, right, bottom);
}
diff --git a/engines/hopkins/events.h b/engines/hopkins/events.h
index 52b9c25cd8..da07817afa 100644
--- a/engines/hopkins/events.h
+++ b/engines/hopkins/events.h
@@ -69,9 +69,8 @@ public:
byte *_objectBuf;
byte *_mouseCursor;
- EventsManager();
+ EventsManager(HopkinsEngine *vm);
~EventsManager();
- void setParent(HopkinsEngine *vm);
void initMouseData();
void delay(int totalMilli);
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index 864da4fd8d..5de601a65f 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -268,7 +268,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
_vm->_globals._boxWidth += 2;
_text[idx]._pos.x = 320 - abs(_vm->_globals._boxWidth / 2);
- textPosX = _vm->_eventsManager._startPos.x + _text[idx]._pos.x;
+ textPosX = _vm->_eventsManager->_startPos.x + _text[idx]._pos.x;
lineCount = 1;
_text[idx]._lines[0] = Common::String((const char *)_tempText, textLength);
} else {
@@ -338,10 +338,10 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
if ((_text[idx]._textType < 2) || (_text[idx]._textType > 3)) {
int i;
- for (i = xp - _vm->_eventsManager._startPos.x; _vm->_globals._boxWidth + i > 638 && i > -2 && _text[idx]._textType; i -= 2)
+ for (i = xp - _vm->_eventsManager->_startPos.x; _vm->_globals._boxWidth + i > 638 && i > -2 && _text[idx]._textType; i -= 2)
;
_text[idx]._pos.x = i;
- textPosX = _vm->_eventsManager._startPos.x + i;
+ textPosX = _vm->_eventsManager->_startPos.x + i;
} else {
_text[idx]._pos.x = textPosX;
}
@@ -352,7 +352,7 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
int saveHeight = (_fontFixedHeight + 1) * lineCount + 12;
if (_text[idx]._textType == 6) {
_text[idx]._pos.x = 315 - abs(saveWidth / 2);
- textPosX = posX = _vm->_eventsManager._startPos.x + _text[idx]._pos.x;
+ textPosX = posX = _vm->_eventsManager->_startPos.x + _text[idx]._pos.x;
_text[idx]._pos.y = posY = 50;
}
int textType = _text[idx]._textType;
@@ -480,12 +480,12 @@ void FontManager::renderTextDisplay(int xp, int yp, const Common::String &msg, i
int charStartPosX = charEndPosX;
charEndPosX += charWidth;
_vm->_graphicsManager.addDirtyRect(charStartPosX, yp, charEndPosX, yp + 12);
- if (_vm->_eventsManager._escKeyFl) {
+ if (_vm->_eventsManager->_escKeyFl) {
_vm->_globals.iRegul = 1;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} else {
_vm->_globals.iRegul = 4;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_globals.iRegul = 1;
}
}
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index 38c884a438..637ca236b2 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -240,7 +240,7 @@ void Globals::clearAll() {
initVBob();
_objectDataBuf = g_PTRNUL;
_curObjectFileNum = 0;
- _vm->_eventsManager._objectBuf = g_PTRNUL;
+ _vm->_eventsManager->_objectBuf = g_PTRNUL;
_vm->_dialogsManager->_inventWin1 = g_PTRNUL;
_vm->_dialogsManager->_inventBuf2 = g_PTRNUL;
_answerBuffer = g_PTRNUL;
@@ -256,7 +256,7 @@ void Globals::clearAll() {
_boxWidth = 240;
- _vm->_eventsManager._objectBuf = allocMemory(2500);
+ _vm->_eventsManager->_objectBuf = allocMemory(2500);
_objectDataBuf = g_PTRNUL;
}
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index ac3fdb493f..241be7ede0 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -259,7 +259,7 @@ void GraphicsManager::initColorTable(int minIndex, int maxIndex, byte *palette)
*/
void GraphicsManager::scrollScreen(int amount) {
int result = CLIP(amount, 0, SCREEN_WIDTH);
- _vm->_eventsManager._startPos.x = result;
+ _vm->_eventsManager->_startPos.x = result;
_scrollOffset = result;
_scrollPosX = result;
}
@@ -565,18 +565,18 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface)
// Set the transition palette and refresh the screen
setPaletteVGA256(palData2);
- m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
updateScreen();
// Added a delay in order to see the fading
- _vm->_eventsManager.delay(20);
+ _vm->_eventsManager->delay(20);
}
// Set the final palette
setPaletteVGA256(palette);
// Refresh the screen
- m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
updateScreen();
}
@@ -585,7 +585,7 @@ void GraphicsManager::fadeIn(const byte *palette, int step, const byte *surface)
*/
void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface) {
byte palData[PALETTE_BLOCK_SIZE];
- if ((step > 1) && (palette) && (!_vm->_eventsManager._escKeyFl)) {
+ if ((step > 1) && (palette) && (!_vm->_eventsManager->_escKeyFl)) {
int fadeStep = step;
for (int fadeIndex = 0; fadeIndex < fadeStep; fadeIndex++) {
for (int palOffset = 0; palOffset < PALETTE_BLOCK_SIZE; palOffset += 3) {
@@ -595,10 +595,10 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface
}
setPaletteVGA256(palData);
- m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
updateScreen();
- _vm->_eventsManager.delay(20);
+ _vm->_eventsManager->delay(20);
}
}
@@ -607,7 +607,7 @@ void GraphicsManager::fadeOut(const byte *palette, int step, const byte *surface
palData[i] = 0;
setPaletteVGA256(palData);
- m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
updateScreen();
}
@@ -692,7 +692,7 @@ void GraphicsManager::setPaletteVGA256(const byte *palette) {
void GraphicsManager::setPaletteVGA256WithRefresh(const byte *palette, const byte *surface) {
changePalette(palette);
- m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(surface, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
updateScreen();
}
@@ -1067,8 +1067,8 @@ void GraphicsManager::endDisplayBob() {
_vm->_objectsManager.hideBob(idx);
}
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
for (int idx = 1; idx <= 20; ++idx) {
if (_vm->_globals._animBqe[idx]._enabledFl)
@@ -1170,23 +1170,23 @@ void GraphicsManager::displayDirtyRects() {
Common::Rect &r = _dirtyRects[idx];
Common::Rect dstRect;
- if (_vm->_eventsManager._breakoutFl) {
+ if (_vm->_eventsManager->_breakoutFl) {
Copy_Vga16(_vesaBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left, r.top);
dstRect.left = r.left * 2;
dstRect.top = r.top * 2 + 30;
dstRect.setWidth((r.right - r.left) * 2);
dstRect.setHeight((r.bottom - r.top) * 2);
- } else if (r.right > _vm->_eventsManager._startPos.x && r.left < _vm->_eventsManager._startPos.x + SCREEN_WIDTH) {
- if (r.left < _vm->_eventsManager._startPos.x)
- r.left = _vm->_eventsManager._startPos.x;
- if (r.right > _vm->_eventsManager._startPos.x + SCREEN_WIDTH)
- r.right = _vm->_eventsManager._startPos.x + SCREEN_WIDTH;
+ } else if (r.right > _vm->_eventsManager->_startPos.x && r.left < _vm->_eventsManager->_startPos.x + SCREEN_WIDTH) {
+ if (r.left < _vm->_eventsManager->_startPos.x)
+ r.left = _vm->_eventsManager->_startPos.x;
+ if (r.right > _vm->_eventsManager->_startPos.x + SCREEN_WIDTH)
+ r.right = _vm->_eventsManager->_startPos.x + SCREEN_WIDTH;
// WORKAROUND: Original didn't lock the screen for access
lockScreen();
- m_scroll16(_vesaBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_eventsManager._startPos.x, r.top);
+ m_scroll16(_vesaBuffer, r.left, r.top, r.right - r.left, r.bottom - r.top, r.left - _vm->_eventsManager->_startPos.x, r.top);
- dstRect.left = r.left - _vm->_eventsManager._startPos.x;
+ dstRect.left = r.left - _vm->_eventsManager->_startPos.x;
dstRect.top = r.top;
dstRect.setWidth(r.right - r.left);
dstRect.setHeight(r.bottom - r.top);
@@ -1803,7 +1803,7 @@ void GraphicsManager::NB_SCREEN(bool initPalette) {
Trans_bloc2(_vesaBuffer, _colorTable, SCREEN_WIDTH * SCREEN_HEIGHT * 2);
lockScreen();
- m_scroll16(_vesaBuffer, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ m_scroll16(_vesaBuffer, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
unlockScreen();
memcpy(_vesaScreen, _vesaBuffer, 614399);
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index a099aa5f89..323682815e 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -43,9 +43,9 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
_animationManager = new AnimationManager(this);
_computerManager = new ComputerManager(this);
_dialogsManager = new DialogsManager(this);
+ _debugger = new Debugger(this);
+ _eventsManager = new EventsManager(this);
- _debugger.setParent(this);
- _eventsManager.setParent(this);
_fileManager.setParent(this);
_fontManager.setParent(this);
_globals.setParent(this);
@@ -60,6 +60,8 @@ HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDe
}
HopkinsEngine::~HopkinsEngine() {
+ delete _eventsManager;
+ delete _debugger;
delete _dialogsManager;
delete _computerManager;
delete _animationManager;
@@ -73,14 +75,14 @@ Common::String HopkinsEngine::generateSaveName(int slot) {
* Returns true if it is currently okay to restore a game
*/
bool HopkinsEngine::canLoadGameStateCurrently() {
- return !_globals._exitId && !_globals._cityMapEnabledFl && _eventsManager._mouseFl;
+ return !_globals._exitId && !_globals._cityMapEnabledFl && _eventsManager->_mouseFl;
}
/**
* Returns true if it is currently okay to save the game
*/
bool HopkinsEngine::canSaveGameStateCurrently() {
- return !_globals._exitId && !_globals._cityMapEnabledFl && _eventsManager._mouseFl;
+ return !_globals._exitId && !_globals._cityMapEnabledFl && _eventsManager->_mouseFl;
}
/**
@@ -134,22 +136,22 @@ bool HopkinsEngine::runWin95Demo() {
_graphicsManager.loadImage("H2");
_graphicsManager.fadeInLong();
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
playIntro();
- _eventsManager._rateCounter = 0;
+ _eventsManager->_rateCounter = 0;
_globals.iRegul = 1;
_globals._speed = 1;
for (int i = 1; i < 50; i++) {
_graphicsManager.copySurface(_graphicsManager._vesaScreen, 0, 0, 640, 440, _graphicsManager._vesaBuffer, 0, 0);
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
_globals.iRegul = 0;
- if (_eventsManager._rateCounter > 475)
+ if (_eventsManager->_rateCounter > 475)
_globals._speed = 2;
- if (_eventsManager._rateCounter > 700)
+ if (_eventsManager->_rateCounter > 700)
_globals._speed = 3;
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
@@ -200,7 +202,7 @@ bool HopkinsEngine::runWin95Demo() {
_graphicsManager.loadImage("fondes");
}
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
_soundManager._specialSoundNum = 2;
@@ -290,10 +292,10 @@ bool HopkinsEngine::runWin95Demo() {
else
_graphicsManager.loadImage("ENDUK");
_graphicsManager.fadeInLong();
- _eventsManager.mouseOn();
+ _eventsManager->mouseOn();
do
- _eventsManager.refreshScreenAndEvents();
- while (_eventsManager.getMouseButton() != 1);
+ _eventsManager->refreshScreenAndEvents();
+ while (_eventsManager->getMouseButton() != 1);
_graphicsManager.fadeOutLong();
restoreSystem();
} else
@@ -395,7 +397,7 @@ bool HopkinsEngine::runWin95Demo() {
_graphicsManager.clearPalette();
_graphicsManager.loadImage("njour3a");
_graphicsManager.fadeInLong();
- _eventsManager.delay(5000);
+ _eventsManager->delay(5000);
_graphicsManager.fadeOutLong();
_globals._exitId = 300;
_globals.iRegul = 0;
@@ -423,7 +425,7 @@ bool HopkinsEngine::runLinuxDemo() {
_objectsManager.addObject(14);
_objectsManager._helicopterFl = false;
- _eventsManager.mouseOff();
+ _eventsManager->mouseOff();
_graphicsManager.lockScreen();
_graphicsManager.clearScreen();
@@ -431,15 +433,15 @@ bool HopkinsEngine::runLinuxDemo() {
_graphicsManager.loadImage("LINUX");
_graphicsManager.fadeInLong();
- _eventsManager.delay(1500);
+ _eventsManager->delay(1500);
_graphicsManager.fadeOutLong();
_graphicsManager.loadImage("H2");
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
playIntro();
_globals.iRegul = 0;
@@ -505,7 +507,7 @@ bool HopkinsEngine::runLinuxDemo() {
_graphicsManager.loadImage("fondes");
}
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
_soundManager._specialSoundNum = 2;
@@ -748,7 +750,7 @@ bool HopkinsEngine::runFull() {
if (getPlatform() == Common::kPlatformLinux) {
_objectsManager._helicopterFl = false;
- _eventsManager.mouseOff();
+ _eventsManager->mouseOff();
// No code has been added to display the version as it's wrong
// in my copy: it mentions a Win95 version v4 using DirectDraw (Strangerke)
} else if (getPlatform() == Common::kPlatformWindows) {
@@ -759,7 +761,7 @@ bool HopkinsEngine::runFull() {
// It has been added there for debug purposes
_graphicsManager.loadImage("VERSW");
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_graphicsManager.clearVesaScreen();
} else {
@@ -767,7 +769,7 @@ bool HopkinsEngine::runFull() {
// displays a "loading please wait" screen.
_graphicsManager.loadImage("VERSW");
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_graphicsManager.clearVesaScreen();
@@ -782,7 +784,7 @@ bool HopkinsEngine::runFull() {
if (getPlatform() == Common::kPlatformLinux) {
_graphicsManager.loadImage("H2");
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_globals._speed = 2;
@@ -794,7 +796,7 @@ bool HopkinsEngine::runFull() {
_graphicsManager.fadeOutLong();
}
- if (!_eventsManager._escKeyFl) {
+ if (!_eventsManager->_escKeyFl) {
playIntro();
if (shouldQuit())
return false;
@@ -803,7 +805,7 @@ bool HopkinsEngine::runFull() {
_graphicsManager.fadeOutShort();
_graphicsManager.loadImage("H2");
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
}
_globals.iRegul = 0;
@@ -851,7 +853,7 @@ bool HopkinsEngine::runFull() {
_graphicsManager.loadImage("fondes");
}
_graphicsManager.fadeInLong();
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
_soundManager._specialSoundNum = 2;
@@ -1578,19 +1580,19 @@ void HopkinsEngine::initializeSystem() {
_globals.clearAll();
- _eventsManager.initMouseData();
+ _eventsManager->initMouseData();
_fontManager.initData();
_dialogsManager->_inventoryIcons = _fileManager.loadFile("ICONE.SPR");
_objectsManager._headSprites = _fileManager.loadFile("TETE.SPR");
- _eventsManager.setMouseOn();
- _eventsManager._mouseFl = false;
+ _eventsManager->setMouseOn();
+ _eventsManager->_mouseFl = false;
_globals.loadCharacterData();
- _eventsManager._mouseOffset.x = 0;
- _eventsManager._mouseOffset.y = 0;
+ _eventsManager->_mouseOffset.x = 0;
+ _eventsManager->_mouseOffset.y = 0;
}
/**
@@ -1605,26 +1607,26 @@ void HopkinsEngine::playIntro() {
byte paletteData2[PALETTE_EXT_BLOCK_SIZE];
memset(&paletteData, 0, PALETTE_EXT_BLOCK_SIZE);
- _eventsManager.refreshScreenAndEvents();
- _eventsManager._mouseFl = false;
+ _eventsManager->refreshScreenAndEvents();
+ _eventsManager->_mouseFl = false;
_globals.iRegul = 1;
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_soundManager.playSound(16);
_animationManager->_clearAnimationFl = true;
_animationManager->playAnim("J1.anm", 12, 12, 50);
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_soundManager.mixVoice(1, 3);
_animationManager->playAnim("J2.anm", 12, 12, 50);
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_soundManager.mixVoice(2, 3);
_animationManager->playAnim("J3.anm", 12, 12, 50);
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_soundManager.mixVoice(3, 3);
@@ -1642,7 +1644,7 @@ void HopkinsEngine::playIntro() {
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_globals.iRegul = 1;
_graphicsManager.fadeInLong();
@@ -1658,12 +1660,12 @@ void HopkinsEngine::playIntro() {
loopCond = true;
}
- if (_eventsManager.getMouseX() < _graphicsManager._scrollPosX + 10)
- _eventsManager.setMouseXY(_eventsManager._mousePos.x + 4, _eventsManager.getMouseY());
- _eventsManager.refreshScreenAndEvents();
+ if (_eventsManager->getMouseX() < _graphicsManager._scrollPosX + 10)
+ _eventsManager->setMouseXY(_eventsManager->_mousePos.x + 4, _eventsManager->getMouseY());
+ _eventsManager->refreshScreenAndEvents();
} while (!shouldQuit() && !loopCond && _graphicsManager._scrollPosX != SCREEN_WIDTH);
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager._scrollStatus = 0;
if (shouldQuit())
@@ -1687,23 +1689,23 @@ void HopkinsEngine::playIntro() {
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_globals.iRegul = 1;
_graphicsManager.fadeInLong();
for (uint i = 0; i < 200 / _globals._speed; ++i)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_objectsManager.setBobAnimation(3);
_soundManager.mixVoice(5, 3);
_objectsManager.stopBobAnimation(3);
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
memcpy(&paletteData2, _graphicsManager._palette, 796);
_graphicsManager.setPaletteVGA256WithRefresh(paletteData, _graphicsManager._vesaBuffer);
_graphicsManager.endDisplayBob();
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_soundManager._specialSoundNum = 5;
@@ -1711,7 +1713,7 @@ void HopkinsEngine::playIntro() {
_animationManager->playAnim("ELEC.ANM", 10, 26, 200);
_soundManager._specialSoundNum = 0;
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_graphicsManager.loadImage("intro2");
@@ -1729,18 +1731,18 @@ void HopkinsEngine::playIntro() {
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
for (int i = 0; i <= 3; i++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_globals.iRegul = 1;
_graphicsManager.setPaletteVGA256WithRefresh(paletteData2, _graphicsManager._vesaBuffer);
int introIndex = 0;
- while (!shouldQuit() && !_eventsManager._escKeyFl) {
+ while (!shouldQuit() && !_eventsManager->_escKeyFl) {
if (introIndex == 12) {
_objectsManager.setBobAnimation(3);
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_soundManager.mixVoice(6, 3);
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_objectsManager.stopBobAnimation(3);
}
@@ -1754,28 +1756,28 @@ void HopkinsEngine::playIntro() {
_graphicsManager.setPaletteVGA256WithRefresh(_graphicsManager._palette, _graphicsManager._vesaBuffer);
for (int i = 1; i < 2 * introIndex; i++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.setPaletteVGA256WithRefresh(paletteData2, _graphicsManager._vesaBuffer);
for (int i = 1; i < 20 - introIndex; i++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
introIndex += 2;
if (introIndex > 15) {
_graphicsManager.setPaletteVGA256WithRefresh(paletteData, _graphicsManager._vesaBuffer);
for (uint j = 1; j < 100 / _globals._speed; ++j)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_objectsManager.setBobAnimation(3);
_soundManager.mixVoice(7, 3);
_objectsManager.stopBobAnimation(3);
for (uint k = 1; k < 60 / _globals._speed; ++k)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_objectsManager.setBobAnimation(5);
for (uint l = 0; l < 20 / _globals._speed; ++l)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
Common::copy(&paletteData2[0], &paletteData2[PALETTE_BLOCK_SIZE], &_graphicsManager._palette[0]);
_graphicsManager.setPaletteVGA256WithRefresh(_graphicsManager._palette, _graphicsManager._vesaBuffer);
@@ -1787,7 +1789,7 @@ void HopkinsEngine::playIntro() {
_objectsManager.stopBobAnimation(3);
}
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
_graphicsManager.fadeOutLong();
@@ -1797,15 +1799,15 @@ void HopkinsEngine::playIntro() {
_soundManager._specialSoundNum = 1;
_animationManager->playAnim("INTRO1.anm", 10, 24, 18);
_soundManager._specialSoundNum = 0;
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_animationManager->playAnim("INTRO2.anm", 10, 24, 18);
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_animationManager->playAnim("INTRO3.anm", 10, 24, 200);
- if (shouldQuit() || _eventsManager._escKeyFl)
+ if (shouldQuit() || _eventsManager->_escKeyFl)
return;
_animationManager->_clearAnimationFl = false;
@@ -1815,7 +1817,7 @@ void HopkinsEngine::playIntro() {
}
}
- _eventsManager._escKeyFl = false;
+ _eventsManager->_escKeyFl = false;
}
/**
@@ -1832,7 +1834,7 @@ void HopkinsEngine::displayNotAvailable() {
_graphicsManager.fadeInLong();
if (_soundManager._voiceOffFl)
- _eventsManager.delay(500);
+ _eventsManager->delay(500);
else
_soundManager.mixVoice(628, 4);
@@ -1855,7 +1857,7 @@ void HopkinsEngine::displayEndDemo() {
_graphicsManager.loadImage("enduk");
_graphicsManager.fadeInLong();
- _eventsManager.delay(1500);
+ _eventsManager->delay(1500);
_graphicsManager.fadeOutLong();
_globals._exitId = 0;
}
@@ -1879,14 +1881,14 @@ void HopkinsEngine::bombExplosion() {
_objectsManager.stopBobAnimation(7);
for (int idx = 0; idx < 5; ++idx) {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
_graphicsManager.fadeInLong();
- _eventsManager.mouseOff();
+ _eventsManager->mouseOff();
for (int idx = 0; idx < 20; ++idx) {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
_globals._introSpeechOffFl = true;
@@ -1895,7 +1897,7 @@ void HopkinsEngine::bombExplosion() {
_objectsManager.setBobAnimation(7);
for (int idx = 0; idx < 100; ++idx) {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
_graphicsManager.fadeOutLong();
@@ -1906,29 +1908,29 @@ void HopkinsEngine::bombExplosion() {
void HopkinsEngine::restoreSystem() {
quitGame();
- _eventsManager.refreshEvents();
+ _eventsManager->refreshEvents();
}
void HopkinsEngine::endLinuxDemo() {
_globals._linuxEndDemoFl = true;
_graphicsManager.resetDirtyRects();
_objectsManager._forestFl = false;
- _eventsManager._breakoutFl = false;
+ _eventsManager->_breakoutFl = false;
_globals._disableInventFl = true;
_graphicsManager.loadImage("BOX");
_soundManager.playSound(28);
_graphicsManager.fadeInLong();
- _eventsManager.mouseOn();
- _eventsManager.changeMouseCursor(0);
- _eventsManager._mouseCursorId = 0;
- _eventsManager._mouseSpriteId = 0;
+ _eventsManager->mouseOn();
+ _eventsManager->changeMouseCursor(0);
+ _eventsManager->_mouseCursorId = 0;
+ _eventsManager->_mouseSpriteId = 0;
bool mouseClicked = false;
do {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1)
+ if (_eventsManager->getMouseButton() == 1)
mouseClicked = true;
} while (!mouseClicked && !shouldQuit());
@@ -1950,20 +1952,20 @@ void HopkinsEngine::handleConflagration() {
_graphicsManager.displayAllBob();
for (int cpt = 0; cpt <= 4; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.fadeInLong();
_globals.iRegul = 1;
for (int cpt = 0; cpt <= 249; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_globals._introSpeechOffFl = true;
_talkManager.startAnimatedCharacterDialogue("SVGARD1.pe2");
_globals._introSpeechOffFl = false;
for (int cpt = 0; cpt <= 49; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.fadeOutLong();
_graphicsManager.endDisplayBob();
@@ -1981,33 +1983,33 @@ void HopkinsEngine::playSubmarineCutscene() {
_animationManager->_clearAnimationFl = true;
_soundManager.playSound(25);
_animationManager->playAnim("base00a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base05a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base10a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base20a.anm", 10, 18, 18);
// CHECKME: The original code was doing the opposite test, which was a bug.
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base30a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base40a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("base50a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("OC00a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("OC05a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("OC10a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("OC20a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl) {
+ if (!_eventsManager->_escKeyFl) {
_graphicsManager.FADE_LINUX = 2;
_animationManager->playAnim("OC30a.anm", 10, 18, 18);
}
- _eventsManager._escKeyFl = false;
+ _eventsManager->_escKeyFl = false;
_animationManager->_clearAnimationFl = false;
_globals._exitId = 85;
}
@@ -2031,13 +2033,13 @@ void HopkinsEngine::playUnderwaterBaseCutscene() {
_objectsManager.loadLinkFile("IM92");
for (int cpt = 0; cpt <= 4; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.fadeInLong();
_globals.enableHiding();
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(8) != 22);
_graphicsManager.fadeOutLong();
@@ -2063,7 +2065,7 @@ void HopkinsEngine::playEnding() {
_graphicsManager.loadImage("IM100");
_animationManager->loadAnim("ANIM100");
_graphicsManager.displayAllBob();
- _eventsManager.mouseOn();
+ _eventsManager->mouseOn();
_objectsManager.stopBobAnimation(7);
_objectsManager.stopBobAnimation(8);
_objectsManager.stopBobAnimation(9);
@@ -2071,16 +2073,16 @@ void HopkinsEngine::playEnding() {
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
- _eventsManager.changeMouseCursor(0);
+ _eventsManager->changeMouseCursor(0);
for (int cpt = 0; cpt <= 4; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.fadeInLong();
_globals.iRegul = 1;
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(6) != 54);
_globals._introSpeechOffFl = true;
@@ -2092,36 +2094,36 @@ void HopkinsEngine::playEnding() {
_objectsManager.setBobAnimation(7);
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(7) != 54);
_soundManager.playSample(1);
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(7) != 65);
_globals._introSpeechOffFl = true;
_talkManager.startAnimatedCharacterDialogue("DUELB4.PE2");
- _eventsManager.mouseOff();
+ _eventsManager->mouseOff();
_globals._disableInventFl = true;
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(7) != 72);
_globals._introSpeechOffFl = true;
_talkManager.startAnimatedCharacterDialogue("DUELH1.PE2");
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(7) != 81);
_globals._introSpeechOffFl = true;
_talkManager.startAnimatedCharacterDialogue("DUELB5.PE2");
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(7) != 120);
_objectsManager.stopBobAnimation(7);
@@ -2135,13 +2137,13 @@ void HopkinsEngine::playEnding() {
_graphicsManager.loadImage("PLAN3");
_graphicsManager.fadeInLong();
- _eventsManager._rateCounter = 0;
- if (!_eventsManager._escKeyFl) {
+ _eventsManager->_rateCounter = 0;
+ if (!_eventsManager->_escKeyFl) {
do
- _eventsManager.refreshEvents();
- while (_eventsManager._rateCounter < 2000 / _globals._speed && !_eventsManager._escKeyFl);
+ _eventsManager->refreshEvents();
+ while (_eventsManager->_rateCounter < 2000 / _globals._speed && !_eventsManager->_escKeyFl);
}
- _eventsManager._escKeyFl = false;
+ _eventsManager->_escKeyFl = false;
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
_soundManager._specialSoundNum = 0;
@@ -2173,13 +2175,13 @@ void HopkinsEngine::playEnding() {
_globals._disableInventFl = true;
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(8) != 5);
_soundManager.directPlayWav("SOUND41.WAV");
do
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
while (_objectsManager.getBobAnimDataIdx(8) != 21);
_graphicsManager.fadeOutLong();
@@ -2209,38 +2211,38 @@ void HopkinsEngine::playPlaneCutscene() {
_animationManager->_clearAnimationFl = false;
_animationManager->playAnim("aerop00a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("serop10a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop20a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop30a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop40a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop50a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop60a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("aerop70a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans00a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans10a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans15a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans20a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans30a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl)
+ if (!_eventsManager->_escKeyFl)
_animationManager->playAnim("trans40a.anm", 10, 18, 18);
- if (!_eventsManager._escKeyFl) {
+ if (!_eventsManager->_escKeyFl) {
_graphicsManager.FADE_LINUX = 2;
_animationManager->playAnim("PARA00a.anm", 9, 9, 9);
}
- _eventsManager._escKeyFl = false;
+ _eventsManager->_escKeyFl = false;
_animationManager->_clearAnimationFl = false;
}
@@ -2299,7 +2301,7 @@ int HopkinsEngine::handleBaseMap() {
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
- _eventsManager.changeMouseCursor(0);
+ _eventsManager->changeMouseCursor(0);
_graphicsManager.fadeInLong();
bool loopCond = false;
int zone;
@@ -2307,9 +2309,9 @@ int HopkinsEngine::handleBaseMap() {
if (shouldQuit())
return 0;
- int mouseButton = _eventsManager.getMouseButton();
- int posX = _eventsManager.getMouseX();
- int posY = _eventsManager.getMouseY();
+ int mouseButton = _eventsManager->getMouseButton();
+ int posX = _eventsManager->getMouseX();
+ int posY = _eventsManager->getMouseY();
zone = 0;
if ((posX - 181 <= 16) && (posY - 66 <= 22) &&
(posX - 181 >= 0) && (posY - 66 >= 0))
@@ -2330,16 +2332,16 @@ int HopkinsEngine::handleBaseMap() {
(posX - 106 >= 0) && (posY - 267 >= 0))
zone = 6;
if (zone) {
- _eventsManager.changeMouseCursor(4);
+ _eventsManager->changeMouseCursor(4);
_globals._baseMapColor += 25;
if (_globals._baseMapColor > 100)
_globals._baseMapColor = 0;
_graphicsManager.SETCOLOR4(251, _globals._baseMapColor, _globals._baseMapColor, _globals._baseMapColor);
} else {
- _eventsManager.changeMouseCursor(0);
+ _eventsManager->changeMouseCursor(0);
_graphicsManager.SETCOLOR4(251, 100, 100, 100);
}
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
if ((mouseButton == 1) && zone)
loopCond = true;
} while (!loopCond);
@@ -2473,7 +2475,7 @@ void HopkinsEngine::displayCredits() {
_graphicsManager.loadImage("GENERIC");
_graphicsManager.fadeInLong();
_soundManager.playSound(28);
- _eventsManager._mouseFl = false;
+ _eventsManager->_mouseFl = false;
_globals.iRegul = 3;
_globals._creditsStartX = _globals._creditsEndX = _globals._creditsStartY = _globals._creditsEndY = -1;
int soundId = 28;
@@ -2507,10 +2509,10 @@ void HopkinsEngine::displayCredits() {
}
--_globals._creditsPosY;
if (_globals._creditsStartX != -1 || _globals._creditsEndX != -1 || _globals._creditsStartY != -1 || _globals._creditsEndY != -1) {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
_graphicsManager.copySurface(_graphicsManager._vesaScreen, 60, 50, 520, 380, _graphicsManager._vesaBuffer, 60, 50);
} else {
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
}
if (_globals._creditsItem[_globals._creditsLineNumb - 1]._linePosY <= 39) {
_globals._creditsPosY = 440;
@@ -2523,23 +2525,23 @@ void HopkinsEngine::displayCredits() {
_globals._creditsEndX = -1;
_globals._creditsStartY = -1;
_globals._creditsEndY = -1;
- } while ((_eventsManager.getMouseButton() != 1) && (!shouldQuit()));
+ } while ((_eventsManager->getMouseButton() != 1) && (!shouldQuit()));
_graphicsManager.fadeOutLong();
_globals.iRegul = 1;
- _eventsManager._mouseFl = true;
+ _eventsManager->_mouseFl = true;
}
void HopkinsEngine::handleOceanMouseEvents() {
_fontManager.hideText(9);
- if (_eventsManager._mouseCursorId != 16)
+ if (_eventsManager->_mouseCursorId != 16)
return;
- _eventsManager.getMouseX();
+ _eventsManager->getMouseX();
if (_objectsManager._zoneNum <= 0)
return;
- int oldPosX = _eventsManager.getMouseX();
- int oldPosY = _eventsManager.getMouseY();
+ int oldPosX = _eventsManager->getMouseX();
+ int oldPosY = _eventsManager->getMouseY();
bool displAnim = false;
int oldX;
switch (_objectsManager._zoneNum) {
@@ -2570,8 +2572,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX -= 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY) {
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) {
displAnim = true;
break;
}
@@ -2606,8 +2608,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX += 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY) {
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) {
displAnim = true;
break;
}
@@ -2628,8 +2630,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX += 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY) {
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) {
displAnim = true;
break;
}
@@ -2651,8 +2653,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX -= 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY) {
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) {
displAnim = true;
break;
}
@@ -2682,8 +2684,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX += 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY) {
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY) {
displAnim = true;
break;
}
@@ -2702,8 +2704,8 @@ void HopkinsEngine::handleOceanMouseEvents() {
oldX -= 6;
_objectsManager.setSpriteX(0, oldX);
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
- if (_eventsManager.getMouseButton() == 1 && oldPosX == _eventsManager.getMouseX() && _eventsManager.getMouseY() == oldPosY)
+ _eventsManager->refreshScreenAndEvents();
+ if (_eventsManager->getMouseButton() == 1 && oldPosX == _eventsManager->getMouseX() && _eventsManager->getMouseY() == oldPosY)
break;
if (oldX <= 236) {
@@ -2801,11 +2803,11 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
_objectsManager.animateSprite(0);
_linesManager._route = (RouteItem *)g_PTRNUL;
- _eventsManager.mouseOn();
- _eventsManager.changeMouseCursor(4);
+ _eventsManager->mouseOn();
+ _eventsManager->changeMouseCursor(4);
for (int cpt = 0; cpt <= 4; cpt++)
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
if (!_graphicsManager._noFadingFl)
_graphicsManager.fadeInLong();
@@ -2813,13 +2815,13 @@ void HopkinsEngine::handleOceanMaze(int16 curExitId, Common::String backgroundFi
_globals.iRegul = 1;
for (;;) {
- int mouseButton = _eventsManager.getMouseButton();
+ int mouseButton = _eventsManager->getMouseButton();
if (mouseButton && mouseButton == 1)
handleOceanMouseEvents();
_linesManager.checkZone();
setSubmarineSprites();
- _eventsManager.refreshScreenAndEvents();
+ _eventsManager->refreshScreenAndEvents();
if (_globals._exitId || shouldQuit())
break;
}
@@ -2853,21 +2855,21 @@ bool HopkinsEngine::displayAdultDisclaimer() {
_graphicsManager._minY = 0;
_graphicsManager._maxX = SCREEN_WIDTH;
_graphicsManager._maxY = SCREEN_HEIGHT - 1;
- _eventsManager._breakoutFl = false;
+ _eventsManager->_breakoutFl = false;
_objectsManager._forestFl = false;
_globals._disableInventFl = true;
_globals._exitId = 0;
_graphicsManager.loadImage("ADULT");
_graphicsManager.fadeInLong();
- _eventsManager.mouseOn();
- _eventsManager.changeMouseCursor(0);
- _eventsManager._mouseCursorId = 0;
- _eventsManager._mouseSpriteId = 0;
+ _eventsManager->mouseOn();
+ _eventsManager->changeMouseCursor(0);
+ _eventsManager->_mouseCursorId = 0;
+ _eventsManager->_mouseSpriteId = 0;
do {
- xp = _eventsManager.getMouseX();
- yp = _eventsManager.getMouseY();
+ xp = _eventsManager->getMouseX();
+ yp = _eventsManager->getMouseY();
buttonIndex = 0;
if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445)
@@ -2875,8 +2877,8 @@ bool HopkinsEngine::displayAdultDisclaimer() {
else if (xp >= 424 && xp <= 602 && yp >= 406 && yp <= 445)
buttonIndex = 1;
- _eventsManager.refreshScreenAndEvents();
- } while (!shouldQuit() && (buttonIndex == 0 || _eventsManager.getMouseButton() != 1));
+ _eventsManager->refreshScreenAndEvents();
+ } while (!shouldQuit() && (buttonIndex == 0 || _eventsManager->getMouseButton() != 1));
_globals._disableInventFl = false;
_graphicsManager.fadeOutLong();
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 5e07688eb7..8e90c3f369 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -142,11 +142,12 @@ protected:
virtual bool hasFeature(EngineFeature f) const;
public:
- Debugger _debugger;
AnimationManager *_animationManager;
ComputerManager *_computerManager;
DialogsManager *_dialogsManager;
- EventsManager _eventsManager;
+ Debugger *_debugger;
+ EventsManager *_eventsManager;
+
FontManager _fontManager;
Globals _globals;
FileManager _fileManager;
diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp
index c6238c5a52..030cb1ec7c 100644
--- a/engines/hopkins/lines.cpp
+++ b/engines/hopkins/lines.cpp
@@ -2528,9 +2528,9 @@ void LinesManager::PACOURS_PROPRE(RouteItem *route) {
int LinesManager::getMouseZone() {
int result;
- int xp = _vm->_eventsManager._mousePos.x + _vm->_eventsManager._mouseOffset.x;
- int yp = _vm->_eventsManager._mousePos.y + _vm->_eventsManager._mouseOffset.y;
- if ((_vm->_eventsManager._mousePos.y + _vm->_eventsManager._mouseOffset.y) > 19) {
+ int xp = _vm->_eventsManager->_mousePos.x + _vm->_eventsManager->_mouseOffset.x;
+ int yp = _vm->_eventsManager->_mousePos.y + _vm->_eventsManager->_mouseOffset.y;
+ if ((_vm->_eventsManager->_mousePos.y + _vm->_eventsManager->_mouseOffset.y) > 19) {
for (int bobZoneId = 0; bobZoneId <= 48; bobZoneId++) {
int bobId = BOBZONE[bobZoneId];
if (bobId && BOBZONE_FLAG[bobZoneId] && _vm->_objectsManager._bob[bobId]._bobMode && _vm->_objectsManager._bob[bobId]._frameIndex != 250 &&
@@ -2812,11 +2812,11 @@ void LinesManager::disableZone(int idx) {
}
void LinesManager::checkZone() {
- int mouseX = _vm->_eventsManager.getMouseX();
- int mouseY = _vm->_eventsManager.getMouseY();
+ int mouseX = _vm->_eventsManager->getMouseX();
+ int mouseY = _vm->_eventsManager->getMouseY();
int oldMouseY = mouseY;
if (_vm->_globals._cityMapEnabledFl
- || _vm->_eventsManager._startPos.x >= mouseX
+ || _vm->_eventsManager->_startPos.x >= mouseX
|| (mouseY = _vm->_graphicsManager._scrollOffset + 54, mouseX >= mouseY)
|| (mouseY = oldMouseY - 1, mouseY < 0 || mouseY > 59)) {
if (_vm->_objectsManager._visibleFl)
@@ -2847,8 +2847,8 @@ void LinesManager::checkZone() {
}
if (_vm->_globals._oldMouseZoneId != zoneId) {
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(4);
if (_vm->_globals._forceHideText) {
_vm->_fontManager.hideText(5);
_vm->_globals._forceHideText = false;
@@ -2871,31 +2871,31 @@ void LinesManager::checkZone() {
_vm->_globals._hotspotTextColor = 0;
_vm->_graphicsManager.SETCOLOR4(251, _vm->_globals._hotspotTextColor, _vm->_globals._hotspotTextColor,
_vm->_globals._hotspotTextColor);
- if (_vm->_eventsManager._mouseCursorId == 4) {
+ if (_vm->_eventsManager->_mouseCursorId == 4) {
if (ZONEP[zoneId]._verbFl1 == 2) {
- _vm->_eventsManager.changeMouseCursor(16);
- _vm->_eventsManager._mouseCursorId = 16;
+ _vm->_eventsManager->changeMouseCursor(16);
+ _vm->_eventsManager->_mouseCursorId = 16;
_vm->_objectsManager.setVerb(16);
}
}
} else {
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(4);
}
}
_vm->_objectsManager._zoneNum = zoneId;
_vm->_globals._oldMouseX = mouseX;
_vm->_globals._oldMouseY = oldMouseY;
_vm->_globals._oldMouseZoneId = zoneId;
- if (_vm->_globals._freezeCharacterFl && (_vm->_eventsManager._mouseCursorId == 4)) {
+ if (_vm->_globals._freezeCharacterFl && (_vm->_eventsManager->_mouseCursorId == 4)) {
if (zoneId != -1 && zoneId != 0)
_vm->_objectsManager.handleRightButton();
}
if ((_vm->_globals._cityMapEnabledFl && zoneId == -1) || !zoneId) {
_vm->_objectsManager.setVerb(0);
- _vm->_eventsManager._mouseCursorId = 0;
- _vm->_eventsManager.changeMouseCursor(0);
+ _vm->_eventsManager->_mouseCursorId = 0;
+ _vm->_eventsManager->changeMouseCursor(0);
}
}
}
diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp
index d5cf110a82..eb3f7ef1db 100644
--- a/engines/hopkins/menu.cpp
+++ b/engines/hopkins/menu.cpp
@@ -56,7 +56,7 @@ int MenuManager::menu() {
result = 0;
while (!g_system->getEventManager()->shouldQuit()) {
_vm->_objectsManager._forestFl = false;
- _vm->_eventsManager._breakoutFl = false;
+ _vm->_eventsManager->_breakoutFl = false;
_vm->_globals._disableInventFl = true;
_vm->_globals._exitId = 0;
@@ -87,10 +87,10 @@ int MenuManager::menu() {
else if (_vm->_globals._language == LANG_SP)
spriteData = _vm->_objectsManager.loadSprite("MENUES.SPR");
- _vm->_eventsManager.mouseOn();
- _vm->_eventsManager.changeMouseCursor(0);
- _vm->_eventsManager._mouseCursorId = 0;
- _vm->_eventsManager._mouseSpriteId = 0;
+ _vm->_eventsManager->mouseOn();
+ _vm->_eventsManager->changeMouseCursor(0);
+ _vm->_eventsManager->_mouseCursorId = 0;
+ _vm->_eventsManager->_mouseSpriteId = 0;
_vm->_soundManager.playSound(28);
@@ -101,7 +101,7 @@ int MenuManager::menu() {
return -1;
menuIndex = MENU_NONE;
- mousePos = Common::Point(_vm->_eventsManager.getMouseX(), _vm->_eventsManager.getMouseY());
+ mousePos = Common::Point(_vm->_eventsManager->getMouseX(), _vm->_eventsManager->getMouseY());
if (mousePos.x >= 232 && mousePos.x <= 408) {
if (mousePos.y >= 261 && mousePos.y <= 284)
@@ -125,16 +125,16 @@ int MenuManager::menu() {
_vm->_graphicsManager.fastDisplay(spriteData, 230, 322, frameIndex[2] + 4);
_vm->_graphicsManager.fastDisplay(spriteData, 230, 354, frameIndex[3] + 6);
_vm->_graphicsManager.fastDisplay(spriteData, 230, 386, frameIndex[4] + 8);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
- if (_vm->_eventsManager.getMouseButton() == 1 && menuIndex != MENU_NONE)
+ if (_vm->_eventsManager->getMouseButton() == 1 && menuIndex != MENU_NONE)
selectionMade = true;
} while (!selectionMade);
if (menuIndex > MENU_NONE) {
_vm->_graphicsManager.fastDisplay(spriteData, 230, 259 + 32 * (menuIndex - 1), 10 + (menuIndex - 1));
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.delay(200);
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->delay(200);
}
if (menuIndex == PLAY_GAME) {
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index 71fccd2d13..c4a7c11905 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -104,7 +104,7 @@ void ObjectsManager::clearAll() {
* Change Object
*/
void ObjectsManager::changeObject(int objIndex) {
- _vm->_eventsManager._objectBuf = loadObjectFromFile(objIndex, true);
+ _vm->_eventsManager->_objectBuf = loadObjectFromFile(objIndex, true);
_curObjectIndex = objIndex;
}
@@ -131,8 +131,8 @@ byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) {
_vm->_globals._objectHeight = height;
if (mode) {
- sprite_alone(_vm->_globals._objectDataBuf, _vm->_eventsManager._objectBuf, idx);
- dataP = _vm->_eventsManager._objectBuf;
+ sprite_alone(_vm->_globals._objectDataBuf, _vm->_eventsManager->_objectBuf, idx);
+ dataP = _vm->_eventsManager->_objectBuf;
} else {
dataP = _vm->_globals.allocMemory(height * width);
if (dataP == g_PTRNUL)
@@ -420,32 +420,32 @@ void ObjectsManager::displaySprite() {
}
if (_saveLoadFl) {
- _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite, _vm->_eventsManager._startPos.x + 183, 60, 274, 353);
+ _vm->_graphicsManager.restoreSurfaceRect(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite, _vm->_eventsManager->_startPos.x + 183, 60, 274, 353);
if (_saveLoadX && _saveLoadY)
- _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager._startPos.x + 300, _saveLoadY + 300, 0);
+ _vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _saveLoadSprite2, _saveLoadX + _vm->_eventsManager->_startPos.x + 300, _saveLoadY + 300, 0);
- _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager._startPos.x + 183, 60, _vm->_eventsManager._startPos.x + 457, 413);
+ _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 183, 60, _vm->_eventsManager->_startPos.x + 457, 413);
}
// If the Options dialog is activated, draw the elements
if (_vm->_globals._optionDialogFl) {
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 464, 407, 0);
+ _vm->_eventsManager->_startPos.x + 464, 407, 0);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 657, 556, _vm->_globals._menuSpeed);
+ _vm->_eventsManager->_startPos.x + 657, 556, _vm->_globals._menuSpeed);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 731, 495, _vm->_globals._menuTextOff);
+ _vm->_eventsManager->_startPos.x + 731, 495, _vm->_globals._menuTextOff);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 731, 468, _vm->_globals._menuVoiceOff);
+ _vm->_eventsManager->_startPos.x + 731, 468, _vm->_globals._menuVoiceOff);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 731, 441, _vm->_globals._menuSoundOff);
+ _vm->_eventsManager->_startPos.x + 731, 441, _vm->_globals._menuSoundOff);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 731, 414, _vm->_globals._menuMusicOff);
+ _vm->_eventsManager->_startPos.x + 731, 414, _vm->_globals._menuMusicOff);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 600, 522, _vm->_globals._menuDisplayType);
+ _vm->_eventsManager->_startPos.x + 600, 522, _vm->_globals._menuDisplayType);
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager._vesaBuffer, _vm->_globals._optionDialogSpr,
- _vm->_eventsManager._startPos.x + 611, 502, _vm->_globals._menuScrollSpeed);
- _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager._startPos.x + 164, 107, _vm->_eventsManager._startPos.x + 498, 320);
+ _vm->_eventsManager->_startPos.x + 611, 502, _vm->_globals._menuScrollSpeed);
+ _vm->_graphicsManager.addDirtyRect(_vm->_eventsManager->_startPos.x + 164, 107, _vm->_eventsManager->_startPos.x + 498, 320);
}
// Loop to draw any on-screen text
@@ -454,7 +454,7 @@ void ObjectsManager::displaySprite() {
if ((_vm->_fontManager._text[idx]._textType < 2) || (_vm->_fontManager._text[idx]._textType > 3))
_vm->_fontManager.box(idx,
_vm->_fontManager._text[idx]._messageId, _vm->_fontManager._text[idx]._filename,
- _vm->_eventsManager._startPos.x + _vm->_fontManager._text[idx]._pos.x, _vm->_fontManager._text[idx]._pos.y);
+ _vm->_eventsManager->_startPos.x + _vm->_fontManager._text[idx]._pos.x, _vm->_fontManager._text[idx]._pos.y);
else
_vm->_fontManager.box(idx,
_vm->_fontManager._text[idx]._messageId, _vm->_fontManager._text[idx]._filename,
@@ -462,7 +462,7 @@ void ObjectsManager::displaySprite() {
_vm->_fontManager._textList[idx]._enabledFl = true;
if ((_vm->_fontManager._text[idx]._textType < 2) || (_vm->_fontManager._text[idx]._textType > 3))
- _vm->_fontManager._textList[idx]._pos.x = _vm->_eventsManager._startPos.x + _vm->_fontManager._text[idx]._pos.x;
+ _vm->_fontManager._textList[idx]._pos.x = _vm->_eventsManager->_startPos.x + _vm->_fontManager._text[idx]._pos.x;
else
_vm->_fontManager._textList[idx]._pos.x = _vm->_fontManager._text[idx]._pos.x;
@@ -954,7 +954,7 @@ void ObjectsManager::displayBobAnim() {
if (_vm->_globals._lockedAnims[idx]._enableFl)
_bob[idx]._xp = _vm->_globals._lockedAnims[idx]._posX;
if ( PERSO_ON && idx > 20 )
- _bob[idx]._xp += _vm->_eventsManager._startPos.x;
+ _bob[idx]._xp += _vm->_eventsManager->_startPos.x;
_bob[idx]._yp = READ_LE_INT16(dataPtr + 2 * dataIdx + 2);
_bob[idx]._moveChange1 = READ_LE_INT16(dataPtr + 2 * dataIdx + 4);
@@ -987,7 +987,7 @@ void ObjectsManager::displayBobAnim() {
if (_vm->_globals._lockedAnims[idx]._enableFl)
_bob[idx]._xp = _vm->_globals._lockedAnims[idx]._posX;
if (PERSO_ON && idx > 20)
- _bob[idx]._xp += _vm->_eventsManager._startPos.x;
+ _bob[idx]._xp += _vm->_eventsManager->_startPos.x;
_bob[idx]._yp = READ_LE_INT16(bobData + 2);
_bob[idx]._moveChange1 = READ_LE_INT16(bobData + 4);
@@ -1718,7 +1718,7 @@ void ObjectsManager::loadZone(const Common::String &file) {
void ObjectsManager::handleCityMap() {
_vm->_dialogsManager->_inventFl = false;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
_vm->_linesManager.setMaxLineIdx(1);
_vm->_globals._characterMaxPosY = 440;
_vm->_globals._cityMapEnabledFl = true;
@@ -1748,8 +1748,8 @@ void ObjectsManager::handleCityMap() {
_mapCarPosY = 319;
}
addStaticSprite(_spritePtr, Common::Point(_mapCarPosX, _mapCarPosY), 0, 1, 0, false, 5, 5);
- _vm->_eventsManager.setMouseXY(_mapCarPosX, _mapCarPosY);
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->setMouseXY(_mapCarPosX, _mapCarPosY);
+ _vm->_eventsManager->mouseOn();
_vm->_graphicsManager.scrollScreen(getSpriteX(0) - 320);
_vm->_graphicsManager._scrollOffset = getSpriteX(0) - 320;
animateSprite(0);
@@ -1760,16 +1760,16 @@ void ObjectsManager::handleCityMap() {
_vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_globals.iRegul = 1;
_vm->_graphicsManager.fadeInLong();
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->changeMouseCursor(4);
_vm->_graphicsManager._noFadingFl = false;
bool loopCond = false;
do {
- int mouseButton = _vm->_eventsManager.getMouseButton();
+ int mouseButton = _vm->_eventsManager->getMouseButton();
if (mouseButton) {
// First cop call : Go to the bank and free the hostages
if (_vm->_globals._saveData->_data[svBankAttackAnimPlayedFl] == 1 && !_vm->_globals._saveData->_data[svCopCall1PlayedFl]) {
@@ -1786,7 +1786,7 @@ void ObjectsManager::handleCityMap() {
_vm->_talkManager.startAnimatedCharacterDialogue("APPEL2.pe2");
_vm->_globals._introSpeechOffFl = false;
mouseButton = 0;
- _vm->_eventsManager._curMouseButton = 0;
+ _vm->_eventsManager->_curMouseButton = 0;
}
if (mouseButton == 1)
handleLeftButton();
@@ -1797,7 +1797,7 @@ void ObjectsManager::handleCityMap() {
if (_vm->_linesManager._route == (RouteItem *)g_PTRNUL && _vm->_globals._actionMoveTo)
PARADISE();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_globals._exitId)
loopCond = true;
@@ -1820,20 +1820,20 @@ void ObjectsManager::handleCityMap() {
*/
void ObjectsManager::handleLeftButton() {
_vm->_fontManager.hideText(9);
- int destX = _vm->_eventsManager.getMouseX();
- int destY = _vm->_eventsManager.getMouseY();
+ int destX = _vm->_eventsManager->getMouseX();
+ int destY = _vm->_eventsManager->getMouseY();
if (!_vm->_dialogsManager->_inventFl && !_vm->_globals._cityMapEnabledFl &&
destX > _vm->_graphicsManager._scrollOffset - 30 && destX < _vm->_graphicsManager._scrollOffset + 50 &&
destY > -30 && destY < 50) {
- int oldMouseCursor = _vm->_eventsManager._mouseCursorId;
+ int oldMouseCursor = _vm->_eventsManager->_mouseCursorId;
_vm->_dialogsManager->_inventFl = true;
_vm->_dialogsManager->showInventory();
_vm->_dialogsManager->_inventFl = false;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
if (!_vm->_globals._exitId) {
_vm->_dialogsManager->_inventFl = false;
- _vm->_eventsManager._mouseCursorId = oldMouseCursor;
+ _vm->_eventsManager->_mouseCursorId = oldMouseCursor;
}
return;
}
@@ -1879,7 +1879,7 @@ void ObjectsManager::handleLeftButton() {
_vm->_globals._saveData->_data[svLastZoneNum] = 0;
}
- if (_vm->_globals._cityMapEnabledFl && (_vm->_eventsManager._mouseCursorId != 4 || _zoneNum <= 0))
+ if (_vm->_globals._cityMapEnabledFl && (_vm->_eventsManager->_mouseCursorId != 4 || _zoneNum <= 0))
return;
if (_zoneNum != -1 && _zoneNum != 0) {
if (_vm->_linesManager.ZONEP[_zoneNum]._destX && _vm->_linesManager.ZONEP[_zoneNum]._destY && _vm->_linesManager.ZONEP[_zoneNum]._destY != 31) {
@@ -1932,10 +1932,10 @@ void ObjectsManager::handleLeftButton() {
_vm->_linesManager._route = _vm->_linesManager.cityMapCarRoute(getSpriteX(0), getSpriteY(0), destX, destY);
if (_zoneNum != -1 && _zoneNum != 0) {
- if (_vm->_eventsManager._mouseCursorId == 23)
+ if (_vm->_eventsManager->_mouseCursorId == 23)
_vm->_globals._saveData->_data[svLastMouseCursor] = 5;
else
- _vm->_globals._saveData->_data[svLastMouseCursor] = _vm->_eventsManager._mouseCursorId;
+ _vm->_globals._saveData->_data[svLastMouseCursor] = _vm->_eventsManager->_mouseCursorId;
if (_vm->_globals._cityMapEnabledFl)
_vm->_globals._saveData->_data[svLastMouseCursor] = 6;
@@ -1947,7 +1947,7 @@ void ObjectsManager::handleLeftButton() {
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
if (_vm->_globals._screenId == 20 && _vm->_globals._saveData->_data[svField132] == 1
&& _curObjectIndex == 20 && _zoneNum == 12
- && _vm->_eventsManager._mouseCursorId == 23) {
+ && _vm->_eventsManager->_mouseCursorId == 23) {
// Special case for throwing darts at the switch in Purgatory - the player shouldn't move
_vm->_linesManager._route = (RouteItem *)g_PTRNUL;
getSpriteX(0);
@@ -1962,7 +1962,7 @@ void ObjectsManager::PARADISE() {
if (!_forestFl || _zoneNum < 20 || _zoneNum > 23) {
if (_vm->_graphicsManager._largeScreenFl) {
_vm->_graphicsManager._scrollStatus = 2;
- if (_vm->_eventsManager._startPos.x + 320 - getSpriteX(0) > 160) {
+ if (_vm->_eventsManager->_startPos.x + 320 - getSpriteX(0) > 160) {
bool loopCond = false;
do {
_vm->_graphicsManager._scrollPosX -= _vm->_graphicsManager._scrollSpeed;
@@ -1974,12 +1974,12 @@ void ObjectsManager::PARADISE() {
_vm->_graphicsManager._scrollPosX = SCREEN_WIDTH;
loopCond = true;
}
- if (_vm->_eventsManager.getMouseX() > _vm->_graphicsManager._scrollPosX + 620)
- _vm->_eventsManager.setMouseXY(_vm->_eventsManager._mousePos.x - 4, _vm->_eventsManager.getMouseY());
+ if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager._scrollPosX + 620)
+ _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x - 4, _vm->_eventsManager->getMouseY());
- _vm->_eventsManager.refreshScreenAndEvents();
- } while (!loopCond && _vm->_eventsManager._startPos.x > getSpriteX(0) - 320);
- } else if (_vm->_eventsManager._startPos.x + 320 - getSpriteX(0) < -160) {
+ _vm->_eventsManager->refreshScreenAndEvents();
+ } while (!loopCond && _vm->_eventsManager->_startPos.x > getSpriteX(0) - 320);
+ } else if (_vm->_eventsManager->_startPos.x + 320 - getSpriteX(0) < -160) {
bool loopCond = false;
do {
_vm->_graphicsManager._scrollPosX += _vm->_graphicsManager._scrollSpeed;
@@ -1991,51 +1991,51 @@ void ObjectsManager::PARADISE() {
_vm->_graphicsManager._scrollPosX = SCREEN_WIDTH;
loopCond = true;
}
- if (_vm->_eventsManager.getMouseX() < _vm->_graphicsManager._scrollPosX + 10)
- _vm->_eventsManager.setMouseXY(_vm->_eventsManager._mousePos.x + 4, _vm->_eventsManager.getMouseY());
+ if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager._scrollPosX + 10)
+ _vm->_eventsManager->setMouseXY(_vm->_eventsManager->_mousePos.x + 4, _vm->_eventsManager->getMouseY());
- _vm->_eventsManager.refreshScreenAndEvents();
- } while (!loopCond && _vm->_eventsManager._startPos.x < getSpriteX(0) - 320);
+ _vm->_eventsManager->refreshScreenAndEvents();
+ } while (!loopCond && _vm->_eventsManager->_startPos.x < getSpriteX(0) - 320);
}
- if (_vm->_eventsManager.getMouseX() > _vm->_graphicsManager._scrollPosX + 620)
- _vm->_eventsManager.setMouseXY(_vm->_graphicsManager._scrollPosX + 610, 0);
- if (_vm->_eventsManager.getMouseX() < _vm->_graphicsManager._scrollPosX + 10)
- _vm->_eventsManager.setMouseXY(_vm->_graphicsManager._scrollPosX + 10, 0);
- _vm->_eventsManager.refreshScreenAndEvents();
+ if (_vm->_eventsManager->getMouseX() > _vm->_graphicsManager._scrollPosX + 620)
+ _vm->_eventsManager->setMouseXY(_vm->_graphicsManager._scrollPosX + 610, 0);
+ if (_vm->_eventsManager->getMouseX() < _vm->_graphicsManager._scrollPosX + 10)
+ _vm->_eventsManager->setMouseXY(_vm->_graphicsManager._scrollPosX + 10, 0);
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._scrollStatus = 0;
}
_vm->_talkManager.REPONSE(_vm->_globals._saveData->_data[svLastZoneNum], _vm->_globals._saveData->_data[svLastMouseCursor]);
} else {
_vm->_talkManager.REPONSE2(_vm->_globals._saveData->_data[svLastZoneNum], _vm->_globals._saveData->_data[svLastMouseCursor]);
}
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->changeMouseCursor(4);
if (_zoneNum != -1 && _zoneNum != 0 && !_vm->_linesManager.ZONEP[_zoneNum]._enabledFl) {
_zoneNum = -1;
_forceZoneFl = true;
}
if (_zoneNum != _vm->_globals._saveData->_data[svLastZoneNum] || _zoneNum == -1 || _zoneNum == 0) {
- _vm->_eventsManager._mouseCursorId = 4;
+ _vm->_eventsManager->_mouseCursorId = 4;
_changeVerbFl = false;
} else {
- _vm->_eventsManager._mouseCursorId = _vm->_globals._saveData->_data[svLastMouseCursor];
+ _vm->_eventsManager->_mouseCursorId = _vm->_globals._saveData->_data[svLastMouseCursor];
if (_changeVerbFl) {
nextVerbIcon();
_changeVerbFl = false;
}
- if (_vm->_eventsManager._mouseCursorId == 5)
- _vm->_eventsManager._mouseCursorId = 4;
+ if (_vm->_eventsManager->_mouseCursorId == 5)
+ _vm->_eventsManager->_mouseCursorId = 4;
}
- if (_vm->_eventsManager._mouseCursorId != 23)
- _vm->_eventsManager.changeMouseCursor(_vm->_eventsManager._mouseCursorId);
+ if (_vm->_eventsManager->_mouseCursorId != 23)
+ _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId);
_zoneNum = 0;
_vm->_globals._saveData->_data[svLastMouseCursor] = 0;
_vm->_globals._saveData->_data[svLastZoneNum] = 0;
}
if (_vm->_globals._cityMapEnabledFl) {
- _vm->_eventsManager._mouseCursorId = 0;
- _vm->_eventsManager.changeMouseCursor(0);
+ _vm->_eventsManager->_mouseCursorId = 0;
+ _vm->_eventsManager->changeMouseCursor(0);
}
- if (_vm->_globals._freezeCharacterFl && _vm->_eventsManager._mouseCursorId == 4) {
+ if (_vm->_globals._freezeCharacterFl && _vm->_eventsManager->_mouseCursorId == 4) {
if (_zoneNum != -1 && _zoneNum != 0)
handleRightButton();
}
@@ -2060,7 +2060,7 @@ void ObjectsManager::clearScreen() {
_vm->_linesManager.BOBZONE[i] = 0;
_vm->_linesManager.BOBZONE_FLAG[i] = false;
}
- _vm->_eventsManager._mouseCursorId = 4;
+ _vm->_eventsManager->_mouseCursorId = 4;
_verb = 4;
_zoneNum = 0;
_forceZoneFl = true;
@@ -2069,8 +2069,8 @@ void ObjectsManager::clearScreen() {
_vm->_linesManager._route = (RouteItem *)g_PTRNUL;
_vm->_globals._answerBuffer = _vm->_globals.freeMemory(_vm->_globals._answerBuffer);
_vm->_globals.SPRITE_ECRAN = _vm->_globals.freeMemory(_vm->_globals.SPRITE_ECRAN);
- _vm->_eventsManager._startPos.x = 0;
- _vm->_eventsManager._mouseSpriteId = 0;
+ _vm->_eventsManager->_startPos.x = 0;
+ _vm->_eventsManager->_mouseSpriteId = 0;
_vm->_globals._saveData->_data[svLastMouseCursor] = 0;
_vm->_globals._saveData->_data[svLastZoneNum] = 0;
_vm->_globals._actionMoveTo = false;
@@ -2216,154 +2216,154 @@ void ObjectsManager::computeAndSetSpriteSize() {
* Get next verb icon (or text)
*/
void ObjectsManager::nextVerbIcon() {
- _vm->_eventsManager._mouseCursorId++;
+ _vm->_eventsManager->_mouseCursorId++;
for(;;) {
- if (_vm->_eventsManager._mouseCursorId == 4) {
+ if (_vm->_eventsManager->_mouseCursorId == 4) {
if (!_vm->_globals._freezeCharacterFl || _zoneNum == -1 || _zoneNum == 0)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 5 || _vm->_eventsManager._mouseCursorId == 6) {
- _vm->_eventsManager._mouseCursorId = 6;
+ if (_vm->_eventsManager->_mouseCursorId == 5 || _vm->_eventsManager->_mouseCursorId == 6) {
+ _vm->_eventsManager->_mouseCursorId = 6;
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl1 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 7) {
+ if (_vm->_eventsManager->_mouseCursorId == 7) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl2 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 8) {
+ if (_vm->_eventsManager->_mouseCursorId == 8) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl3 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 9) {
+ if (_vm->_eventsManager->_mouseCursorId == 9) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 10) {
+ if (_vm->_eventsManager->_mouseCursorId == 10) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl5 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 11) {
+ if (_vm->_eventsManager->_mouseCursorId == 11) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl6 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 12) {
+ if (_vm->_eventsManager->_mouseCursorId == 12) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl7 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 13) {
+ if (_vm->_eventsManager->_mouseCursorId == 13) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl8 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 14) {
+ if (_vm->_eventsManager->_mouseCursorId == 14) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl9 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 15) {
+ if (_vm->_eventsManager->_mouseCursorId == 15) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl10 == 1)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 16) {
+ if (_vm->_eventsManager->_mouseCursorId == 16) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl1 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 17) {
+ if (_vm->_eventsManager->_mouseCursorId == 17) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 18) {
+ if (_vm->_eventsManager->_mouseCursorId == 18) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl5 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 19) {
+ if (_vm->_eventsManager->_mouseCursorId == 19) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl6 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 20) {
+ if (_vm->_eventsManager->_mouseCursorId == 20) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl7 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 21) {
+ if (_vm->_eventsManager->_mouseCursorId == 21) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl10 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 22) {
+ if (_vm->_eventsManager->_mouseCursorId == 22) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl8 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 23) {
+ if (_vm->_eventsManager->_mouseCursorId == 23) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl3 == 2)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 24) {
+ if (_vm->_eventsManager->_mouseCursorId == 24) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl4 == 3)
return;
- ++_vm->_eventsManager._mouseCursorId;
+ ++_vm->_eventsManager->_mouseCursorId;
}
- if (_vm->_eventsManager._mouseCursorId == 25) {
+ if (_vm->_eventsManager->_mouseCursorId == 25) {
if (_vm->_linesManager.ZONEP[_zoneNum]._verbFl9 == 2)
return;
}
- _vm->_eventsManager._mouseCursorId = 4;
+ _vm->_eventsManager->_mouseCursorId = 4;
}
}
@@ -2373,9 +2373,9 @@ void ObjectsManager::nextVerbIcon() {
void ObjectsManager::handleRightButton() {
if (_zoneNum != -1 && _zoneNum != 0) {
nextVerbIcon();
- if (_vm->_eventsManager._mouseCursorId != 23)
- _vm->_eventsManager.changeMouseCursor(_vm->_eventsManager._mouseCursorId);
- _verb = _vm->_eventsManager._mouseCursorId;
+ if (_vm->_eventsManager->_mouseCursorId != 23)
+ _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId);
+ _verb = _vm->_eventsManager->_mouseCursorId;
}
}
@@ -2424,96 +2424,96 @@ void ObjectsManager::initBorder(int zoneIdx) {
}
if (!zoneIdx)
- _vm->_eventsManager._mouseCursorId = 0;
+ _vm->_eventsManager->_mouseCursorId = 0;
else if (zoneIdx >= 1 && zoneIdx <= 28)
- _vm->_eventsManager._mouseCursorId = 8;
+ _vm->_eventsManager->_mouseCursorId = 8;
else if (zoneIdx == 29)
- _vm->_eventsManager._mouseCursorId = 1;
+ _vm->_eventsManager->_mouseCursorId = 1;
else if (zoneIdx == 30)
- _vm->_eventsManager._mouseCursorId = 2;
+ _vm->_eventsManager->_mouseCursorId = 2;
else if (zoneIdx == 31)
- _vm->_eventsManager._mouseCursorId = 3;
+ _vm->_eventsManager->_mouseCursorId = 3;
else if (zoneIdx == 32)
- _vm->_eventsManager._mouseCursorId = 16;
+ _vm->_eventsManager->_mouseCursorId = 16;
if (zoneIdx >= 1 && zoneIdx <= 28 && !_vm->_globals._inventory[zoneIdx]) {
- _vm->_eventsManager._mouseCursorId = 0;
+ _vm->_eventsManager->_mouseCursorId = 0;
_borderPos = Common::Point(0, 0);
_borderSpriteIndex = 0;
}
- if (_vm->_eventsManager._mouseCursorId != 23)
- _vm->_eventsManager.changeMouseCursor(_vm->_eventsManager._mouseCursorId);
- _vm->_eventsManager.getMouseX();
- _vm->_eventsManager.getMouseY();
+ if (_vm->_eventsManager->_mouseCursorId != 23)
+ _vm->_eventsManager->changeMouseCursor(_vm->_eventsManager->_mouseCursorId);
+ _vm->_eventsManager->getMouseX();
+ _vm->_eventsManager->getMouseY();
}
/**
* Get next icon for an object in the inventory
*/
void ObjectsManager::nextObjectIcon(int idx) {
- if (_vm->_eventsManager._mouseCursorId == 0 || _vm->_eventsManager._mouseCursorId == 2 ||
- _vm->_eventsManager._mouseCursorId == 3 || _vm->_eventsManager._mouseCursorId == 16)
+ if (_vm->_eventsManager->_mouseCursorId == 0 || _vm->_eventsManager->_mouseCursorId == 2 ||
+ _vm->_eventsManager->_mouseCursorId == 3 || _vm->_eventsManager->_mouseCursorId == 16)
return;
- int nextCursorId = _vm->_eventsManager._mouseCursorId + 1;
+ int nextCursorId = _vm->_eventsManager->_mouseCursorId + 1;
if (nextCursorId > 25)
nextCursorId = 6;
do {
if (nextCursorId == 2 || nextCursorId == 5 || nextCursorId == 6) {
- _vm->_eventsManager._mouseCursorId = 6;
+ _vm->_eventsManager->_mouseCursorId = 6;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag1 == 1)
return;
nextCursorId++;
}
if (nextCursorId == 7) {
- _vm->_eventsManager._mouseCursorId = 7;
+ _vm->_eventsManager->_mouseCursorId = 7;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag2 == 1)
return;
nextCursorId++;
}
if (nextCursorId == 8) {
- _vm->_eventsManager._mouseCursorId = 8;
+ _vm->_eventsManager->_mouseCursorId = 8;
return;
}
if (nextCursorId == 9 || nextCursorId == 10) {
- _vm->_eventsManager._mouseCursorId = 10;
+ _vm->_eventsManager->_mouseCursorId = 10;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag6 == 1)
return;
nextCursorId = 11;
}
if (nextCursorId == 11) {
- _vm->_eventsManager._mouseCursorId = 11;
+ _vm->_eventsManager->_mouseCursorId = 11;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag3 == 1)
return;
nextCursorId++;
}
if (nextCursorId == 12 || nextCursorId == 13) {
- _vm->_eventsManager._mouseCursorId = 13;
+ _vm->_eventsManager->_mouseCursorId = 13;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag4 == 1)
return;
nextCursorId = 14;
}
if (nextCursorId == 14 || nextCursorId == 15) {
- _vm->_eventsManager._mouseCursorId = 15;
+ _vm->_eventsManager->_mouseCursorId = 15;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag5 == 1)
return;
nextCursorId = 23;
}
if (nextCursorId >= 16 && nextCursorId <= 23) {
- _vm->_eventsManager._mouseCursorId = 23;
+ _vm->_eventsManager->_mouseCursorId = 23;
if (_vm->_globals._objectAuthIcons[_vm->_globals._inventory[idx]]._flag5 == 2)
return;
nextCursorId = 24;
}
if (nextCursorId == 24 || nextCursorId == 25) {
- _vm->_eventsManager._mouseCursorId = 25;
+ _vm->_eventsManager->_mouseCursorId = 25;
}
nextCursorId = 6;
@@ -2521,7 +2521,7 @@ void ObjectsManager::nextObjectIcon(int idx) {
}
void ObjectsManager::takeInventoryObject(int idx) {
- if (_vm->_eventsManager._mouseCursorId == 8)
+ if (_vm->_eventsManager->_mouseCursorId == 8)
changeObject(idx);
}
@@ -2604,7 +2604,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette);
_vm->_globals.freeMemory(oldPalette);
_vm->_graphicsManager.lockScreen();
- _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
_vm->_graphicsManager.unlockScreen();
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399);
@@ -2681,7 +2681,7 @@ void ObjectsManager::handleSpecialGames() {
_vm->_globals._disableInventFl = true;
do
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
while (getBobAnimDataIdx(8) != 3);
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("GM3.PE2");
@@ -2981,7 +2981,7 @@ void ObjectsManager::OPTI_ONE(int idx, int animIdx, int destPosi, int animAction
// Make Hopkins walk to the expected place
do {
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (destPosi != getBobAnimDataIdx(idx));
if (!animAction)
@@ -2990,7 +2990,7 @@ void ObjectsManager::OPTI_ONE(int idx, int animIdx, int destPosi, int animAction
_vm->_graphicsManager.fastDisplay(_bob[idx]._spriteData,
_bob[idx]._oldX, _bob[idx]._oldY, _bob[idx]._frameIndex);
stopBobAnimation(idx);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
}
@@ -3208,11 +3208,11 @@ void ObjectsManager::sceneSpecialIni() {
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0);
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager.fadeInLong();
animateSprite(0);
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
VBOB(_vm->_globals.SPRITE_ECRAN, 5, 15, 28, 1);
_vm->_fontManager.hideText(9);
bool displayedTxtFl = false;
@@ -3228,12 +3228,12 @@ void ObjectsManager::sceneSpecialIni() {
_vm->_globals._saveData->_data[svField320] = 1;
if (_vm->_soundManager._voiceOffFl) {
for (int i = 0; i <= 199; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
_vm->_fontManager.hideText(9);
VBOB_OFF(5);
for (int i = 0; i <= 3; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._noFadingFl = true;
_vm->_globals._disableInventFl = false;
}
@@ -3241,9 +3241,9 @@ void ObjectsManager::sceneSpecialIni() {
case 18:
if (_vm->_globals._prevScreenId == 17) {
- _vm->_eventsManager._mouseSpriteId = 4;
+ _vm->_eventsManager->_mouseSpriteId = 4;
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager.fadeInLong();
_vm->_globals.iRegul = 1;
_vm->_globals._disableInventFl = false;
@@ -3314,8 +3314,8 @@ void ObjectsManager::OPTI_BOBON(int idx1, int idx2, int idx3, int anim1Idx, int
}
void ObjectsManager::SCI_OPTI_ONE(int idx, int animIdx, int animDataIdx, int a4) {
- _vm->_eventsManager._curMouseButton = 0;
- _vm->_eventsManager._mouseButton = 0;
+ _vm->_eventsManager->_curMouseButton = 0;
+ _vm->_eventsManager->_mouseButton = 0;
if (a4 != 3) {
setBobAnimation(idx);
@@ -3323,8 +3323,8 @@ void ObjectsManager::SCI_OPTI_ONE(int idx, int animIdx, int animDataIdx, int a4)
}
do {
- _vm->_eventsManager.refreshScreenAndEvents();
- if (_vm->_eventsManager._curMouseButton)
+ _vm->_eventsManager->refreshScreenAndEvents();
+ if (_vm->_eventsManager->_curMouseButton)
break;
} while (animDataIdx != getBobAnimDataIdx(idx));
if (!a4)
@@ -3475,7 +3475,7 @@ void ObjectsManager::ACTION(const byte *spriteData, const Common::String &action
_sprite[0]._spriteIndex = idx;
}
for (int i = 0; i < realSpeed; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (idx == -1)
break;
}
@@ -3520,7 +3520,7 @@ void ObjectsManager::SPACTION(byte *spriteData, const Common::String &animationS
_sprite[0]._spriteIndex = spriteIndex;
}
for (int i = 0; i < realSpeed; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (spriteIndex != -1);
}
@@ -3558,7 +3558,7 @@ void ObjectsManager::SPACTION1(byte *spriteData, const Common::String &animStrin
}
for (int i = 0; i < realSpeed; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (spriteIndex == -1)
break;
@@ -3662,7 +3662,7 @@ void ObjectsManager::lockAnimX(int idx, int x) {
void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Common::String &linkFile,
const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) {
_vm->_dialogsManager->_inventFl = false;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
_vm->_dialogsManager->_removeInventFl = false;
_vm->_graphicsManager._scrollOffset = 0;
_vm->_globals._cityMapEnabledFl = false;
@@ -3684,7 +3684,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
else
_vm->_graphicsManager.initScreen(s4, 2, initializeScreen);
}
- _vm->_eventsManager.mouseOn();
+ _vm->_eventsManager->mouseOn();
if (_vm->_globals._screenId == 61) {
addStaticSprite(_vm->_globals.PERSO, Common::Point(330, 418), 0, 60, 0, false, 34, 190);
animateSprite(0);
@@ -3695,9 +3695,9 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(254, 0, 0, 0);
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->changeMouseCursor(4);
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager.fadeInLong();
if (_vm->_globals._screenId == 61) {
_vm->_animationManager->playSequence("OUVRE.SEQ", 10, 4, 10);
@@ -3711,12 +3711,12 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
_vm->_globals._checkDistanceFl = true;
do {
GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
setSpriteIndex(0, 64);
}
do {
- int mouseButton = _vm->_eventsManager.getMouseButton();
+ int mouseButton = _vm->_eventsManager->getMouseButton();
if (mouseButton == 1) {
handleLeftButton();
mouseButton = 1;
@@ -3727,7 +3727,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
if (_vm->_globals._actionMoveTo)
PARADISE();
if (!_vm->_globals._exitId)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_globals._exitId)
break;
@@ -3750,7 +3750,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Common::String &linkFile,
const Common::String &animFile, const Common::String &s4, int soundNum, bool initializeScreen) {
_vm->_dialogsManager->_inventFl = false;
- _vm->_eventsManager._gameKey = KEY_NONE;
+ _vm->_eventsManager->_gameKey = KEY_NONE;
_verb = 4;
_vm->_graphicsManager._scrollOffset = 0;
_vm->_dialogsManager->_removeInventFl = false;
@@ -3775,8 +3775,8 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
else
_vm->_graphicsManager.initScreen(s4, 2, initializeScreen);
}
- _vm->_eventsManager.mouseOn();
- _vm->_eventsManager._mouseCursorId = 4;
+ _vm->_eventsManager->mouseOn();
+ _vm->_eventsManager->_mouseCursorId = 4;
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
_vm->_graphicsManager.SETCOLOR3(251, 100, 100, 100);
@@ -3808,7 +3808,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
addStaticSprite(_vm->_globals.PERSO, _characterPos, 0, _startSpriteIndex, 0, false, 20, 127);
break;
}
- _vm->_eventsManager.setMouseXY(_characterPos);
+ _vm->_eventsManager->setMouseXY(_characterPos);
if (_vm->_graphicsManager._largeScreenFl)
_vm->_graphicsManager._scrollPosX = (int16)getSpriteX(0) - 320;
computeAndSetSpriteSize();
@@ -3817,32 +3817,32 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
_vm->_linesManager._route = (RouteItem *)g_PTRNUL;
computeAndSetSpriteSize();
sceneSpecialIni();
- _vm->_eventsManager._mouseSpriteId = 4;
+ _vm->_eventsManager->_mouseSpriteId = 4;
_oldCharacterPosX = _characterPos.x;
_oldCharacterPosY = _characterPos.y;
_vm->_globals._oldDirection = DIR_NONE;
_vm->_globals.Compteur = 0;
for (int idx = 0; idx < 5; ++idx)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_globals.iRegul = 1;
if (!_vm->_graphicsManager._noFadingFl)
_vm->_graphicsManager.fadeInLong();
_vm->_graphicsManager._noFadingFl = false;
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->changeMouseCursor(4);
int xCheck = 0;
int yCheck = 0;
bool breakFlag = false;
while (!_vm->shouldQuit() && !breakFlag) {
- int mouseButtons = _vm->_eventsManager.getMouseButton();
+ int mouseButtons = _vm->_eventsManager->getMouseButton();
if (mouseButtons) {
if (mouseButtons == 1) {
- if (_verb == 16 && _vm->_eventsManager._mouseCursorId == 16) {
- int xp = _vm->_eventsManager.getMouseX();
- int yp = _vm->_eventsManager.getMouseY();
+ if (_verb == 16 && _vm->_eventsManager->_mouseCursorId == 16) {
+ int xp = _vm->_eventsManager->getMouseX();
+ int yp = _vm->_eventsManager->getMouseY();
if ((xCheck == xp) && (yCheck == yp)) {
_vm->_linesManager._route = (RouteItem *)g_PTRNUL;
@@ -3867,7 +3867,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
PARADISE();
}
handleSpecialGames();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (!_vm->_globals._exitId)
continue;
}
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index 3fbe241f30..78673f428d 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -136,7 +136,7 @@ void SaveLoadManager::writeSavegameHeader(Common::OutSaveFile *out, hopkinsSaveg
out->writeSint16LE(td.tm_mday);
out->writeSint16LE(td.tm_hour);
out->writeSint16LE(td.tm_min);
- out->writeUint32LE(_vm->_eventsManager._gameCounter);
+ out->writeUint32LE(_vm->_eventsManager->_gameCounter);
}
Common::Error SaveLoadManager::saveGame(int slot, const Common::String &saveName) {
@@ -235,7 +235,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8());
_vm->_graphicsManager.reduceScreenPart(_vm->_graphicsManager._vesaBuffer, (byte *)thumb8.pixels,
- _vm->_eventsManager._startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80);
+ _vm->_eventsManager->_startPos.x, 20, SCREEN_WIDTH, SCREEN_HEIGHT - 40, 80);
// Convert the 8-bit pixel to 16 bit surface
s->create(w, h, Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0));
diff --git a/engines/hopkins/script.cpp b/engines/hopkins/script.cpp
index eb69ced772..57c48c534f 100644
--- a/engines/hopkins/script.cpp
+++ b/engines/hopkins/script.cpp
@@ -129,7 +129,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_soundManager._soundFl);
}
bool displayedTxtFl = false;
@@ -196,7 +196,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
--v4;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (v4);
}
}
@@ -469,7 +469,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
opcodeType = 1;
break;
@@ -538,13 +538,13 @@ int ScriptManager::handleOpcode(byte *dataP) {
case 12:
_vm->_fontManager.hideText(9);
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_talkManager.startAnimatedCharacterDialogue("bqetueur.pe2");
break;
case 13:
- _vm->_eventsManager._mouseButton = _vm->_eventsManager._curMouseButton;
+ _vm->_eventsManager->_mouseButton = _vm->_eventsManager->_curMouseButton;
_vm->_globals._disableInventFl = true;
_vm->_graphicsManager.fadeOutLong();
_vm->_globals.disableHiding();
@@ -570,16 +570,16 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_vm->_graphicsManager.fadeInDefaultLength(_vm->_graphicsManager._vesaBuffer);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(3) != 100);
_vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer);
_vm->_graphicsManager.endDisplayBob();
@@ -592,7 +592,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_soundManager._specialSoundNum = 0;
}
_vm->_animationManager->loadAnim("ASCEN");
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_vm->_graphicsManager.loadImage("ASCEN");
_vm->_graphicsManager.displayAllBob();
@@ -600,10 +600,10 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_vm->_graphicsManager.fadeInDefaultLength(_vm->_graphicsManager._vesaBuffer);
_vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3);
_vm->_graphicsManager.fadeOutDefaultLength(_vm->_graphicsManager._vesaBuffer);
@@ -683,7 +683,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_soundManager._soundFl);
}
_vm->_talkManager.startAnimatedCharacterDialogue("PTLAB.pe2");
@@ -761,7 +761,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_globals._checkDistanceFl = true;
@@ -813,7 +813,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(9) == 36)
break;
}
@@ -873,7 +873,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(9) == endIdx)
break;
}
@@ -901,7 +901,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_graphicsManager.loadImage("IM20f");
_vm->_animationManager->loadAnim("ANIM20f");
_vm->_graphicsManager.displayAllBob();
- _vm->_eventsManager.mouseOff();
+ _vm->_eventsManager->mouseOff();
_vm->_graphicsManager.fadeInLong();
_vm->_soundManager.loadWav("SOUND46.WAV", 1);
bool playFl = false;
@@ -913,7 +913,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_soundManager.playWav(1);
playFl = true;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(12) == 34)
break;
}
@@ -988,7 +988,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setBobAnimation(7);
@@ -1015,7 +1015,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(3) == 48)
break;
}
@@ -1080,7 +1080,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_objectsManager.setBobAnimDataIdx(13, 0);
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(4) == 16)
break;
}
@@ -1106,7 +1106,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setBobAnimation(11);
@@ -1145,7 +1145,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(8) == 32)
break;
}
@@ -1162,7 +1162,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 74);
_vm->_objectsManager.stopBobAnimation(5);
_vm->_objectsManager.stopBobAnimation(6);
@@ -1189,7 +1189,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 6);
_vm->_objectsManager.stopBobAnimation(5);
_vm->_objectsManager.setBobAnimation(6);
@@ -1244,7 +1244,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(1) == 9)
break;
}
@@ -1281,7 +1281,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(1) == 9)
break;
}
@@ -1363,7 +1363,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(9) != 15);
_vm->_objectsManager.stopBobAnimation(9);
_vm->_objectsManager.animateSprite(0);
@@ -1372,7 +1372,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(12) != 117);
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 830, 122, 0);
_vm->_objectsManager.stopBobAnimation(12);
@@ -1400,9 +1400,9 @@ int ScriptManager::handleOpcode(byte *dataP) {
_vm->_talkManager.startAnimatedCharacterDialogue("tourist1.pe2");
_vm->_globals._introSpeechOffFl = false;
_vm->_animationManager->playAnim2("T421.ANM", 100, 14, 500);
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("tourist2.pe2");
_vm->_globals._introSpeechOffFl = false;
@@ -1435,7 +1435,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
_vm->_objectsManager.setSpriteIndex(0, 60);
@@ -1462,7 +1462,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(4) == 72)
break;
}
@@ -1490,7 +1490,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(6) == 72)
break;
}
@@ -1518,7 +1518,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(5) == 72)
break;
}
@@ -1540,28 +1540,28 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(4) != 10);
_vm->_soundManager.playWav(1);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(4) != 18);
_vm->_soundManager.playWav(2);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(4) != 62);
_vm->_soundManager.playWav(3);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(4) != 77);
_vm->_objectsManager.stopBobAnimation(4);
_vm->_objectsManager.animateSprite(0);
@@ -1578,28 +1578,28 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 10);
_vm->_soundManager.playWav(1);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 18);
_vm->_soundManager.playWav(2);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 38);
_vm->_soundManager.playWav(3);
do {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(5) != 53);
_vm->_objectsManager.stopBobAnimation(5);
_vm->_objectsManager.animateSprite(0);
@@ -1673,7 +1673,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_globals._exitId = 59;
break;
@@ -1701,7 +1701,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_globals._exitId = 59;
break;
@@ -1722,7 +1722,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(10) != 7);
_vm->_objectsManager.setBobAnimation(6);
_vm->_objectsManager.stopBobAnimation(3);
@@ -1730,7 +1730,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(6) != 10);
_vm->_soundManager.playSoundFile("SOUND71.WAV");
_vm->_objectsManager.setBobAnimation(7);
@@ -1739,7 +1739,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(7) != 15);
_vm->_objectsManager.stopBobAnimation(5);
_vm->_objectsManager.setBobAnimation(8);
@@ -1748,7 +1748,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(8) != 76);
_vm->_objectsManager.stopBobAnimation(6);
_vm->_objectsManager.stopBobAnimation(7);
@@ -1782,7 +1782,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(3) != 18);
_vm->_objectsManager.stopBobAnimation(3);
_vm->_objectsManager.setBobAnimation(4);
@@ -1801,7 +1801,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(4) == 18)
_vm->_graphicsManager.fastDisplay(_vm->_globals.SPRITE_ECRAN, 18, 334, 0, false);
} while (_vm->_objectsManager.getBobAnimDataIdx(4) != 26);
@@ -1829,7 +1829,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(3) == 50)
break;
}
@@ -1858,7 +1858,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = false;
break;
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(4) == 24)
break;
}
@@ -1888,7 +1888,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.setSpriteIndex(0, 64);
_vm->_globals._exitId = _vm->_globals._saveData->_data[svField401];
@@ -1906,7 +1906,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(1) != 9);
_vm->_objectsManager.stopBobAnimation(1);
_vm->_linesManager._route = (RouteItem *)g_PTRNUL;
@@ -1919,7 +1919,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.setSpriteIndex(0, 64);
_vm->_objectsManager.setBobAnimation(2);
@@ -1928,7 +1928,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(2) != 10);
_vm->_objectsManager.stopBobAnimation(2);
_vm->_objectsManager.setBobAnimation(4);
@@ -1970,7 +1970,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
_vm->_graphicsManager.SETCOLOR4(252, 100, 100, 100);
@@ -2016,7 +2016,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
return -1; // Exiting game
_vm->_objectsManager.GOHOME();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_linesManager._route != (RouteItem *)g_PTRNUL);
_vm->_objectsManager.removeSprite(0);
bool playFl = false;
@@ -2029,7 +2029,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
playFl = true;
_vm->_soundManager.playSoundFile("SOUND81.WAV");
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(7) != 15);
_vm->_objectsManager.stopBobAnimation(7);
_vm->_objectsManager.setSpriteX(0, 476);
@@ -2051,7 +2051,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(12) != 6);
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("PRMORT.pe2");
@@ -2060,7 +2060,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(12) != 12);
_vm->_objectsManager.animateSprite(0);
_vm->_objectsManager.stopBobAnimation(12);
@@ -2076,7 +2076,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(11) == 10 && !playFl)
playFl = true;
} while (_vm->_objectsManager.getBobAnimDataIdx(11) != 13);
@@ -2087,7 +2087,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (_vm->_objectsManager.getBobAnimDataIdx(13) != 48);
_vm->_globals._introSpeechOffFl = true;
_vm->_talkManager.startAnimatedCharacterDialogue("HRADIO.PE2");
@@ -2218,7 +2218,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
if (_vm->_objectsManager.getBobAnimDataIdx(1) == 12 && !soundFlag) {
_vm->_soundManager.playSoundFile("SOUND86.WAV");
soundFlag = true;
@@ -2247,7 +2247,7 @@ int ScriptManager::handleOpcode(byte *dataP) {
if (_vm->shouldQuit())
return -1; // Exiting game
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
CharacterLocation *realHopkins = &_vm->_globals._saveData->_realHopkins;
realHopkins->_pos.x = _vm->_objectsManager.getSpriteX(0);
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 62504dadfd..c7025ec260 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -589,17 +589,17 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) {
}
playVoice();
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_escKeyFl = false;
// Loop for playing voice
breakFlag = false;
do {
if (_specialSoundNum != 4 && !_skipRefreshFl)
- _vm->_eventsManager.refreshScreenAndEvents();
- if (_vm->_eventsManager.getMouseButton())
+ _vm->_eventsManager->refreshScreenAndEvents();
+ if (_vm->_eventsManager->getMouseButton())
break;
- _vm->_eventsManager.refreshEvents();
- if (_vm->_eventsManager._escKeyFl)
+ _vm->_eventsManager->refreshEvents();
+ if (_vm->_eventsManager->_escKeyFl)
break;
// We only check the voice status if the file has been loaded properly
// This avoids skipping completely the talk animations in the Win95 UK Demo
@@ -620,7 +620,7 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode, bool dispTxtFl) {
if (!_musicOffFl && _musicVolume > 2) {
setMODMusicVolume(_musicVolume);
}
- _vm->_eventsManager._escKeyFl = false;
+ _vm->_eventsManager->_escKeyFl = false;
_skipRefreshFl = false;
return true;
}
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index 9ec9a86ddd..583e48db5c 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -54,7 +54,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
_vm->_fontManager.hideText(5);
_vm->_fontManager.hideText(9);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._scrollStatus = 1;
bool oldDisableInventFl = _vm->_globals._disableInventFl;
_vm->_globals._disableInventFl = true;
@@ -101,9 +101,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
_dialogueMesgId2 = _dialogueMesgId1 + 1;
_dialogueMesgId3 = _dialogueMesgId1 + 2;
_dialogueMesgId4 = _dialogueMesgId1 + 3;
- int oldMouseCursorId = _vm->_eventsManager._mouseCursorId;
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(0);
+ int oldMouseCursorId = _vm->_eventsManager->_mouseCursorId;
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(0);
if (!_vm->_globals._introSpeechOffFl) {
int answer = 0;
int dlgAnswer;
@@ -113,7 +113,7 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
answer = dialogAnswer(dlgAnswer, false);
if (answer == -1)
dlgAnswer = _dialogueMesgId4;
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (dlgAnswer != _dialogueMesgId4);
}
if (_vm->_globals._introSpeechOffFl) {
@@ -133,9 +133,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
_vm->_objectsManager.PERSO_ON = false;
- _vm->_eventsManager._mouseCursorId = oldMouseCursorId;
+ _vm->_eventsManager->_mouseCursorId = oldMouseCursorId;
- _vm->_eventsManager.changeMouseCursor(oldMouseCursorId);
+ _vm->_eventsManager->changeMouseCursor(oldMouseCursorId);
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
if (_vm->getIsDemo() == false)
@@ -144,13 +144,13 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
_vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette);
_vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette);
_vm->_graphicsManager.lockScreen();
- _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
_vm->_graphicsManager.unlockScreen();
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399);
_vm->_globals._disableInventFl = oldDisableInventFl;
_vm->_graphicsManager.updateScreen();
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._scrollStatus = 0;
}
@@ -191,9 +191,9 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) {
_dialogueMesgId2 = _dialogueMesgId1 + 1;
_dialogueMesgId3 = _dialogueMesgId1 + 2;
_dialogueMesgId4 = _dialogueMesgId1 + 3;
- int oldMouseCursorId = _vm->_eventsManager._mouseCursorId;
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(0);
+ int oldMouseCursorId = _vm->_eventsManager->_mouseCursorId;
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(0);
if (!_vm->_globals._introSpeechOffFl) {
int answer;
@@ -215,9 +215,9 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) {
}
_characterBuffer = _vm->_globals.freeMemory(_characterBuffer);
- _vm->_eventsManager._mouseCursorId = oldMouseCursorId;
+ _vm->_eventsManager->_mouseCursorId = oldMouseCursorId;
- _vm->_eventsManager.changeMouseCursor(oldMouseCursorId);
+ _vm->_eventsManager->changeMouseCursor(oldMouseCursorId);
_vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette);
_vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette);
// TODO: The original re-enables the mouse cursor here
@@ -268,7 +268,7 @@ int TalkManager::dialogQuestion(bool animatedFl) {
int retVal = -1;
bool loopCond = false;
do {
- int mousePosY = _vm->_eventsManager.getMouseY();
+ int mousePosY = _vm->_eventsManager->getMouseY();
if (sentence1PosY < mousePosY && mousePosY < (sentence2PosY - 1)) {
_vm->_fontManager.setOptimalColor(6, 7, 8, 5);
retVal = _dialogueMesgId1;
@@ -286,8 +286,8 @@ int TalkManager::dialogQuestion(bool animatedFl) {
retVal = _dialogueMesgId4;
}
- _vm->_eventsManager.refreshScreenAndEvents();
- if (_vm->_eventsManager.getMouseButton())
+ _vm->_eventsManager->refreshScreenAndEvents();
+ if (_vm->_eventsManager->getMouseButton())
loopCond = true;
if (retVal == -1)
loopCond = false;
@@ -325,7 +325,7 @@ int TalkManager::dialogQuestion(bool animatedFl) {
dialogTalk();
}
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
return retVal;
}
@@ -385,19 +385,19 @@ int TalkManager::dialogAnswer(int idx, bool animatedFl) {
displayedTxtFl = true;
}
if (!_vm->_soundManager.mixVoice(mesgId, 1, displayedTxtFl)) {
- _vm->_eventsManager._curMouseButton = 0;
- _vm->_eventsManager._mouseButton = 0;
+ _vm->_eventsManager->_curMouseButton = 0;
+ _vm->_eventsManager->_mouseButton = 0;
if (_vm->getIsDemo()) {
for (int i = 0; i < frameNumb; i++) {
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
}
} else {
for (int i = 0; i < frameNumb; i++) {
- _vm->_eventsManager.refreshScreenAndEvents();
- if (_vm->_eventsManager._mouseButton || _vm->_eventsManager._curMouseButton)
+ _vm->_eventsManager->refreshScreenAndEvents();
+ if (_vm->_eventsManager->_mouseButton || _vm->_eventsManager->_curMouseButton)
break;
- if (_vm->_eventsManager.getMouseButton() && i + 1 > abs(frameNumb / 5))
+ if (_vm->_eventsManager->getMouseButton() && i + 1 > abs(frameNumb / 5))
break;
}
}
@@ -496,8 +496,8 @@ void TalkManager::dialogEndTalk() {
_vm->_objectsManager.hideBob(idx);
}
- _vm->_eventsManager.refreshScreenAndEvents();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
for (int idx = 21; idx <= 25; ++idx) {
if (_vm->_globals._animBqe[idx]._enabledFl)
@@ -642,7 +642,7 @@ void TalkManager::startCharacterAnim0(int startIdx, bool readOnlyFl) {
if (!READ_LE_INT16(&_characterAnim[2 * idx + 4]))
break;
if (_vm->_globals._speed != 501)
- _vm->_graphicsManager.fastDisplay(_characterSprite, _vm->_eventsManager._startPos.x + READ_LE_INT16(&_characterAnim[2 * idx]),
+ _vm->_graphicsManager.fastDisplay(_characterSprite, _vm->_eventsManager->_startPos.x + READ_LE_INT16(&_characterAnim[2 * idx]),
READ_LE_INT16(&_characterAnim[2 * idx + 2]), _characterAnim[2 * idx + 8]);
idx += 5;
} while (_vm->_globals._speed != 501);
@@ -882,7 +882,7 @@ void TalkManager::REPONSE2(int zone, int verb) {
_vm->_soundManager.playSample(1);
_vm->_objectsManager.SPACTION1(_vm->_objectsManager._forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
do
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
while (_vm->_objectsManager.getBobAnimDataIdx(6) < 12);
_vm->_objectsManager.stopBobAnimation(6);
_vm->_objectsManager.setBobAnimation(8);
@@ -930,7 +930,7 @@ void TalkManager::REPONSE2(int zone, int verb) {
_vm->_soundManager.playSample(1);
_vm->_objectsManager.SPACTION1(_vm->_objectsManager._forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
do
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
while (_vm->_objectsManager.getBobAnimDataIdx(5) < 12);
_vm->_objectsManager.stopBobAnimation(5);
_vm->_objectsManager.setBobAnimation(7);
@@ -966,7 +966,7 @@ void TalkManager::REPONSE2(int zone, int verb) {
void TalkManager::animateObject(const Common::String &filename) {
_vm->_fontManager.hideText(5);
_vm->_fontManager.hideText(9);
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._scrollStatus = 1;
_vm->_linesManager.clearAllZones();
_vm->_linesManager.resetLines();
@@ -976,8 +976,8 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_linesManager.BOBZONE[i] = 0;
_vm->_objectsManager._zoneNum = -1;
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(0);
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(0);
_characterBuffer = _vm->_fileManager.searchCat(filename, RES_PER);
_characterSize = _vm->_globals._catalogSize;
if (_characterBuffer == g_PTRNUL) {
@@ -1028,7 +1028,7 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_objectsManager._forceZoneFl = true;
_vm->_objectsManager._zoneNum = -1;
do {
- int mouseButton = _vm->_eventsManager.getMouseButton();
+ int mouseButton = _vm->_eventsManager->getMouseButton();
if (mouseButton == 1)
_vm->_objectsManager.handleLeftButton();
else if (mouseButton == 2)
@@ -1037,7 +1037,7 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_linesManager.checkZone();
if (_vm->_globals._actionMoveTo)
_vm->_objectsManager.PARADISE();
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
} while (!_vm->_globals._exitId);
dialogEndTalk();
dialogTalk();
@@ -1067,8 +1067,8 @@ void TalkManager::animateObject(const Common::String &filename) {
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
_vm->_objectsManager.PERSO_ON = false;
- _vm->_eventsManager._mouseCursorId = 4;
- _vm->_eventsManager.changeMouseCursor(4);
+ _vm->_eventsManager->_mouseCursorId = 4;
+ _vm->_eventsManager->changeMouseCursor(4);
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
if (!_vm->getIsDemo())
@@ -1077,14 +1077,14 @@ void TalkManager::animateObject(const Common::String &filename) {
_vm->_graphicsManager.initColorTable(145, 150, _vm->_graphicsManager._palette);
_vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette);
_vm->_graphicsManager.lockScreen();
- _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
+ _vm->_graphicsManager.m_scroll16(_vm->_graphicsManager._vesaScreen, _vm->_eventsManager->_startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
_vm->_graphicsManager.unlockScreen();
_vm->_graphicsManager.setPaletteVGA256(_vm->_graphicsManager._palette);
memcpy(_vm->_graphicsManager._vesaBuffer, _vm->_graphicsManager._vesaScreen, 614399);
_vm->_globals._disableInventFl = false;
_vm->_graphicsManager.updateScreen();
for (int i = 0; i <= 4; i++)
- _vm->_eventsManager.refreshScreenAndEvents();
+ _vm->_eventsManager->refreshScreenAndEvents();
_vm->_graphicsManager._scrollStatus = 0;
}