HOPKINS: Start renaming EventsManager functions
This commit is contained in:
parent
af667771a9
commit
299fbfc7c7
15 changed files with 538 additions and 575 deletions
|
@ -107,13 +107,13 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
|||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager.lItCounter = 0;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
_vm->_soundManager.LOAD_ANM_SOUND();
|
||||
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
// Do pre-animation delay
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY == true)
|
||||
if (_vm->_eventsManager._escKeyFl)
|
||||
goto EXIT;
|
||||
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
|
@ -140,7 +140,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
|||
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY)
|
||||
if (_vm->_eventsManager._escKeyFl)
|
||||
goto EXIT;
|
||||
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
|
@ -172,7 +172,7 @@ void AnimationManager::playAnim(const Common::String &filename, uint32 rate1, ui
|
|||
if (_vm->_globals.iRegul == 1) {
|
||||
// Do post-animation delay
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY)
|
||||
if (_vm->_eventsManager._escKeyFl)
|
||||
break;
|
||||
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
|
@ -313,12 +313,12 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
|||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager.lItCounter = 0;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
_vm->_soundManager.LOAD_ANM_SOUND();
|
||||
if (_vm->_globals.iRegul != 1)
|
||||
break;
|
||||
for (;;) {
|
||||
if (_vm->_eventsManager.ESC_KEY == true)
|
||||
if (_vm->_eventsManager._escKeyFl == true)
|
||||
goto LABEL_114;
|
||||
if (redrawAnim() == true)
|
||||
break;
|
||||
|
@ -349,18 +349,17 @@ void AnimationManager::playAnim2(const Common::String &filename, uint32 a2, uint
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
} else {
|
||||
_vm->_eventsManager.souris_max();
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
|
@ -428,7 +427,7 @@ LABEL_77:
|
|||
LABEL_88:
|
||||
if (v5 == -1) {
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
while (_vm->_eventsManager.ESC_KEY != true) {
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
if (redrawAnim() == true) {
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
goto LABEL_114;
|
||||
|
@ -453,18 +452,17 @@ LABEL_88:
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
} else {
|
||||
_vm->_eventsManager.souris_max();
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
|
@ -492,7 +490,7 @@ LABEL_88:
|
|||
goto LABEL_114;
|
||||
}
|
||||
}
|
||||
while (_vm->_eventsManager.ESC_KEY != true) {
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
if (redrawAnim() == true) {
|
||||
if (_vm->_graphicsManager.NOLOCK == true)
|
||||
break;
|
||||
|
@ -517,18 +515,17 @@ LABEL_88:
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
} else {
|
||||
_vm->_eventsManager.souris_max();
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH * 2);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
|
@ -618,18 +615,17 @@ LABEL_114:
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
} else {
|
||||
_vm->_eventsManager.souris_max();
|
||||
_vm->_graphicsManager.SCANLINE(SCREEN_WIDTH);
|
||||
_vm->_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
|
@ -944,7 +940,7 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
|||
return;
|
||||
|
||||
v7 = 0;
|
||||
_vm->_eventsManager.souris_flag = false;
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
if (!NO_COUL) {
|
||||
_vm->_eventsManager.VBL();
|
||||
|
||||
|
@ -1003,14 +999,14 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
|||
}
|
||||
if (_vm->getIsDemo()) {
|
||||
_vm->_eventsManager.lItCounter = 0;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
_vm->_soundManager.LOAD_ANM_SOUND();
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY == true) {
|
||||
if (!_vm->_eventsManager.NOESC)
|
||||
if (_vm->_eventsManager._escKeyFl == true) {
|
||||
if (!_vm->_eventsManager._disableEscKeyFl)
|
||||
goto LABEL_59;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
}
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
|
@ -1020,14 +1016,14 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
|||
if (NO_COUL)
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(v9);
|
||||
_vm->_eventsManager.lItCounter = 0;
|
||||
_vm->_eventsManager.ESC_KEY = 0;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
_vm->_soundManager.LOAD_ANM_SOUND();
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY) {
|
||||
if (!_vm->_eventsManager.NOESC)
|
||||
if (_vm->_eventsManager._escKeyFl) {
|
||||
if (!_vm->_eventsManager._disableEscKeyFl)
|
||||
goto LABEL_59;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
}
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
|
@ -1050,10 +1046,10 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
|||
f.read(v9, READ_LE_UINT32(v10 + 8));
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY == true) {
|
||||
if (!_vm->_eventsManager.NOESC)
|
||||
if (_vm->_eventsManager._escKeyFl == true) {
|
||||
if (!_vm->_eventsManager._disableEscKeyFl)
|
||||
goto LABEL_59;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
}
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
|
@ -1083,10 +1079,10 @@ void AnimationManager::playSequence(const Common::String &file, uint32 rate1, ui
|
|||
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
do {
|
||||
if (_vm->_eventsManager.ESC_KEY == true) {
|
||||
if (!_vm->_eventsManager.NOESC)
|
||||
if (_vm->_eventsManager._escKeyFl == true) {
|
||||
if (!_vm->_eventsManager._disableEscKeyFl)
|
||||
goto LABEL_59;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
}
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
_vm->_soundManager.VERIF_SOUND();
|
||||
|
@ -1101,7 +1097,7 @@ LABEL_59:
|
|||
_vm->_saveLoadManager.bload("TEMP.SCR", _vm->_graphicsManager.VESA_SCREEN);
|
||||
g_system->getSavefileManager()->removeSavefile("TEMP.SCR");
|
||||
|
||||
_vm->_eventsManager.souris_flag = true;
|
||||
_vm->_eventsManager._mouseFl = true;
|
||||
}
|
||||
if (v7 == 1)
|
||||
_vm->_globals.dos_free2(ptr);
|
||||
|
@ -1126,7 +1122,7 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
|
|||
if (_vm->shouldQuit())
|
||||
return;
|
||||
|
||||
_vm->_eventsManager.souris_flag = false;
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
v10 = _vm->_graphicsManager.VESA_SCREEN;
|
||||
v11 = _vm->_globals.dos_malloc2(0x16u);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSEQ, file);
|
||||
|
@ -1176,12 +1172,12 @@ void AnimationManager::playSequence2(const Common::String &file, uint32 rate1, u
|
|||
_vm->_graphicsManager.DD_VBL();
|
||||
}
|
||||
_vm->_eventsManager.lItCounter = 0;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
_vm->_soundManager.LOAD_ANM_SOUND();
|
||||
if (_vm->_globals.iRegul != 1)
|
||||
break;
|
||||
while (!_vm->shouldQuit()) {
|
||||
if (_vm->_eventsManager.ESC_KEY == true)
|
||||
if (_vm->_eventsManager._escKeyFl == true)
|
||||
goto LABEL_54;
|
||||
if (redrawAnim() == true)
|
||||
break;
|
||||
|
@ -1239,7 +1235,7 @@ LABEL_33:
|
|||
LABEL_44:
|
||||
if (v4) {
|
||||
if (_vm->_globals.iRegul == 1) {
|
||||
while (_vm->_eventsManager.ESC_KEY != true) {
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
if (redrawAnim() == true)
|
||||
goto LABEL_48;
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
|
@ -1254,7 +1250,7 @@ LABEL_53:
|
|||
goto LABEL_54;
|
||||
}
|
||||
}
|
||||
while (_vm->_eventsManager.ESC_KEY != true) {
|
||||
while (_vm->_eventsManager._escKeyFl != true) {
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
if (redrawAnim() == true)
|
||||
goto LABEL_48;
|
||||
|
@ -1308,7 +1304,7 @@ LABEL_54:
|
|||
|
||||
f.close();
|
||||
_vm->_globals.dos_free2(v11);
|
||||
_vm->_eventsManager.souris_flag = true;
|
||||
_vm->_eventsManager._mouseFl = true;
|
||||
}
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
|
|
@ -85,7 +85,7 @@ void ComputerManager::setTextMode() {
|
|||
_vm->_graphicsManager.LOAD_IMAGE("WINTEXT");
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
loadMenu();
|
||||
_vm->_eventsManager.souris_flag = false;
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,13 +124,12 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
|||
char s[12];
|
||||
const char *s2;
|
||||
|
||||
_vm->_eventsManager.ESC_KEY = 0;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
passwordMatch = false;
|
||||
_vm->_graphicsManager.RESET_SEGMENT_VESA();
|
||||
setVideoMode();
|
||||
setTextColor(4);
|
||||
|
||||
_vm->_eventsManager.videkey();
|
||||
setTextPosition(2, 4);
|
||||
if (mode == COMPUTER_HOPKINS)
|
||||
outText(Common::String(_menuText[0]._line));
|
||||
|
@ -195,8 +194,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
|||
|
||||
if (passwordMatch) {
|
||||
while (!_vm->shouldQuit()) {
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager.videkey();
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
clearScreen();
|
||||
setTextColor(4);
|
||||
setTextPosition(2, 4);
|
||||
|
@ -222,7 +220,6 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
|||
setTextPosition(16, 25);
|
||||
outText2(Common::String(_menuText[11]._line));
|
||||
} else if (mode == COMPUTER_SAMANTHAS) {
|
||||
_vm->_eventsManager.videkey();
|
||||
setTextPosition(10, 25);
|
||||
// outText2(Common::String(_menuText[0x95A])); <=== CHECKME: Unexpected value! replaced by the following line, for consistancy
|
||||
outText2(Common::String(_menuText[12]._line));
|
||||
|
@ -254,7 +251,6 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
|||
if (v12 == '1') {
|
||||
displayGamesSubMenu();
|
||||
} else if (mode == COMPUTER_HOPKINS) {
|
||||
_vm->_eventsManager.videkey();
|
||||
clearScreen();
|
||||
setTextColor(4);
|
||||
setTextPosition(2, 4);
|
||||
|
@ -307,7 +303,7 @@ void ComputerManager::showComputer(ComputerEnum mode) {
|
|||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.DD_VBL();
|
||||
restoreFBIRoom();
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
}
|
||||
if (mode == 1)
|
||||
_vm->_globals.SORTIE = 13;
|
||||
|
@ -365,8 +361,8 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
|
|||
int x2 = 0;
|
||||
|
||||
int textIndex = 0;
|
||||
bool oldMouseFlag = _vm->_eventsManager.souris_flag;
|
||||
_vm->_eventsManager.souris_flag = false;
|
||||
bool oldMouseFlag = _vm->_eventsManager._mouseFl;
|
||||
_vm->_eventsManager._mouseFl = false;
|
||||
|
||||
_vm->_fontManager.TEXT_NOW(xp, yp, "_", -4);
|
||||
do {
|
||||
|
@ -480,7 +476,7 @@ void ComputerManager::TXT4(int xp, int yp, int textIdx) {
|
|||
|
||||
_vm->_eventsManager.VBL();
|
||||
_inputBuf[textIndex] = 0;
|
||||
_vm->_eventsManager.souris_flag = oldMouseFlag;
|
||||
_vm->_eventsManager._mouseFl = oldMouseFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -507,7 +503,7 @@ void ComputerManager::restoreFBIRoom() {
|
|||
|
||||
_vm->_globals.police_l = 12;
|
||||
_vm->_globals.police_h = 21;
|
||||
_vm->_eventsManager.souris_flag = true;
|
||||
_vm->_eventsManager._mouseFl = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -528,7 +524,7 @@ void ComputerManager::readText(int idx) {
|
|||
Common::String numStr;
|
||||
int num;
|
||||
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
|
||||
if (_vm->_globals.FR == 0)
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPLINK, "THOPKAN.TXT");
|
||||
|
@ -585,7 +581,6 @@ void ComputerManager::readText(int idx) {
|
|||
++v10;
|
||||
} while (v4 != 37);
|
||||
|
||||
_vm->_eventsManager.videkey();
|
||||
_vm->_eventsManager.keywin();
|
||||
_vm->_globals.dos_free2(ptr);
|
||||
}
|
||||
|
@ -598,10 +593,9 @@ void ComputerManager::displayGamesSubMenu() {
|
|||
uint oldSpeed = _vm->_globals.vitesse;
|
||||
|
||||
_vm->_globals.vitesse = 1;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
_breakoutSpr = g_PTRNUL;
|
||||
_vm->_eventsManager.CASSE = true;
|
||||
_vm->_eventsManager.CASSE_SOURIS_ON();
|
||||
_vm->_eventsManager._breakoutFl = true;
|
||||
_breakoutLevel = (int16 *)g_PTRNUL;
|
||||
_breakoutBrickNbr = 0;
|
||||
_breakoutScore = 0;
|
||||
|
@ -633,8 +627,7 @@ void ComputerManager::displayGamesSubMenu() {
|
|||
_vm->_soundManager.DEL_SAMPLE(2);
|
||||
_vm->_soundManager.DEL_SAMPLE(3);
|
||||
_vm->_globals.vitesse = oldSpeed;
|
||||
_vm->_eventsManager.CASSE = false;
|
||||
_vm->_eventsManager.CASSE_SOURIS_OFF();
|
||||
_vm->_eventsManager._breakoutFl = false;
|
||||
setVideoMode();
|
||||
setTextColor(15);
|
||||
clearScreen();
|
||||
|
@ -724,7 +717,7 @@ void ComputerManager::newLevel() {
|
|||
RAQX = 150;
|
||||
_vm->_objectsManager.SPRITE_ON(0);
|
||||
_vm->_objectsManager.SPRITE_ON(1);
|
||||
_vm->_eventsManager.MOUSE_ON1();
|
||||
_vm->_eventsManager.mouseOn();
|
||||
_vm->_soundManager.PLAY_SAMPLE(3, 5);
|
||||
}
|
||||
|
||||
|
@ -809,7 +802,7 @@ void ComputerManager::playBreakout() {
|
|||
while (!_vm->shouldQuit()) {
|
||||
while (!_vm->shouldQuit()) {
|
||||
// Set up the racket and ball
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_ballPosition = Common::Point(RAQX + 14, 187);
|
||||
_vm->_objectsManager.SETYSPR(1, 187);
|
||||
_vm->_objectsManager.SETXSPR(1, _ballPosition.x);
|
||||
|
@ -819,8 +812,8 @@ void ComputerManager::playBreakout() {
|
|||
|
||||
// Wait for mouse press to start playing
|
||||
do {
|
||||
RAQX = _vm->_eventsManager.XMOUSE();
|
||||
if (_vm->_eventsManager.souris_x <= 4)
|
||||
RAQX = _vm->_eventsManager.getMouseX();
|
||||
if (_vm->_eventsManager._mousePos.x <= 4)
|
||||
RAQX = 5;
|
||||
if (RAQX > 282)
|
||||
RAQX = 282;
|
||||
|
@ -828,7 +821,7 @@ void ComputerManager::playBreakout() {
|
|||
_vm->_objectsManager.SETXSPR(1, RAQX + 14);
|
||||
_vm->_objectsManager.SETYSPR(1, 187);
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (!_vm->shouldQuit() && _vm->_eventsManager.BMOUSE() != 1);
|
||||
} while (!_vm->shouldQuit() && _vm->_eventsManager.getMouseButton() != 1);
|
||||
|
||||
_breakoutSpeed = 1;
|
||||
_ballPosition = Common::Point(RAQX + 14, 187);
|
||||
|
@ -839,8 +832,8 @@ void ComputerManager::playBreakout() {
|
|||
do {
|
||||
_vm->_soundManager.checkSounds();
|
||||
|
||||
RAQX = _vm->_eventsManager.XMOUSE();
|
||||
if (_vm->_eventsManager.souris_x <= 4)
|
||||
RAQX = _vm->_eventsManager.getMouseX();
|
||||
if (_vm->_eventsManager._mousePos.x <= 4)
|
||||
RAQX = 5;
|
||||
if (RAQX > 282)
|
||||
RAQX = 282;
|
||||
|
@ -858,7 +851,7 @@ void ComputerManager::playBreakout() {
|
|||
if (_breakoutLives)
|
||||
continue;
|
||||
}
|
||||
_vm->_eventsManager.MOUSE_ON1();
|
||||
_vm->_eventsManager.mouseOn();
|
||||
_vm->_objectsManager.SPRITE_OFF(0);
|
||||
_vm->_objectsManager.SPRITE_OFF(1);
|
||||
if (_breakoutScore > _breakoutHiscore)
|
||||
|
@ -923,18 +916,18 @@ int ComputerManager::displayHiscores() {
|
|||
buttonIndex = 0;
|
||||
do {
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
xp = _vm->_eventsManager.XMOUSE();
|
||||
yp = _vm->_eventsManager.YMOUSE();
|
||||
xp = _vm->_eventsManager.getMouseX();
|
||||
yp = _vm->_eventsManager.getMouseY();
|
||||
|
||||
if (_vm->_eventsManager.BMOUSE() == 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.BMOUSE() == 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.VBL();
|
||||
} while (!buttonIndex && !_vm->shouldQuit());
|
||||
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_OUT_CASSE();
|
||||
_vm->_globals.LIBERE_FICHIER(ptr);
|
||||
return buttonIndex;
|
||||
|
|
|
@ -57,7 +57,7 @@ void DialogsManager::showOptionsDialog() {
|
|||
bool doneFlag;
|
||||
|
||||
doneFlag = false;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
_vm->_eventsManager.VBL();
|
||||
if (_vm->_globals.FR == 1)
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "OPTIFR.SPR");
|
||||
|
@ -70,10 +70,10 @@ void DialogsManager::showOptionsDialog() {
|
|||
_vm->_globals._optionDialogFl = true;
|
||||
|
||||
do {
|
||||
if (_vm->_eventsManager.BMOUSE()) {
|
||||
Common::Point mousePos(_vm->_eventsManager.XMOUSE(), _vm->_eventsManager.YMOUSE());
|
||||
mousePos.x = _vm->_eventsManager.XMOUSE();
|
||||
mousePos.y = _vm->_eventsManager.YMOUSE();
|
||||
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.MUSICOFF) {
|
||||
if (mousePos.x >= _vm->_graphicsManager.ofscroll + 300 && mousePos.y > 113 && mousePos.x <= _vm->_graphicsManager.ofscroll + 327 && mousePos.y <= 138) {
|
||||
|
@ -308,8 +308,8 @@ void DialogsManager::showInventory() {
|
|||
_vm->_objectsManager.FLAG_VISIBLE = false;
|
||||
for (int v1 = 0; v1 <= 1; v1++) {
|
||||
inventAnim();
|
||||
_vm->_eventsManager.XMOUSE();
|
||||
_vm->_eventsManager.YMOUSE();
|
||||
_vm->_eventsManager.getMouseX();
|
||||
_vm->_eventsManager.getMouseY();
|
||||
_vm->_eventsManager.VBL();
|
||||
}
|
||||
_vm->_dialogsManager._inventWin1 = g_PTRNUL;
|
||||
|
@ -378,9 +378,9 @@ LABEL_7:
|
|||
// Turn on drawing the inventory dialog in the event manager
|
||||
_inventDisplayedFl = true;
|
||||
|
||||
int v8 = _vm->_eventsManager.XMOUSE();
|
||||
int v9 = _vm->_eventsManager.YMOUSE();
|
||||
int v12 = _vm->_eventsManager.BMOUSE();
|
||||
int v8 = _vm->_eventsManager.getMouseX();
|
||||
int v9 = _vm->_eventsManager.getMouseY();
|
||||
int v12 = _vm->_eventsManager.getMouseButton();
|
||||
int v10 = v13;
|
||||
int v11 = _vm->_linesManager.ZONE_OBJET(v8, v9);
|
||||
v13 = v11;
|
||||
|
@ -392,7 +392,7 @@ LABEL_7:
|
|||
if (v12 == 2) {
|
||||
_vm->_objectsManager.OBJETPLUS(v13);
|
||||
if (_vm->_eventsManager.btsouris != 23)
|
||||
_vm->_eventsManager.CHANGE_MOUSE(_vm->_eventsManager.btsouris);
|
||||
_vm->_eventsManager.changeMouseCursor(_vm->_eventsManager.btsouris);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ LABEL_7:
|
|||
if (_vm->_soundManager.VOICEOFF == 1) {
|
||||
do
|
||||
_vm->_eventsManager.VBL();
|
||||
while (!_vm->_globals.SORTIE && _vm->_eventsManager.BMOUSE() != 1);
|
||||
while (!_vm->_globals.SORTIE && _vm->_eventsManager.getMouseButton() != 1);
|
||||
_vm->_fontManager.TEXTE_OFF(9);
|
||||
}
|
||||
if (_vm->_globals.SORTIE) {
|
||||
|
@ -461,7 +461,7 @@ LABEL_7:
|
|||
_vm->_dialogsManager.showSaveGame();
|
||||
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
_vm->_objectsManager.old_cady = 0;
|
||||
_vm->_objectsManager.cady = 0;
|
||||
_vm->_objectsManager.old_cadx = 0;
|
||||
|
@ -522,12 +522,12 @@ void DialogsManager::inventAnim() {
|
|||
*/
|
||||
void DialogsManager::testDialogOpening() {
|
||||
if (_vm->_globals.PLAN_FLAG)
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
|
||||
if (_vm->_eventsManager.GAME_KEY != KEY_NONE) {
|
||||
if (_vm->_eventsManager._gameKey != KEY_NONE) {
|
||||
if (!_inventFl) {
|
||||
DIALOG_KEY key = _vm->_eventsManager.GAME_KEY;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
DIALOG_KEY key = _vm->_eventsManager._gameKey;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
_inventFl = true;
|
||||
|
||||
switch (key) {
|
||||
|
@ -554,7 +554,7 @@ void DialogsManager::testDialogOpening() {
|
|||
}
|
||||
|
||||
_inventFl = false;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -571,11 +571,11 @@ void DialogsManager::showLoadGame() {
|
|||
do {
|
||||
slotNumber = searchSavegames();
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (_vm->_eventsManager.BMOUSE() != 1);
|
||||
} while (_vm->_eventsManager.getMouseButton() != 1);
|
||||
} while (!slotNumber);
|
||||
_vm->_objectsManager.SL_FLAG = false;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager.start_x + 183, 60, 457, 413);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 183, 60, 457, 413);
|
||||
_vm->_objectsManager.BOBTOUS = true;
|
||||
_vm->_objectsManager.SL_SPR = _vm->_globals.dos_free2(_vm->_objectsManager.SL_SPR);
|
||||
_vm->_objectsManager.SL_SPR2 = _vm->_globals.dos_free2(_vm->_objectsManager.SL_SPR2);
|
||||
|
@ -603,12 +603,12 @@ void DialogsManager::showSaveGame() {
|
|||
do {
|
||||
slotNumber = searchSavegames();
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (!_vm->shouldQuit() && _vm->_eventsManager.BMOUSE() != 1);
|
||||
} while (!_vm->shouldQuit() && _vm->_eventsManager.getMouseButton() != 1);
|
||||
} while (!_vm->shouldQuit() && !slotNumber);
|
||||
|
||||
_vm->_objectsManager.SL_FLAG = false;
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager.start_x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager.start_x + 183, 60, _vm->_eventsManager.start_x + 457, 413);
|
||||
_vm->_graphicsManager.SCOPY(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x + 183, 60, 274, 353, _vm->_graphicsManager.VESA_BUFFER, _vm->_eventsManager._startPos.x + 183, 60);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 183, 60, _vm->_eventsManager._startPos.x + 457, 413);
|
||||
_vm->_objectsManager.BOBTOUS = true;
|
||||
_vm->_objectsManager.SL_SPR = _vm->_globals.dos_free2(_vm->_objectsManager.SL_SPR);
|
||||
_vm->_objectsManager.SL_SPR2 = _vm->_globals.dos_free2(_vm->_objectsManager.SL_SPR2);
|
||||
|
@ -647,18 +647,18 @@ void DialogsManager::showSaveLoad(int a1) {
|
|||
_vm->_objectsManager.SL_SPR = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER);
|
||||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "SAVE2.SPR");
|
||||
_vm->_objectsManager.SL_SPR2 = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 483, 360, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 483, 360, 0);
|
||||
|
||||
if (_vm->_globals.FR) {
|
||||
if (a1 == 1)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 525, 375, 1);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 525, 375, 1);
|
||||
if (a1 == 2)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 515, 375, 2);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 515, 375, 2);
|
||||
} else {
|
||||
if (a1 == 1)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 535, 372, 1);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 535, 372, 1);
|
||||
if (a1 == 2)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 539, 372, 2);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 539, 372, 2);
|
||||
}
|
||||
|
||||
for (slotNumber = 1; slotNumber <= 6; ++slotNumber) {
|
||||
|
@ -670,22 +670,22 @@ void DialogsManager::showSaveLoad(int a1) {
|
|||
|
||||
switch (slotNumber) {
|
||||
case 1:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 190, 112, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 112, 0x80u, 87);
|
||||
break;
|
||||
case 2:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 323, 112, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 112, 0x80u, 87);
|
||||
break;
|
||||
case 3:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 190, 203, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 203, 0x80u, 87);
|
||||
break;
|
||||
case 4:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 323, 203, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 203, 0x80u, 87);
|
||||
break;
|
||||
case 5:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 190, 294, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 190, 294, 0x80u, 87);
|
||||
break;
|
||||
case 6:
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager.start_x + 323, 294, 0x80u, 87);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, thumb, _vm->_eventsManager._startPos.x + 323, 294, 0x80u, 87);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -695,7 +695,7 @@ void DialogsManager::showSaveLoad(int a1) {
|
|||
}
|
||||
}
|
||||
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager.start_x + 183, 60, 0x112u, 353);
|
||||
_vm->_graphicsManager.Capture_Mem(_vm->_graphicsManager.VESA_BUFFER, _vm->_objectsManager.SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 0x112u, 353);
|
||||
_vm->_objectsManager.SL_FLAG = true;
|
||||
_vm->_objectsManager.SL_MODE = a1;
|
||||
_vm->_objectsManager.SL_X = 0;
|
||||
|
@ -707,12 +707,12 @@ void DialogsManager::showSaveLoad(int a1) {
|
|||
*/
|
||||
int DialogsManager::searchSavegames() {
|
||||
int slotNumber = 0;
|
||||
int xp = _vm->_eventsManager.XMOUSE();
|
||||
int yp = _vm->_eventsManager.YMOUSE();
|
||||
int xp = _vm->_eventsManager.getMouseX();
|
||||
int yp = _vm->_eventsManager.getMouseY();
|
||||
|
||||
_vm->_graphicsManager.ofscroll = _vm->_eventsManager.start_x;
|
||||
_vm->_graphicsManager.ofscroll = _vm->_eventsManager._startPos.x;
|
||||
if ((uint16)(yp - 112) <= 0x56u) {
|
||||
if (xp > _vm->_eventsManager.start_x + 189 && xp < _vm->_eventsManager.start_x + 318)
|
||||
if (xp > _vm->_eventsManager._startPos.x + 189 && xp < _vm->_eventsManager._startPos.x + 318)
|
||||
slotNumber = 1;
|
||||
if ((uint16)(yp - 112) <= 0x56u && xp > _vm->_graphicsManager.ofscroll + 322 && xp < _vm->_graphicsManager.ofscroll + 452)
|
||||
slotNumber = 2;
|
||||
|
|
|
@ -32,115 +32,115 @@
|
|||
namespace Hopkins {
|
||||
|
||||
EventsManager::EventsManager() {
|
||||
souris_flag = false;
|
||||
mouse_linux = false;
|
||||
souris_sizex = souris_sizey = 0;
|
||||
ofset_souris_x = ofset_souris_y = 0;
|
||||
start_x = start_y = 0;
|
||||
CASSE = false;
|
||||
_mouseFl = false;
|
||||
_mouseLinuxFl = false;
|
||||
_mouseSizeX = _mouseSizeY = 0;
|
||||
_mouseOffset.x = _mouseOffset.y = 0;
|
||||
_startPos.x = _startPos.y = 0;
|
||||
_breakoutFl = false;
|
||||
souris_n = 0;
|
||||
souris_bb = 0;
|
||||
souris_b = 0;
|
||||
pointeur_souris = NULL;
|
||||
_mouseCursor = NULL;
|
||||
_gameCounter = 0;
|
||||
lItCounter = 0;
|
||||
ESC_KEY = false;
|
||||
GAME_KEY = KEY_NONE;
|
||||
_escKeyFl = false;
|
||||
_gameKey = KEY_NONE;
|
||||
btsouris = 0;
|
||||
OLD_ICONE = 0;
|
||||
Bufferobjet = NULL;
|
||||
_oldIconId = 0;
|
||||
_objectBuf = NULL;
|
||||
|
||||
Common::fill(&keyState[0], &keyState[256], false);
|
||||
Common::fill(&_keyState[0], &_keyState[256], false);
|
||||
_priorCounterTime = 0;
|
||||
_priorFrameTime = 0;
|
||||
}
|
||||
|
||||
EventsManager::~EventsManager() {
|
||||
_vm->_globals.dos_free2(Bufferobjet);
|
||||
_vm->_globals.dos_free2(pointeur_souris);
|
||||
_vm->_globals.dos_free2(_objectBuf);
|
||||
_vm->_globals.dos_free2(_mouseCursor);
|
||||
}
|
||||
|
||||
void EventsManager::setParent(HopkinsEngine *vm) {
|
||||
_vm = vm;
|
||||
}
|
||||
|
||||
// Install Mouse
|
||||
void EventsManager::INSTALL_SOURIS() {
|
||||
// No implementation in original
|
||||
}
|
||||
|
||||
// Mouse On
|
||||
void EventsManager::souris_on() {
|
||||
souris_flag = true;
|
||||
void EventsManager::setMouseOn() {
|
||||
_mouseFl = true;
|
||||
|
||||
if (mouse_linux) {
|
||||
souris_sizex = 52;
|
||||
souris_sizey = 32;
|
||||
if (_mouseLinuxFl) {
|
||||
_mouseSizeX = 52;
|
||||
_mouseSizeY = 32;
|
||||
} else {
|
||||
souris_sizex = 34;
|
||||
souris_sizey = 20;
|
||||
_mouseSizeX = 34;
|
||||
_mouseSizeY = 20;
|
||||
}
|
||||
|
||||
ofset_souris_x = 0;
|
||||
ofset_souris_y = 0;
|
||||
_mouseOffset.x = 0;
|
||||
_mouseOffset.y = 0;
|
||||
|
||||
if (!CASSE)
|
||||
souris_xy(300, 200);
|
||||
if (!_breakoutFl)
|
||||
setMouseXY(300, 200);
|
||||
else
|
||||
souris_xy(150, 100);
|
||||
setMouseXY(150, 100);
|
||||
}
|
||||
|
||||
// Set Mouse position
|
||||
void EventsManager::souris_xy(int xp, int yp) {
|
||||
/**
|
||||
* Set Mouse position
|
||||
*/
|
||||
void EventsManager::setMouseXY(int xp, int yp) {
|
||||
g_system->warpMouse(xp, yp);
|
||||
}
|
||||
|
||||
// Mouse Max
|
||||
void EventsManager::souris_max() {
|
||||
// No implementation in original
|
||||
/**
|
||||
* Get Mouse X
|
||||
*/
|
||||
int EventsManager::getMouseX() {
|
||||
_mousePos.x = _startPos.x + g_system->getEventManager()->getMousePos().x;
|
||||
_mousePos.y = g_system->getEventManager()->getMousePos().y;
|
||||
|
||||
return _mousePos.x + _mouseOffset.x;
|
||||
}
|
||||
|
||||
// Get Mouse X
|
||||
int EventsManager::XMOUSE() {
|
||||
souris_x = start_x + g_system->getEventManager()->getMousePos().x;
|
||||
souris_y = g_system->getEventManager()->getMousePos().y;
|
||||
/**
|
||||
* Get Mouse Y
|
||||
*/
|
||||
int EventsManager::getMouseY() {
|
||||
_mousePos.x = _startPos.x + g_system->getEventManager()->getMousePos().x;
|
||||
_mousePos.y = g_system->getEventManager()->getMousePos().y;
|
||||
|
||||
return souris_x + ofset_souris_x;
|
||||
return _mousePos.y + _mouseOffset.y;
|
||||
}
|
||||
|
||||
// Get Mouse Y
|
||||
int EventsManager::YMOUSE() {
|
||||
souris_x = start_x + g_system->getEventManager()->getMousePos().x;
|
||||
souris_y = g_system->getEventManager()->getMousePos().y;
|
||||
|
||||
return souris_y + ofset_souris_y;
|
||||
}
|
||||
|
||||
// Get Mouse Button
|
||||
int EventsManager::BMOUSE() {
|
||||
/**
|
||||
* Get Mouse Button
|
||||
*/
|
||||
int EventsManager::getMouseButton() {
|
||||
CONTROLE_MES();
|
||||
return souris_bb;
|
||||
}
|
||||
|
||||
// Mouse Off
|
||||
void EventsManager::MOUSE_OFF() {
|
||||
souris_flag = false;
|
||||
/**
|
||||
* Mouse Off
|
||||
*/
|
||||
void EventsManager::mouseOff() {
|
||||
_mouseFl = false;
|
||||
CursorMan.showMouse(false);
|
||||
}
|
||||
|
||||
// Mouse On
|
||||
void EventsManager::MOUSE_ON() {
|
||||
souris_on();
|
||||
souris_flag = true;
|
||||
/**
|
||||
* Mouse On
|
||||
*/
|
||||
void EventsManager::mouseOn() {
|
||||
setMouseOn();
|
||||
_mouseFl = true;
|
||||
CursorMan.showMouse(true);
|
||||
}
|
||||
|
||||
void EventsManager::MOUSE_ON1() {
|
||||
MOUSE_ON();
|
||||
}
|
||||
|
||||
// Change Mouse Cursor
|
||||
void EventsManager::CHANGE_MOUSE(int id) {
|
||||
/**
|
||||
* Change Mouse Cursor
|
||||
*/
|
||||
void EventsManager::changeMouseCursor(int id) {
|
||||
int cursorId = id;
|
||||
|
||||
if (btsouris != 23) {
|
||||
|
@ -149,8 +149,8 @@ void EventsManager::CHANGE_MOUSE(int id) {
|
|||
if (cursorId == 25)
|
||||
cursorId = 5;
|
||||
|
||||
if (OLD_ICONE != cursorId || !cursorId) {
|
||||
OLD_ICONE = cursorId;
|
||||
if (_oldIconId != cursorId || !cursorId) {
|
||||
_oldIconId = cursorId;
|
||||
souris_n = cursorId;
|
||||
|
||||
updateCursor();
|
||||
|
@ -204,11 +204,11 @@ void EventsManager::pollEvents() {
|
|||
return;
|
||||
|
||||
case Common::EVENT_KEYDOWN:
|
||||
keyState[(byte)toupper(event.kbd.ascii)] = true;
|
||||
_keyState[(byte)toupper(event.kbd.ascii)] = true;
|
||||
handleKey(event);
|
||||
return;
|
||||
case Common::EVENT_KEYUP:
|
||||
keyState[(byte)toupper(event.kbd.ascii)] = false;
|
||||
_keyState[(byte)toupper(event.kbd.ascii)] = false;
|
||||
return;
|
||||
case Common::EVENT_LBUTTONDOWN:
|
||||
souris_b = 1;
|
||||
|
@ -226,23 +226,23 @@ void EventsManager::pollEvents() {
|
|||
}
|
||||
|
||||
for (char chr = 'A'; chr <= 'Z'; chr++)
|
||||
keyState[(byte)chr] = false;
|
||||
_keyState[(byte)chr] = false;
|
||||
|
||||
for (char chr = '0'; chr <= '9'; chr++)
|
||||
keyState[(byte)chr] = false;
|
||||
_keyState[(byte)chr] = false;
|
||||
}
|
||||
|
||||
void EventsManager::handleKey(Common::Event &event) {
|
||||
ESC_KEY = event.kbd.keycode == Common::KEYCODE_ESCAPE;
|
||||
_escKeyFl = (event.kbd.keycode == Common::KEYCODE_ESCAPE);
|
||||
|
||||
if (event.kbd.keycode == Common::KEYCODE_i || event.kbd.keycode == Common::KEYCODE_TAB)
|
||||
GAME_KEY = KEY_INVENTORY;
|
||||
_gameKey = KEY_INVENTORY;
|
||||
else if (event.kbd.keycode == Common::KEYCODE_F5)
|
||||
GAME_KEY = KEY_SAVE;
|
||||
_gameKey = KEY_SAVE;
|
||||
else if (event.kbd.keycode == Common::KEYCODE_F7)
|
||||
GAME_KEY = KEY_LOAD;
|
||||
_gameKey = KEY_LOAD;
|
||||
else if (event.kbd.keycode == Common::KEYCODE_F1 || event.kbd.keycode == Common::KEYCODE_o)
|
||||
GAME_KEY = KEY_OPTIONS;
|
||||
_gameKey = KEY_OPTIONS;
|
||||
|
||||
// Check for debugger
|
||||
if ((event.kbd.keycode == Common::KEYCODE_d) && (event.kbd.flags & Common::KBD_CTRL)) {
|
||||
|
@ -261,35 +261,35 @@ int EventsManager::keywin() {
|
|||
return -1;
|
||||
|
||||
for (char ch = 'A'; ch <= 'Z'; ++ch) {
|
||||
if (keyState[(byte)ch]) {
|
||||
if (_keyState[(byte)ch]) {
|
||||
foundChar = ch;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (char ch = '0'; ch <= '9'; ++ch) {
|
||||
if (keyState[(byte)ch]) {
|
||||
if (_keyState[(byte)ch]) {
|
||||
foundChar = ch;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyState[(byte)'.'])
|
||||
if (_keyState[(byte)'.'])
|
||||
foundChar = '.';
|
||||
else if (keyState[8])
|
||||
else if (_keyState[8])
|
||||
// BACKSPACE
|
||||
foundChar = 8;
|
||||
else if (keyState[13])
|
||||
else if (_keyState[13])
|
||||
// ENTER
|
||||
foundChar = 13;
|
||||
else if (keyState[(byte)' '])
|
||||
else if (_keyState[(byte)' '])
|
||||
foundChar = ' ';
|
||||
|
||||
VBL();
|
||||
}
|
||||
|
||||
// Wait for keypress release
|
||||
while (keyState[(byte)foundChar] && !_vm->shouldQuit()) {
|
||||
while (_keyState[(byte)foundChar] && !_vm->shouldQuit()) {
|
||||
VBL();
|
||||
g_system->delayMillis(10);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ void EventsManager::VBL() {
|
|||
|
||||
if (_vm->_graphicsManager.REDRAW) {
|
||||
_vm->_graphicsManager.DD_Lock();
|
||||
if (CASSE) {
|
||||
if (_breakoutFl) {
|
||||
_vm->_graphicsManager.CopyAsm(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_graphicsManager.REDRAW = 0;
|
||||
} else {
|
||||
|
@ -323,45 +323,45 @@ void EventsManager::VBL() {
|
|||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
}
|
||||
if (souris_flag == true) {
|
||||
if (_mouseFl == true) {
|
||||
v1 = 20;
|
||||
if (!mouse_linux)
|
||||
if (!_mouseLinuxFl)
|
||||
v1 = 10;
|
||||
v2 = 20;
|
||||
if (!mouse_linux)
|
||||
if (!_mouseLinuxFl)
|
||||
v2 = 15;
|
||||
v15 = souris_x - v1;
|
||||
yp = souris_y;
|
||||
v14 = souris_sizex;
|
||||
v13 = souris_sizey;
|
||||
v15 = _mousePos.x - v1;
|
||||
yp = _mousePos.y;
|
||||
v14 = _mouseSizeX;
|
||||
v13 = _mouseSizeY;
|
||||
if (btsouris == 23) {
|
||||
v14 = _vm->_globals.OBJL;
|
||||
v13 = _vm->_globals.OBJH;
|
||||
goto LABEL_35;
|
||||
}
|
||||
if (CASSE) {
|
||||
if (_breakoutFl) {
|
||||
if (v15 < _vm->_graphicsManager.min_x)
|
||||
v15 = _vm->_graphicsManager.min_x;
|
||||
if (souris_y < _vm->_graphicsManager.min_y)
|
||||
if (_mousePos.y < _vm->_graphicsManager.min_y)
|
||||
yp = _vm->_graphicsManager.min_y;
|
||||
if (souris_sizex + v15 >= _vm->_graphicsManager.max_x)
|
||||
v14 = souris_sizex - (souris_sizex + v15 - _vm->_graphicsManager.max_x);
|
||||
if (yp + souris_sizey < _vm->_graphicsManager.max_y)
|
||||
if (_mouseSizeX + v15 >= _vm->_graphicsManager.max_x)
|
||||
v14 = _mouseSizeX - (_mouseSizeX + v15 - _vm->_graphicsManager.max_x);
|
||||
if (yp + _mouseSizeY < _vm->_graphicsManager.max_y)
|
||||
goto LABEL_34;
|
||||
v3 = yp + souris_sizey - _vm->_graphicsManager.max_y;
|
||||
v3 = yp + _mouseSizeY - _vm->_graphicsManager.max_y;
|
||||
} else {
|
||||
if (v15 < _vm->_graphicsManager.min_x)
|
||||
v15 = _vm->_graphicsManager.min_x - v1;
|
||||
v2 = (int16)v2;
|
||||
if (souris_y < _vm->_graphicsManager.min_y - (int16)v2)
|
||||
if (_mousePos.y < _vm->_graphicsManager.min_y - (int16)v2)
|
||||
yp = _vm->_graphicsManager.min_y - (int16)v2;
|
||||
if (souris_sizex + v15 >= _vm->_graphicsManager.max_x)
|
||||
v14 = souris_sizex - (souris_sizex + v15 - _vm->_graphicsManager.max_x - v1);
|
||||
if (yp + souris_sizey < v2 + _vm->_graphicsManager.max_y)
|
||||
if (_mouseSizeX + v15 >= _vm->_graphicsManager.max_x)
|
||||
v14 = _mouseSizeX - (_mouseSizeX + v15 - _vm->_graphicsManager.max_x - v1);
|
||||
if (yp + _mouseSizeY < v2 + _vm->_graphicsManager.max_y)
|
||||
goto LABEL_34;
|
||||
v3 = v2 + yp + souris_sizey - _vm->_graphicsManager.max_y;
|
||||
v3 = v2 + yp + _mouseSizeY - _vm->_graphicsManager.max_y;
|
||||
}
|
||||
v13 = souris_sizey - v3;
|
||||
v13 = _mouseSizeY - v3;
|
||||
LABEL_34:
|
||||
v12 = v14 + v15;
|
||||
v11 = yp + v13;
|
||||
|
@ -369,7 +369,7 @@ LABEL_34:
|
|||
LABEL_35:
|
||||
if (!_vm->_globals.PUBEXIT)
|
||||
_vm->_objectsManager.AFF_SPRITES();
|
||||
if (souris_flag != true) {
|
||||
if (_mouseFl != true) {
|
||||
updateCursor();
|
||||
goto LABEL_54;
|
||||
}
|
||||
|
@ -410,10 +410,10 @@ LABEL_54:
|
|||
while (!_vm->shouldQuit()) {
|
||||
checkForNextFrameCounter();
|
||||
|
||||
while (CASSE || _vm->_globals.iRegul != 1) {
|
||||
while (_breakoutFl || _vm->_globals.iRegul != 1) {
|
||||
checkForNextFrameCounter();
|
||||
|
||||
if (CASSE != true)
|
||||
if (_breakoutFl != true)
|
||||
goto LABEL_63;
|
||||
if (lItCounter > 1)
|
||||
goto LABEL_65;
|
||||
|
@ -434,9 +434,9 @@ LABEL_65:
|
|||
} else {
|
||||
int v4;
|
||||
if (_vm->_graphicsManager.no_scroll != 2) {
|
||||
if (XMOUSE() > _vm->_graphicsManager.SCROLL + 620)
|
||||
if (getMouseX() > _vm->_graphicsManager.SCROLL + 620)
|
||||
_vm->_graphicsManager.SCROLL += _vm->_graphicsManager.SPEED_SCROLL;
|
||||
if (XMOUSE() < _vm->_graphicsManager.SCROLL + 10)
|
||||
if (getMouseX() < _vm->_graphicsManager.SCROLL + 10)
|
||||
_vm->_graphicsManager.SCROLL -= _vm->_graphicsManager.SPEED_SCROLL;
|
||||
}
|
||||
if (_vm->_graphicsManager.SCROLL < 0)
|
||||
|
@ -487,12 +487,12 @@ LABEL_65:
|
|||
}
|
||||
}
|
||||
_vm->_globals.NBBLOC = 0;
|
||||
start_x = v4;
|
||||
_startPos.x = v4;
|
||||
_vm->_graphicsManager.ofscroll = v4;
|
||||
_vm->_graphicsManager.SCROLL = v4;
|
||||
}
|
||||
_vm->_graphicsManager.OLD_SCROLL = v4;
|
||||
start_x = v4;
|
||||
_startPos.x = v4;
|
||||
_vm->_graphicsManager.ofscroll = v4;
|
||||
}
|
||||
souris_bb = souris_b;
|
||||
|
@ -541,10 +541,10 @@ void EventsManager::updateCursor() {
|
|||
|
||||
if (btsouris != 23) {
|
||||
// Draw standard cursor
|
||||
_vm->_graphicsManager.Sprite_Vesa(cursorSurface, pointeur_souris, 300, 300, souris_n);
|
||||
_vm->_graphicsManager.Sprite_Vesa(cursorSurface, _mouseCursor, 300, 300, souris_n);
|
||||
} else {
|
||||
// Draw the active inventory object
|
||||
_vm->_graphicsManager.Affiche_Perfect(cursorSurface, Bufferobjet, 300, 300, 0, 0, 0, 0);
|
||||
_vm->_graphicsManager.Affiche_Perfect(cursorSurface, _objectBuf, 300, 300, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// Reset the clipping bounds
|
||||
|
@ -572,7 +572,7 @@ void EventsManager::updateCursor() {
|
|||
}
|
||||
|
||||
// Calculate the X offset within the pointer image to the actual cursor data
|
||||
int xOffset = !mouse_linux ? 10 : 20;
|
||||
int xOffset = !_mouseLinuxFl ? 10 : 20;
|
||||
|
||||
// Set the ScummVM cursor from the surface
|
||||
Graphics::PixelFormat pixelFormat = g_system->getScreenFormat();
|
||||
|
|
|
@ -45,44 +45,41 @@ private:
|
|||
void checkForNextFrameCounter();
|
||||
void updateCursor();
|
||||
public:
|
||||
bool souris_flag;
|
||||
bool mouse_linux;
|
||||
int souris_sizex, souris_sizey;
|
||||
int ofset_souris_x, ofset_souris_y;
|
||||
int start_x, start_y;
|
||||
int souris_x, souris_y;
|
||||
bool CASSE;
|
||||
int OLD_ICONE;
|
||||
bool _mouseFl;
|
||||
bool _mouseLinuxFl;
|
||||
int _mouseSizeX, _mouseSizeY;
|
||||
Common::Point _mouseOffset;
|
||||
Common::Point _startPos;
|
||||
Common::Point _mousePos;
|
||||
bool _breakoutFl;
|
||||
int _oldIconId;
|
||||
int souris_n;
|
||||
int souris_bb;
|
||||
int souris_b;
|
||||
byte *pointeur_souris;
|
||||
byte *_mouseCursor;
|
||||
uint32 _gameCounter;
|
||||
uint32 lItCounter;
|
||||
uint32 _priorCounterTime;
|
||||
uint32 _priorFrameTime;
|
||||
bool ESC_KEY;
|
||||
bool NOESC;
|
||||
DIALOG_KEY GAME_KEY;
|
||||
bool _escKeyFl;
|
||||
bool _disableEscKeyFl;
|
||||
DIALOG_KEY _gameKey;
|
||||
int btsouris;
|
||||
byte *Bufferobjet;
|
||||
bool keyState[256];
|
||||
byte *_objectBuf;
|
||||
bool _keyState[256];
|
||||
public:
|
||||
EventsManager();
|
||||
~EventsManager();
|
||||
void setParent(HopkinsEngine *vm);
|
||||
|
||||
void INSTALL_SOURIS();
|
||||
void souris_on();
|
||||
void souris_xy(int xp, int yp);
|
||||
void souris_max();
|
||||
int XMOUSE();
|
||||
int YMOUSE();
|
||||
int BMOUSE();
|
||||
void MOUSE_ON();
|
||||
void MOUSE_ON1();
|
||||
void MOUSE_OFF();
|
||||
void CHANGE_MOUSE(int id);
|
||||
void setMouseOn();
|
||||
void setMouseXY(int xp, int yp);
|
||||
int getMouseX();
|
||||
int getMouseY();
|
||||
int getMouseButton();
|
||||
void mouseOn();
|
||||
void mouseOff();
|
||||
void changeMouseCursor(int id);
|
||||
|
||||
void CONTROLE_MES();
|
||||
void delay(int delay);
|
||||
|
@ -93,21 +90,6 @@ public:
|
|||
* @return Keypress, or -1 if game quit was requested
|
||||
*/
|
||||
int keywin();
|
||||
|
||||
/**
|
||||
* Unused by engine
|
||||
*/
|
||||
void videkey() { }
|
||||
|
||||
/**
|
||||
* Unused by engine
|
||||
*/
|
||||
void CASSE_SOURIS_ON() { }
|
||||
|
||||
/**
|
||||
* Unused by engine
|
||||
*/
|
||||
void CASSE_SOURIS_OFF() { }
|
||||
};
|
||||
|
||||
} // End of namespace Hopkins
|
||||
|
|
|
@ -262,7 +262,7 @@ void FontManager::BOITE(int idx, int messageId, const Common::String &filename,
|
|||
if (v17 < 0)
|
||||
v17 = -v17;
|
||||
Txt[idx].xp = 320 - v17;
|
||||
v73 = _vm->_eventsManager.start_x + 320 - v17;
|
||||
v73 = _vm->_eventsManager._startPos.x + 320 - v17;
|
||||
lineCount = 1;
|
||||
if (v64 + 1 > 0) {
|
||||
Txt[idx].lines[0] = Common::String((const char *)v60, v64);
|
||||
|
@ -351,10 +351,10 @@ LABEL_57:
|
|||
|
||||
if ((uint16)(Txt[idx].field3FC - 2) > 1u) {
|
||||
int i;
|
||||
for (i = xp - _vm->_eventsManager.start_x; _vm->_globals.largeur_boite + i > 638 && i > -2 && Txt[idx].field3FC; i -= 2)
|
||||
for (i = xp - _vm->_eventsManager._startPos.x; _vm->_globals.largeur_boite + i > 638 && i > -2 && Txt[idx].field3FC; i -= 2)
|
||||
;
|
||||
Txt[idx].xp = i;
|
||||
v73 = _vm->_eventsManager.start_x + i;
|
||||
v73 = _vm->_eventsManager._startPos.x + i;
|
||||
} else {
|
||||
if (_vm->_globals.nbrligne == (SCREEN_WIDTH - 1)) {
|
||||
while (_vm->_globals.largeur_boite + v73 > 638 && v73 > -2)
|
||||
|
@ -377,8 +377,8 @@ LABEL_57:
|
|||
if (v27 < 0)
|
||||
v27 = -v27;
|
||||
Txt[idx].xp = 315 - v27;
|
||||
int v28 = _vm->_eventsManager.start_x + 315 - v27;
|
||||
v73 = _vm->_eventsManager.start_x + 315 - v27;
|
||||
int v28 = _vm->_eventsManager._startPos.x + 315 - v27;
|
||||
v73 = _vm->_eventsManager._startPos.x + 315 - v27;
|
||||
Txt[idx].yp = 50;
|
||||
v70 = 50;
|
||||
v55 = 50;
|
||||
|
@ -500,7 +500,7 @@ void FontManager::TEXT_COMPUT(int xp, int yp, const Common::String &msg, int col
|
|||
v9 += _vm->_objectsManager.getWidth(_vm->_globals.police, v5);
|
||||
v6 = _vm->_objectsManager.getWidth(_vm->_globals.police, v5);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(v9 - v6, yp, v9, yp + 12);
|
||||
if (_vm->_eventsManager.ESC_KEY) {
|
||||
if (_vm->_eventsManager._escKeyFl) {
|
||||
_vm->_globals.iRegul = 1;
|
||||
_vm->_eventsManager.VBL();
|
||||
} else {
|
||||
|
|
|
@ -367,7 +367,7 @@ void Globals::clearAll() {
|
|||
ADR_FICHIER_OBJ = g_PTRNUL;
|
||||
NUM_FICHIER_OBJ = 0;
|
||||
Bufferdecor = g_PTRNUL;
|
||||
_vm->_eventsManager.Bufferobjet = g_PTRNUL;
|
||||
_vm->_eventsManager._objectBuf = g_PTRNUL;
|
||||
_vm->_dialogsManager._inventWin1 = g_PTRNUL;
|
||||
_vm->_dialogsManager._inventBuf2 = g_PTRNUL;
|
||||
COUCOU = g_PTRNUL;
|
||||
|
@ -418,7 +418,7 @@ void Globals::clearAll() {
|
|||
largeur_boite = 240;
|
||||
TEXTE_FORMATE = 300;
|
||||
|
||||
_vm->_eventsManager.Bufferobjet = dos_malloc2(2500);
|
||||
_vm->_eventsManager._objectBuf = dos_malloc2(2500);
|
||||
INVENTAIRE_OBJET = dos_malloc2(2500);
|
||||
|
||||
ADR_FICHIER_OBJ = g_PTRNUL;
|
||||
|
|
|
@ -193,7 +193,6 @@ void GraphicsManager::LOAD_IMAGEVGA(const Common::String &file) {
|
|||
_vm->_fileManager.constructFilename(_vm->_globals.HOPIMAGE, file);
|
||||
A_PCX320(VESA_SCREEN, _vm->_globals.NFICHIER, Palette);
|
||||
memcpy(VESA_BUFFER, VESA_SCREEN, 0xFA00u);
|
||||
_vm->_eventsManager.souris_max();
|
||||
SCANLINE(320);
|
||||
max_x = 320;
|
||||
|
||||
|
@ -230,7 +229,6 @@ void GraphicsManager::CHARGE_ECRAN(const Common::String &file) {
|
|||
Cls_Pal();
|
||||
|
||||
if (!DOUBLE_ECRAN) {
|
||||
_vm->_eventsManager.souris_max();
|
||||
SCANLINE(SCREEN_WIDTH);
|
||||
max_x = SCREEN_WIDTH;
|
||||
DD_Lock();
|
||||
|
@ -297,7 +295,7 @@ void GraphicsManager::INIT_TABLE(int minIndex, int maxIndex, byte *palette) {
|
|||
// Scroll Screen
|
||||
int GraphicsManager::SCROLL_ECRAN(int amount) {
|
||||
int result = CLIP(amount, 0, SCREEN_WIDTH);
|
||||
_vm->_eventsManager.start_x = result;
|
||||
_vm->_eventsManager._startPos.x = result;
|
||||
ofscroll = result;
|
||||
SCROLL = result;
|
||||
return result;
|
||||
|
@ -809,9 +807,9 @@ void GraphicsManager::fade_in(const byte *palette, int step, const byte *surface
|
|||
setpal_vga256(palData2);
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_VBL();
|
||||
}
|
||||
}
|
||||
|
@ -822,9 +820,9 @@ void GraphicsManager::fade_in(const byte *palette, int step, const byte *surface
|
|||
// Refresh the screen
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_VBL();
|
||||
}
|
||||
}
|
||||
|
@ -849,9 +847,9 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac
|
|||
setpal_vga256(palData);
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
DD_VBL();
|
||||
}
|
||||
|
||||
|
@ -870,9 +868,9 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac
|
|||
setpal_vga256(palData);
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
|
||||
DD_VBL();
|
||||
}
|
||||
|
@ -887,7 +885,7 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac
|
|||
|
||||
if (Winbpp == 2) {
|
||||
if (!SDL_ECHELLE) {
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
return DD_VBL();
|
||||
}
|
||||
goto LABEL_28;
|
||||
|
@ -899,12 +897,12 @@ void GraphicsManager::fade_out(const byte *palette, int step, const byte *surfac
|
|||
setpal_vga256(palData);
|
||||
if (Winbpp == 2) {
|
||||
if (!SDL_ECHELLE) {
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
return DD_VBL();
|
||||
}
|
||||
|
||||
LABEL_28:
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
return DD_VBL();
|
||||
}
|
||||
}
|
||||
|
@ -939,9 +937,9 @@ void GraphicsManager::setpal_vga256_linux(const byte *palette, const byte *surfa
|
|||
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(surface, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(surface, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
|
||||
DD_VBL();
|
||||
}
|
||||
|
@ -1547,7 +1545,7 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
|||
if (bloc.field0 != 1)
|
||||
continue;
|
||||
|
||||
if (_vm->_eventsManager.CASSE != false) {
|
||||
if (_vm->_eventsManager._breakoutFl) {
|
||||
if (Winbpp == 1) {
|
||||
Copy_Vga(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1, bloc.x1, bloc.y1);
|
||||
} else if (Winbpp == 2) {
|
||||
|
@ -1558,17 +1556,17 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
|||
dstRect.top = bloc.y1 * 2 + 30;
|
||||
dstRect.setWidth((bloc.x2 - bloc.x1) * 2);
|
||||
dstRect.setHeight((bloc.y2 - bloc.y1) * 2);
|
||||
} else if (bloc.x2 > _vm->_eventsManager.start_x && bloc.x1 < (_vm->_eventsManager.start_x + SCREEN_WIDTH)) {
|
||||
if (bloc.x1 < _vm->_eventsManager.start_x)
|
||||
bloc.x1 = _vm->_eventsManager.start_x;
|
||||
if (bloc.x2 > (_vm->_eventsManager.start_x + SCREEN_WIDTH))
|
||||
bloc.x2 = _vm->_eventsManager.start_x + SCREEN_WIDTH;
|
||||
} else if (bloc.x2 > _vm->_eventsManager._startPos.x && bloc.x1 < (_vm->_eventsManager._startPos.x + SCREEN_WIDTH)) {
|
||||
if (bloc.x1 < _vm->_eventsManager._startPos.x)
|
||||
bloc.x1 = _vm->_eventsManager._startPos.x;
|
||||
if (bloc.x2 > (_vm->_eventsManager._startPos.x + SCREEN_WIDTH))
|
||||
bloc.x2 = _vm->_eventsManager._startPos.x + SCREEN_WIDTH;
|
||||
|
||||
if (SDL_ECHELLE) {
|
||||
// Calculate the bounds
|
||||
int xp = Magic_Number(bloc.x1) - 4;
|
||||
if (xp < _vm->_eventsManager.start_x)
|
||||
xp = _vm->_eventsManager.start_x;
|
||||
if (xp < _vm->_eventsManager._startPos.x)
|
||||
xp = _vm->_eventsManager._startPos.x;
|
||||
int yp = Magic_Number(bloc.y1) - 4;
|
||||
if (yp < 0)
|
||||
yp = 0;
|
||||
|
@ -1579,7 +1577,7 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
|||
if (height < 4)
|
||||
height = 4;
|
||||
|
||||
if ((xp - _vm->_eventsManager.start_x + width) > SCREEN_WIDTH)
|
||||
if ((xp - _vm->_eventsManager._startPos.x + width) > SCREEN_WIDTH)
|
||||
xp -= 4;
|
||||
if ((height - yp) > (SCREEN_HEIGHT - 40))
|
||||
yp -= 4;
|
||||
|
@ -1589,15 +1587,15 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
|||
|
||||
if (Winbpp == 2) {
|
||||
m_scroll16A(VESA_BUFFER, xp, yp, width, height,
|
||||
Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
|
||||
Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
|
||||
} else {
|
||||
m_scroll2A(VESA_BUFFER, xp, yp, width, height,
|
||||
Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
|
||||
Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE), Reel_Zoom(yp, SDL_ECHELLE));
|
||||
}
|
||||
|
||||
DD_Unlock();
|
||||
|
||||
dstRect.left = Reel_Zoom(xp - _vm->_eventsManager.start_x, SDL_ECHELLE);
|
||||
dstRect.left = Reel_Zoom(xp - _vm->_eventsManager._startPos.x, SDL_ECHELLE);
|
||||
dstRect.top = Reel_Zoom(yp, SDL_ECHELLE);
|
||||
dstRect.setWidth(Reel_Zoom(width, SDL_ECHELLE));
|
||||
dstRect.setHeight(Reel_Zoom(height, SDL_ECHELLE));
|
||||
|
@ -1607,13 +1605,13 @@ void GraphicsManager::Affiche_Segment_Vesa() {
|
|||
|
||||
if (Winbpp == 2) {
|
||||
m_scroll16(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1,
|
||||
bloc.x1 - _vm->_eventsManager.start_x, bloc.y1);
|
||||
bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1);
|
||||
} else {
|
||||
m_scroll(VESA_BUFFER, bloc.x1, bloc.y1, bloc.x2 - bloc.x1, bloc.y2 - bloc.y1,
|
||||
bloc.x1 - _vm->_eventsManager.start_x, bloc.y1);
|
||||
bloc.x1 - _vm->_eventsManager._startPos.x, bloc.y1);
|
||||
}
|
||||
|
||||
dstRect.left = bloc.x1 - _vm->_eventsManager.start_x;
|
||||
dstRect.left = bloc.x1 - _vm->_eventsManager._startPos.x;
|
||||
dstRect.top = bloc.y1;
|
||||
dstRect.setWidth(bloc.x2 - bloc.x1);
|
||||
dstRect.setHeight(bloc.y2 - bloc.y1);
|
||||
|
@ -2373,15 +2371,15 @@ void GraphicsManager::NB_SCREEN() {
|
|||
DD_Lock();
|
||||
if (Winbpp == 2) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll16A(VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16A(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll16(VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll16(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (Winbpp == 1) {
|
||||
if (SDL_ECHELLE)
|
||||
m_scroll2A(VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll2A(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
m_scroll2(VESA_BUFFER, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
m_scroll2(VESA_BUFFER, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
DD_Unlock();
|
||||
|
||||
|
|
|
@ -68,14 +68,14 @@ Common::String HopkinsEngine::generateSaveName(int slot) {
|
|||
* Returns true if it is currently okay to restore a game
|
||||
*/
|
||||
bool HopkinsEngine::canLoadGameStateCurrently() {
|
||||
return !_globals.SORTIE && !_globals.PLAN_FLAG && _eventsManager.souris_flag;
|
||||
return !_globals.SORTIE && !_globals.PLAN_FLAG && _eventsManager._mouseFl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if it is currently okay to save the game
|
||||
*/
|
||||
bool HopkinsEngine::canSaveGameStateCurrently() {
|
||||
return !_globals.SORTIE && !_globals.PLAN_FLAG && _eventsManager.souris_flag;
|
||||
return !_globals.SORTIE && !_globals.PLAN_FLAG && _eventsManager._mouseFl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -143,7 +143,7 @@ bool HopkinsEngine::runWin95Demo() {
|
|||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
|
||||
warning("TODO Fin_Interrupt()");
|
||||
|
@ -331,10 +331,10 @@ bool HopkinsEngine::runWin95Demo() {
|
|||
else if (!_globals.FR)
|
||||
_graphicsManager.LOAD_IMAGE("ENDUK");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.MOUSE_ON();
|
||||
_eventsManager.mouseOn();
|
||||
do
|
||||
_eventsManager.VBL();
|
||||
while (_eventsManager.BMOUSE() != 1);
|
||||
while (_eventsManager.getMouseButton() != 1);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
REST_SYSTEM();
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
|||
_objectsManager.AJOUTE_OBJET(14);
|
||||
|
||||
_globals.HELICO = 0;
|
||||
_eventsManager.MOUSE_OFF();
|
||||
_eventsManager.mouseOff();
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
|
@ -478,7 +478,7 @@ bool HopkinsEngine::runLinuxDemo() {
|
|||
_eventsManager.delay(500);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
|
||||
_globals.iRegul = 0;
|
||||
|
@ -842,7 +842,7 @@ bool HopkinsEngine::runWin95full() {
|
|||
|
||||
_animationManager.playAnim("MP.ANM", 10, 16, 200);
|
||||
_graphicsManager.FADE_OUTW();
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
_graphicsManager.LOAD_IMAGE("H2");
|
||||
_graphicsManager.FADE_INW();
|
||||
|
@ -1708,7 +1708,7 @@ bool HopkinsEngine::runLinuxFull() {
|
|||
_objectsManager.AJOUTE_OBJET(14);
|
||||
|
||||
_globals.HELICO = 0;
|
||||
_eventsManager.MOUSE_OFF();
|
||||
_eventsManager.mouseOff();
|
||||
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
|
@ -1724,7 +1724,7 @@ bool HopkinsEngine::runLinuxFull() {
|
|||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("MP.ANM", 10, 16, 200);
|
||||
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
INTRORUN();
|
||||
|
||||
_globals.iRegul = 0;
|
||||
|
@ -2623,19 +2623,19 @@ void HopkinsEngine::INIT_SYSTEM() {
|
|||
_soundManager.syncSoundSettings();
|
||||
|
||||
if (getPlatform() == Common::kPlatformLinux)
|
||||
_eventsManager.mouse_linux = true;
|
||||
_eventsManager._mouseLinuxFl = true;
|
||||
else
|
||||
_eventsManager.mouse_linux = false;
|
||||
_eventsManager._mouseLinuxFl = false;
|
||||
|
||||
switch (_globals.FR) {
|
||||
case 0:
|
||||
if (!_eventsManager.mouse_linux)
|
||||
if (!_eventsManager._mouseLinuxFl)
|
||||
_fileManager.constructFilename(_globals.HOPSYSTEM, "SOUAN.SPR");
|
||||
else
|
||||
_fileManager.constructFilename(_globals.HOPSYSTEM, "LSOUAN.SPR");
|
||||
break;
|
||||
case 1:
|
||||
if (!_eventsManager.mouse_linux)
|
||||
if (!_eventsManager._mouseLinuxFl)
|
||||
_fileManager.constructFilename(_globals.HOPSYSTEM, "SOUFR.SPR");
|
||||
else
|
||||
_fileManager.constructFilename(_globals.HOPSYSTEM, "LSOUFR.SPR");
|
||||
|
@ -2645,14 +2645,14 @@ void HopkinsEngine::INIT_SYSTEM() {
|
|||
break;
|
||||
}
|
||||
|
||||
if (_eventsManager.mouse_linux) {
|
||||
_eventsManager.souris_sizex = 52;
|
||||
_eventsManager.souris_sizey = 32;
|
||||
if (_eventsManager._mouseLinuxFl) {
|
||||
_eventsManager._mouseSizeX = 52;
|
||||
_eventsManager._mouseSizeY = 32;
|
||||
} else {
|
||||
_eventsManager.souris_sizex = 34;
|
||||
_eventsManager.souris_sizey = 20;
|
||||
_eventsManager._mouseSizeX = 34;
|
||||
_eventsManager._mouseSizeY = 20;
|
||||
}
|
||||
_eventsManager.pointeur_souris = _fileManager.loadFile(_globals.NFICHIER);
|
||||
_eventsManager._mouseCursor = _fileManager.loadFile(_globals.NFICHIER);
|
||||
|
||||
_globals.clearAll();
|
||||
|
||||
|
@ -2680,15 +2680,13 @@ void HopkinsEngine::INIT_SYSTEM() {
|
|||
break;
|
||||
}
|
||||
|
||||
_eventsManager.INSTALL_SOURIS();
|
||||
_eventsManager.souris_on();
|
||||
_eventsManager.souris_flag = false;
|
||||
_eventsManager.souris_max();
|
||||
_eventsManager.setMouseOn();
|
||||
_eventsManager._mouseFl = false;
|
||||
|
||||
_globals.HOPKINS_DATA();
|
||||
|
||||
_eventsManager.ofset_souris_x = 0;
|
||||
_eventsManager.ofset_souris_y = 0;
|
||||
_eventsManager._mouseOffset.x = 0;
|
||||
_eventsManager._mouseOffset.y = 0;
|
||||
}
|
||||
|
||||
void HopkinsEngine::INTRORUN() {
|
||||
|
@ -2701,21 +2699,21 @@ void HopkinsEngine::INTRORUN() {
|
|||
|
||||
memset(&paletteData, 0, PALETTE_EXT_BLOCK_SIZE);
|
||||
_eventsManager.VBL();
|
||||
_eventsManager.souris_flag = false;
|
||||
_eventsManager._mouseFl = false;
|
||||
_globals.iRegul = 1;
|
||||
_eventsManager.VBL();
|
||||
_soundManager.WSOUND(16);
|
||||
_animationManager._clearAnimationFl = true;
|
||||
_animationManager.playAnim("J1.anm", 12, 12, 50);
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_soundManager.VOICE_MIX(1, 3);
|
||||
_animationManager.playAnim("J2.anm", 12, 12, 50);
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_soundManager.VOICE_MIX(2, 3);
|
||||
_animationManager.playAnim("J3.anm", 12, 12, 50);
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_soundManager.VOICE_MIX(3, 3);
|
||||
_graphicsManager.DD_Lock();
|
||||
_graphicsManager.Cls_Video();
|
||||
|
@ -2749,8 +2747,8 @@ void HopkinsEngine::INTRORUN() {
|
|||
v3 = true;
|
||||
}
|
||||
|
||||
if (_eventsManager.XMOUSE() < _graphicsManager.SCROLL + 10)
|
||||
_eventsManager.souris_xy(_eventsManager.souris_x + 4, _eventsManager.YMOUSE());
|
||||
if (_eventsManager.getMouseX() < _graphicsManager.SCROLL + 10)
|
||||
_eventsManager.setMouseXY(_eventsManager._mousePos.x + 4, _eventsManager.getMouseY());
|
||||
_eventsManager.VBL();
|
||||
} while (!shouldQuit() && !v3 && _graphicsManager.SCROLL != SCREEN_WIDTH);
|
||||
|
||||
|
@ -2810,7 +2808,7 @@ void HopkinsEngine::INTRORUN() {
|
|||
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.LOAD_IMAGE("intro2");
|
||||
_graphicsManager.SCROLL_ECRAN(0);
|
||||
_animationManager.loadAnim("INTRO2");
|
||||
|
@ -2834,7 +2832,7 @@ void HopkinsEngine::INTRORUN() {
|
|||
_graphicsManager.setpal_vga256_linux(paletteData2, _graphicsManager.VESA_BUFFER);
|
||||
|
||||
int v9 = 0;
|
||||
while (!shouldQuit() && !_eventsManager.ESC_KEY) {
|
||||
while (!shouldQuit() && !_eventsManager._escKeyFl) {
|
||||
if (v9 == 12) {
|
||||
_objectsManager.BOBANIM_ON(3);
|
||||
_eventsManager.VBL();
|
||||
|
@ -2906,17 +2904,17 @@ void HopkinsEngine::INTRORUN() {
|
|||
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_animationManager.playAnim("INTRO2.anm", 10, 24, 18);
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_animationManager.playAnim("INTRO3.anm", 10, 24, 200);
|
||||
if (shouldQuit())
|
||||
return;
|
||||
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_animationManager._clearAnimationFl = false;
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("J4.anm", 12, 12, 1000);
|
||||
|
@ -2931,7 +2929,7 @@ void HopkinsEngine::INTRORUN() {
|
|||
}
|
||||
}
|
||||
|
||||
_eventsManager.ESC_KEY = false;
|
||||
_eventsManager._escKeyFl = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3005,7 +3003,7 @@ void HopkinsEngine::BOOM() {
|
|||
|
||||
_globals.BPP_NOAFF = false;
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.MOUSE_OFF();
|
||||
_eventsManager.mouseOff();
|
||||
|
||||
for (int idx = 0; idx < 20; ++idx) {
|
||||
_eventsManager.VBL();
|
||||
|
@ -3035,14 +3033,14 @@ void HopkinsEngine::PUBQUIT() {
|
|||
_globals.PUBEXIT = true;
|
||||
_graphicsManager.RESET_SEGMENT_VESA();
|
||||
_globals.FORET = false;
|
||||
_eventsManager.CASSE = false;
|
||||
_eventsManager._breakoutFl = false;
|
||||
_globals._disableInventFl = true;
|
||||
_globals.FLAG_VISIBLE = false;
|
||||
_graphicsManager.LOAD_IMAGE("BOX");
|
||||
_soundManager.WSOUND(28);
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.MOUSE_ON();
|
||||
_eventsManager.CHANGE_MOUSE(0);
|
||||
_eventsManager.mouseOn();
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
_eventsManager.btsouris = 0;
|
||||
_eventsManager.souris_n = 0;
|
||||
_globals.netscape = true;
|
||||
|
@ -3056,7 +3054,7 @@ void HopkinsEngine::PUBQUIT() {
|
|||
// yp = _eventsManager.YMOUSE();
|
||||
_eventsManager.VBL();
|
||||
|
||||
if (_eventsManager.BMOUSE() == 1)
|
||||
if (_eventsManager.getMouseButton() == 1)
|
||||
mouseClicked = true;
|
||||
} while (!mouseClicked && !g_system->getEventManager()->shouldQuit());
|
||||
|
||||
|
@ -3112,60 +3110,60 @@ void HopkinsEngine::BASE() {
|
|||
_soundManager.WSOUND(25);
|
||||
if (_globals.SVGA == 1) {
|
||||
_animationManager.playAnim("base00.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base05.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base10.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base20.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base30.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base40.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base50.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC00.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC05.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC10.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC20.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("OC30.anm", 10, 18, 18);
|
||||
}
|
||||
} else if (_globals.SVGA == 2) {
|
||||
_animationManager.playAnim("base00a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base05a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base10a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base20a.anm", 10, 18, 18);
|
||||
// CHECKME: The original code was doing the opposite test, which looks like a bug.
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base30a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base40a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("base50a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC00a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC05a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC10a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("OC20a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("OC30a.anm", 10, 18, 18);
|
||||
}
|
||||
}
|
||||
|
||||
_eventsManager.ESC_KEY = false;
|
||||
_eventsManager._escKeyFl = false;
|
||||
_animationManager._clearAnimationFl = false;
|
||||
_globals.SORTIE = 85;
|
||||
}
|
||||
|
@ -3225,7 +3223,7 @@ void HopkinsEngine::JOUE_FIN() {
|
|||
_graphicsManager.LOAD_IMAGE("IM100");
|
||||
_animationManager.loadAnim("ANIM100");
|
||||
_graphicsManager.VISU_ALL();
|
||||
_eventsManager.MOUSE_ON();
|
||||
_eventsManager.mouseOn();
|
||||
_objectsManager.BOBANIM_OFF(7);
|
||||
_objectsManager.BOBANIM_OFF(8);
|
||||
_objectsManager.BOBANIM_OFF(9);
|
||||
|
@ -3233,7 +3231,7 @@ void HopkinsEngine::JOUE_FIN() {
|
|||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
|
||||
_eventsManager.CHANGE_MOUSE(0);
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
_globals.BPP_NOAFF = true;
|
||||
|
||||
for (int cpt = 0; cpt <= 4; cpt++)
|
||||
|
@ -3267,7 +3265,7 @@ void HopkinsEngine::JOUE_FIN() {
|
|||
|
||||
_globals.NOPARLE = true;
|
||||
_talkManager.PARLER_PERSO("DUELB4.PE2");
|
||||
_eventsManager.MOUSE_OFF();
|
||||
_eventsManager.mouseOff();
|
||||
_globals._disableInventFl = true;
|
||||
|
||||
do
|
||||
|
@ -3300,12 +3298,12 @@ void HopkinsEngine::JOUE_FIN() {
|
|||
_graphicsManager.FADE_INW();
|
||||
|
||||
_eventsManager.lItCounter = 0;
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
do
|
||||
_eventsManager.CONTROLE_MES();
|
||||
while (_eventsManager.lItCounter < 2000 / _globals.vitesse && !_eventsManager.ESC_KEY);
|
||||
while (_eventsManager.lItCounter < 2000 / _globals.vitesse && !_eventsManager._escKeyFl);
|
||||
}
|
||||
_eventsManager.ESC_KEY = false;
|
||||
_eventsManager._escKeyFl = false;
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_soundManager.SPECIAL_SOUND = 0;
|
||||
|
@ -3376,71 +3374,71 @@ void HopkinsEngine::AVION() {
|
|||
_animationManager._clearAnimationFl = false;
|
||||
if (_globals.SVGA == 1) {
|
||||
_animationManager.playAnim("aerop00.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop10.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop20.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop30.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop40.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop50.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop60.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop70.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans00.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans10.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans15.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans20.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans30.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans40.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("PARA00.anm", 9, 9, 9);
|
||||
}
|
||||
} else if (_globals.SVGA == 2) {
|
||||
_animationManager.playAnim("aerop00a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("serop10a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop20a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop30a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop40a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop50a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop60a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("aerop70a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans00a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans10a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans15a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans20a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans30a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY)
|
||||
if (!_eventsManager._escKeyFl)
|
||||
_animationManager.playAnim("trans40a.anm", 10, 18, 18);
|
||||
if (!_eventsManager.ESC_KEY) {
|
||||
if (!_eventsManager._escKeyFl) {
|
||||
_graphicsManager.FADE_LINUX = 2;
|
||||
_animationManager.playAnim("PARA00a.anm", 9, 9, 9);
|
||||
}
|
||||
}
|
||||
|
||||
_eventsManager.ESC_KEY = 0;
|
||||
_eventsManager._escKeyFl = false;
|
||||
_animationManager._clearAnimationFl = false;
|
||||
}
|
||||
|
||||
|
@ -3451,7 +3449,7 @@ int HopkinsEngine::PWBASE() {
|
|||
_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(251, 100, 100, 100);
|
||||
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
|
||||
_eventsManager.CHANGE_MOUSE(0);
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
_graphicsManager.FADE_INW();
|
||||
bool loopCond = false;
|
||||
int zone;
|
||||
|
@ -3459,9 +3457,9 @@ int HopkinsEngine::PWBASE() {
|
|||
if (shouldQuit())
|
||||
return 0;
|
||||
|
||||
int mouseButton = _eventsManager.BMOUSE();
|
||||
int posX = _eventsManager.XMOUSE();
|
||||
int posY = _eventsManager.YMOUSE();
|
||||
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))
|
||||
|
@ -3482,13 +3480,13 @@ int HopkinsEngine::PWBASE() {
|
|||
(posX - 106 >= 0) && (posY - 267 >= 0))
|
||||
zone = 6;
|
||||
if (zone) {
|
||||
_eventsManager.CHANGE_MOUSE(4);
|
||||
_eventsManager.changeMouseCursor(4);
|
||||
_globals.couleur_40 += 25;
|
||||
if (_globals.couleur_40 > 100)
|
||||
_globals.couleur_40 = 0;
|
||||
_graphicsManager.SETCOLOR4(251, _globals.couleur_40, _globals.couleur_40, _globals.couleur_40);
|
||||
} else {
|
||||
_eventsManager.CHANGE_MOUSE(0);
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
_graphicsManager.SETCOLOR4(251, 100, 100, 100);
|
||||
}
|
||||
_eventsManager.VBL();
|
||||
|
@ -3642,7 +3640,7 @@ void HopkinsEngine::Credits() {
|
|||
_graphicsManager.LOAD_IMAGE("GENERIC");
|
||||
_graphicsManager.FADE_INW();
|
||||
_soundManager.WSOUND(28);
|
||||
_eventsManager.souris_flag = false;
|
||||
_eventsManager._mouseFl = false;
|
||||
_globals.iRegul = 3;
|
||||
_globals.Credit_bx = _globals.Credit_bx1 = _globals.Credit_by = _globals.Credit_by1 = -1;
|
||||
int soundId = 28;
|
||||
|
@ -3692,26 +3690,26 @@ void HopkinsEngine::Credits() {
|
|||
_globals.Credit_bx1 = -1;
|
||||
_globals.Credit_by = -1;
|
||||
_globals.Credit_by1 = -1;
|
||||
} while ((_eventsManager.BMOUSE() != 1) && (!g_system->getEventManager()->shouldQuit()));
|
||||
} while ((_eventsManager.getMouseButton() != 1) && (!g_system->getEventManager()->shouldQuit()));
|
||||
_graphicsManager.FADE_OUTW();
|
||||
_globals.iRegul = 1;
|
||||
_eventsManager.souris_flag = true;
|
||||
_eventsManager._mouseFl = true;
|
||||
}
|
||||
|
||||
void HopkinsEngine::BTOCEAN() {
|
||||
_fontManager.TEXTE_OFF(9);
|
||||
if (_eventsManager.btsouris == 16) {
|
||||
_eventsManager.XMOUSE();
|
||||
_eventsManager.getMouseX();
|
||||
if (_objectsManager.NUMZONE > 0) {
|
||||
int oldPosX = _eventsManager.XMOUSE();
|
||||
int oldPosY = _eventsManager.YMOUSE();
|
||||
int oldPosX = _eventsManager.getMouseX();
|
||||
int oldPosY = _eventsManager.getMouseY();
|
||||
bool displAnim = false;
|
||||
if (_objectsManager.NUMZONE == 1) {
|
||||
if (_globals.OCEAN_SENS == 3)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,-1,", 0, 0, 6, 0);
|
||||
if (_globals.OCEAN_SENS == 1)
|
||||
else if (_globals.OCEAN_SENS == 1)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "27,26,25,24,23,22,21,20,19,18,-1,", 0, 0, 6, 0);
|
||||
if (_globals.OCEAN_SENS == 5)
|
||||
else if (_globals.OCEAN_SENS == 5)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "9,10,11,12,13,14,15,16,17,18,-1,", 0, 0, 6, 0);
|
||||
_globals.OCEAN_SENS = 7;
|
||||
_globals.SORTIE = 1;
|
||||
|
@ -3726,9 +3724,9 @@ void HopkinsEngine::BTOCEAN() {
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY)
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3741,9 +3739,9 @@ LABEL_22:
|
|||
if (_objectsManager.NUMZONE == 2) {
|
||||
if (_globals.OCEAN_SENS == 7)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0);
|
||||
if (_globals.OCEAN_SENS == 1)
|
||||
else if (_globals.OCEAN_SENS == 1)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "27,28,29,30,31,32,33,34,35,36,-1,", 0, 0, 6, 0);
|
||||
if (_globals.OCEAN_SENS == 5)
|
||||
else if (_globals.OCEAN_SENS == 5)
|
||||
_objectsManager.SPACTION(_globals.PERSO, "9,8,7,6,5,4,3,2,1,0,-1,", 0, 0, 6, 0);
|
||||
_globals.OCEAN_SENS = 3;
|
||||
_globals.SORTIE = 2;
|
||||
|
@ -3758,9 +3756,9 @@ LABEL_22:
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY)
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3783,9 +3781,9 @@ LABEL_41:
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY) {
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY) {
|
||||
displAnim = true;
|
||||
goto LABEL_57;
|
||||
}
|
||||
|
@ -3808,9 +3806,9 @@ LABEL_57:
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY) {
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY) {
|
||||
displAnim = true;
|
||||
goto LABEL_72;
|
||||
}
|
||||
|
@ -3839,9 +3837,9 @@ LABEL_72:
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY) {
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY) {
|
||||
displAnim = true;
|
||||
goto LABEL_91;
|
||||
}
|
||||
|
@ -3864,9 +3862,9 @@ LABEL_91:
|
|||
_objectsManager.SETXSPR(0, oldX);
|
||||
OCEAN_HOME();
|
||||
_eventsManager.VBL();
|
||||
if (_eventsManager.BMOUSE() == 1) {
|
||||
if (oldPosX == _eventsManager.XMOUSE()) {
|
||||
if (_eventsManager.YMOUSE() == oldPosY)
|
||||
if (_eventsManager.getMouseButton() == 1) {
|
||||
if (oldPosX == _eventsManager.getMouseX()) {
|
||||
if (_eventsManager.getMouseY() == oldPosY)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3953,8 +3951,8 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16
|
|||
_graphicsManager.SETCOLOR3(254, 0, 0, 0);
|
||||
_objectsManager.SPRITE_ON(0);
|
||||
_globals.chemin = (int16 *)g_PTRNUL;
|
||||
_eventsManager.MOUSE_ON();
|
||||
_eventsManager.CHANGE_MOUSE(4);
|
||||
_eventsManager.mouseOn();
|
||||
_eventsManager.changeMouseCursor(4);
|
||||
|
||||
for (int cpt = 0; cpt <= 4; cpt++)
|
||||
_eventsManager.VBL();
|
||||
|
@ -3966,7 +3964,7 @@ void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16
|
|||
|
||||
bool loopCond = false;
|
||||
do {
|
||||
int mouseButton = _eventsManager.BMOUSE();
|
||||
int mouseButton = _eventsManager.getMouseButton();
|
||||
if (mouseButton && mouseButton == 1)
|
||||
BTOCEAN();
|
||||
_objectsManager.VERIFZONE();
|
||||
|
@ -4007,7 +4005,7 @@ bool HopkinsEngine::ADULT() {
|
|||
_graphicsManager.min_y = 0;
|
||||
_graphicsManager.max_x = SCREEN_WIDTH;
|
||||
_graphicsManager.max_y = SCREEN_HEIGHT - 1;
|
||||
_eventsManager.CASSE = false;
|
||||
_eventsManager._breakoutFl = false;
|
||||
_globals.FORET = false;
|
||||
_globals.FLAG_VISIBLE = false;
|
||||
_globals._disableInventFl = true;
|
||||
|
@ -4015,14 +4013,14 @@ bool HopkinsEngine::ADULT() {
|
|||
|
||||
_graphicsManager.LOAD_IMAGE("ADULT");
|
||||
_graphicsManager.FADE_INW();
|
||||
_eventsManager.MOUSE_ON();
|
||||
_eventsManager.CHANGE_MOUSE(0);
|
||||
_eventsManager.mouseOn();
|
||||
_eventsManager.changeMouseCursor(0);
|
||||
_eventsManager.btsouris = false;
|
||||
_eventsManager.souris_n = false;
|
||||
|
||||
do {
|
||||
xp = _eventsManager.XMOUSE();
|
||||
yp = _eventsManager.YMOUSE();
|
||||
xp = _eventsManager.getMouseX();
|
||||
yp = _eventsManager.getMouseY();
|
||||
|
||||
buttonIndex = 0;
|
||||
if (xp >= 37 && xp <= 169 && yp >= 406 && yp <= 445)
|
||||
|
@ -4031,7 +4029,7 @@ bool HopkinsEngine::ADULT() {
|
|||
buttonIndex = 1;
|
||||
|
||||
_eventsManager.VBL();
|
||||
} while (!shouldQuit() && (buttonIndex == 0 || _eventsManager.BMOUSE() != 1));
|
||||
} while (!shouldQuit() && (buttonIndex == 0 || _eventsManager.getMouseButton() != 1));
|
||||
|
||||
_globals._disableInventFl = false;
|
||||
_globals.FLAG_VISIBLE = false;
|
||||
|
|
|
@ -58,7 +58,7 @@ int MenuManager::MENU() {
|
|||
result = 0;
|
||||
while (!g_system->getEventManager()->shouldQuit()) {
|
||||
_vm->_globals.FORET = false;
|
||||
_vm->_eventsManager.CASSE = false;
|
||||
_vm->_eventsManager._breakoutFl = false;
|
||||
_vm->_globals._disableInventFl = true;
|
||||
_vm->_globals.FLAG_VISIBLE = false;
|
||||
_vm->_globals.SORTIE = 0;
|
||||
|
@ -91,8 +91,8 @@ int MenuManager::MENU() {
|
|||
_vm->_fileManager.constructFilename(_vm->_globals.HOPSYSTEM, "MENUES.SPR");
|
||||
|
||||
spriteData = _vm->_objectsManager.CHARGE_SPRITE(_vm->_globals.NFICHIER);
|
||||
_vm->_eventsManager.MOUSE_ON();
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.mouseOn();
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
_vm->_eventsManager.btsouris = 0;
|
||||
_vm->_eventsManager.souris_n = 0;
|
||||
|
||||
|
@ -107,7 +107,7 @@ int MenuManager::MENU() {
|
|||
return -1;
|
||||
|
||||
menuIndex = MENU_NONE;
|
||||
mousePos = Common::Point(_vm->_eventsManager.XMOUSE(), _vm->_eventsManager.YMOUSE());
|
||||
mousePos = Common::Point(_vm->_eventsManager.getMouseX(), _vm->_eventsManager.getMouseY());
|
||||
|
||||
if ((uint16)(mousePos.x - 232) <= 176) {
|
||||
if ((uint16)(mousePos.y - 261) <= 23)
|
||||
|
@ -174,7 +174,7 @@ int MenuManager::MENU() {
|
|||
_vm->_graphicsManager.AFFICHE_SPEED(spriteData, 230, 386, frame5Index + 8);
|
||||
_vm->_eventsManager.VBL();
|
||||
|
||||
if (_vm->_eventsManager.BMOUSE() == 1 && menuIndex != MENU_NONE)
|
||||
if (_vm->_eventsManager.getMouseButton() == 1 && menuIndex != MENU_NONE)
|
||||
selectionMade = 1;
|
||||
} while (!selectionMade);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void ObjectsManager::setParent(HopkinsEngine *vm) {
|
|||
// Change Object
|
||||
byte *ObjectsManager::CHANGE_OBJET(int objIndex) {
|
||||
byte *result = CAPTURE_OBJET(objIndex, 1);
|
||||
_vm->_eventsManager.Bufferobjet = result;
|
||||
_vm->_eventsManager._objectBuf = result;
|
||||
_vm->_globals.Nouv_objet = 1;
|
||||
_vm->_globals.OBJET_EN_COURS = objIndex;
|
||||
return result;
|
||||
|
@ -141,8 +141,8 @@ byte *ObjectsManager::CAPTURE_OBJET(int objIndex, int mode) {
|
|||
break;
|
||||
|
||||
case 1:
|
||||
sprite_alone(_vm->_globals.ADR_FICHIER_OBJ, _vm->_eventsManager.Bufferobjet, val2);
|
||||
dataP = _vm->_eventsManager.Bufferobjet;
|
||||
sprite_alone(_vm->_globals.ADR_FICHIER_OBJ, _vm->_eventsManager._objectBuf, val2);
|
||||
dataP = _vm->_eventsManager._objectBuf;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
@ -491,32 +491,32 @@ void ObjectsManager::AFF_SPRITES() {
|
|||
}
|
||||
|
||||
if (SL_FLAG == true) {
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, SL_SPR, _vm->_eventsManager.start_x + 183, 60, 0x112u, 353);
|
||||
_vm->_graphicsManager.Restore_Mem(_vm->_graphicsManager.VESA_BUFFER, SL_SPR, _vm->_eventsManager._startPos.x + 183, 60, 0x112u, 353);
|
||||
if (SL_X && SL_Y)
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, SL_SPR2, SL_X + _vm->_eventsManager.start_x + 300, SL_Y + 300, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, SL_SPR2, SL_X + _vm->_eventsManager._startPos.x + 300, SL_Y + 300, 0);
|
||||
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager.start_x + 183, 60, _vm->_eventsManager.start_x + 457, 413);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_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.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 464, 407, 0);
|
||||
_vm->_eventsManager._startPos.x + 464, 407, 0);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 657, 556, _vm->_globals.opt_vitesse);
|
||||
_vm->_eventsManager._startPos.x + 657, 556, _vm->_globals.opt_vitesse);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 731, 495, _vm->_globals.opt_txt);
|
||||
_vm->_eventsManager._startPos.x + 731, 495, _vm->_globals.opt_txt);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 731, 468, _vm->_globals.opt_voice);
|
||||
_vm->_eventsManager._startPos.x + 731, 468, _vm->_globals.opt_voice);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 731, 441, _vm->_globals.opt_sound);
|
||||
_vm->_eventsManager._startPos.x + 731, 441, _vm->_globals.opt_sound);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 731, 414, _vm->_globals.opt_music);
|
||||
_vm->_eventsManager._startPos.x + 731, 414, _vm->_globals.opt_music);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 600, 522, _vm->_globals.opt_anm);
|
||||
_vm->_eventsManager._startPos.x + 600, 522, _vm->_globals.opt_anm);
|
||||
_vm->_graphicsManager.Sprite_Vesa(_vm->_graphicsManager.VESA_BUFFER, _vm->_globals.OPTION_SPR,
|
||||
_vm->_eventsManager.start_x + 611, 502, _vm->_globals.opt_scrspeed);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager.start_x + 164, 107, _vm->_eventsManager.start_x + 498, 320);
|
||||
_vm->_eventsManager._startPos.x + 611, 502, _vm->_globals.opt_scrspeed);
|
||||
_vm->_graphicsManager.Ajoute_Segment_Vesa(_vm->_eventsManager._startPos.x + 164, 107, _vm->_eventsManager._startPos.x + 498, 320);
|
||||
}
|
||||
|
||||
// Loop to draw any on-screen text
|
||||
|
@ -525,7 +525,7 @@ void ObjectsManager::AFF_SPRITES() {
|
|||
if ((uint16)(_vm->_fontManager.Txt[idx].field3FC - 2) > 1)
|
||||
_vm->_fontManager.BOITE(idx,
|
||||
_vm->_fontManager.Txt[idx].messageId, _vm->_fontManager.Txt[idx].filename,
|
||||
_vm->_eventsManager.start_x + _vm->_fontManager.Txt[idx].xp, _vm->_fontManager.Txt[idx].yp);
|
||||
_vm->_eventsManager._startPos.x + _vm->_fontManager.Txt[idx].xp, _vm->_fontManager.Txt[idx].yp);
|
||||
else
|
||||
_vm->_fontManager.BOITE(
|
||||
idx,
|
||||
|
@ -536,7 +536,7 @@ void ObjectsManager::AFF_SPRITES() {
|
|||
_vm->_fontManager.ListeTxt[idx].enabled = true;
|
||||
|
||||
if ((uint16)(_vm->_fontManager.Txt[idx].field3FC - 2) > 1)
|
||||
_vm->_fontManager.ListeTxt[idx].xp = _vm->_eventsManager.start_x + _vm->_fontManager.Txt[idx].xp;
|
||||
_vm->_fontManager.ListeTxt[idx].xp = _vm->_eventsManager._startPos.x + _vm->_fontManager.Txt[idx].xp;
|
||||
else
|
||||
_vm->_fontManager.ListeTxt[idx].xp = _vm->_fontManager.Txt[idx].xp;
|
||||
|
||||
|
@ -1216,7 +1216,7 @@ void ObjectsManager::AFF_BOB_ANIM() {
|
|||
if (_vm->_globals.BL_ANIM[idx].v1 == 1)
|
||||
_vm->_globals.Bob[idx].xp = _vm->_globals.BL_ANIM[idx].v2;
|
||||
if ( PERSO_ON == true && idx > 20 )
|
||||
_vm->_globals.Bob[idx].xp += _vm->_eventsManager.start_x;
|
||||
_vm->_globals.Bob[idx].xp += _vm->_eventsManager._startPos.x;
|
||||
|
||||
_vm->_globals.Bob[idx].yp = (int16)READ_LE_UINT16(v20 + 2 * v24 + 2);
|
||||
_vm->_globals.Bob[idx].field12 = (int16)READ_LE_UINT16(v20 + 2 * v24 + 4);
|
||||
|
@ -1257,7 +1257,7 @@ LABEL_38:
|
|||
if (_vm->_globals.BL_ANIM[idx].v1 == 1)
|
||||
_vm->_globals.Bob[idx].xp = _vm->_globals.BL_ANIM[idx].v2;
|
||||
if (PERSO_ON == true && idx > 20)
|
||||
_vm->_globals.Bob[idx].xp += _vm->_eventsManager.start_x;
|
||||
_vm->_globals.Bob[idx].xp += _vm->_eventsManager._startPos.x;
|
||||
|
||||
_vm->_globals.Bob[idx].yp = (int16)READ_LE_UINT16(v21 + 2);
|
||||
_vm->_globals.Bob[idx].field12 = (int16)READ_LE_UINT16(v21 + 4);
|
||||
|
@ -1630,11 +1630,11 @@ void ObjectsManager::VERIFZONE() {
|
|||
uint16 v3;
|
||||
int v4;
|
||||
|
||||
v0 = _vm->_eventsManager.XMOUSE();
|
||||
v1 = _vm->_eventsManager.YMOUSE();
|
||||
v0 = _vm->_eventsManager.getMouseX();
|
||||
v1 = _vm->_eventsManager.getMouseY();
|
||||
v2 = v1;
|
||||
if (_vm->_globals.PLAN_FLAG
|
||||
|| _vm->_eventsManager.start_x >= v0
|
||||
|| _vm->_eventsManager._startPos.x >= v0
|
||||
|| (v1 = _vm->_graphicsManager.ofscroll + 54, v0 >= v1)
|
||||
|| (v1 = v2 - 1, (uint16)(v2 - 1) > 0x3Bu)) {
|
||||
if (FLAG_VISIBLE == true)
|
||||
|
@ -1663,7 +1663,7 @@ void ObjectsManager::VERIFZONE() {
|
|||
if (_vm->_globals.old_zone_68 != v4) {
|
||||
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
if (_vm->_globals.zozo_73 == 1) {
|
||||
_vm->_fontManager.TEXTE_OFF(5);
|
||||
_vm->_globals.zozo_73 = 0;
|
||||
|
@ -1698,7 +1698,7 @@ LABEL_54:
|
|||
if (_vm->_eventsManager.btsouris == 4) {
|
||||
v1 = 5 * v4;
|
||||
if (_vm->_globals.ZONEP[v4].field6 == 2) {
|
||||
_vm->_eventsManager.CHANGE_MOUSE(16);
|
||||
_vm->_eventsManager.changeMouseCursor(16);
|
||||
_vm->_eventsManager.btsouris = 16;
|
||||
verbe = 16;
|
||||
}
|
||||
|
@ -1706,7 +1706,7 @@ LABEL_54:
|
|||
} else {
|
||||
_vm->_graphicsManager.SETCOLOR4(251, 100, 100, 100);
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
}
|
||||
}
|
||||
NUMZONE = v4;
|
||||
|
@ -1723,7 +1723,7 @@ LABEL_54:
|
|||
if ((_vm->_globals.PLAN_FLAG == true && v4 == -1) || !v4) {
|
||||
verbe = 0;
|
||||
_vm->_eventsManager.btsouris = 0;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2554,7 +2554,7 @@ void ObjectsManager::PLAN_BETA() {
|
|||
|
||||
v1 = 0;
|
||||
_vm->_dialogsManager._inventFl = false;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
_vm->_globals.Max_Propre = 1;
|
||||
_vm->_globals.Max_Ligne_Long = 1;
|
||||
_vm->_globals.Max_Propre_Gen = 1;
|
||||
|
@ -2593,9 +2593,9 @@ void ObjectsManager::PLAN_BETA() {
|
|||
_vm->_globals.PLANI = 1;
|
||||
}
|
||||
SPRITE(sprite_ptr, _vm->_globals.PLANX, _vm->_globals.PLANY, 0, _vm->_globals.PLANI, 0, 0, 5, 5);
|
||||
_vm->_eventsManager.souris_xy(_vm->_globals.PLANX, _vm->_globals.PLANY);
|
||||
_vm->_eventsManager.setMouseXY(_vm->_globals.PLANX, _vm->_globals.PLANY);
|
||||
my_anim = 0;
|
||||
_vm->_eventsManager.MOUSE_ON();
|
||||
_vm->_eventsManager.mouseOn();
|
||||
v3 = XSPR(0);
|
||||
_vm->_graphicsManager.SCROLL_ECRAN(v3 - 320);
|
||||
_vm->_graphicsManager.ofscroll = XSPR(0) - 320;
|
||||
|
@ -2616,11 +2616,11 @@ void ObjectsManager::PLAN_BETA() {
|
|||
_vm->_globals.BPP_NOAFF = false;
|
||||
_vm->_globals.iRegul = 1;
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
_vm->_graphicsManager.NOFADE = false;
|
||||
|
||||
do {
|
||||
v5 = _vm->_eventsManager.BMOUSE();
|
||||
v5 = _vm->_eventsManager.getMouseButton();
|
||||
if (v5) {
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField170] == 1 && !_vm->_globals.SAUVEGARDE->data[svField171]) {
|
||||
_vm->_globals.SAUVEGARDE->data[svField171] = 1;
|
||||
|
@ -2689,15 +2689,15 @@ void ObjectsManager::BTGAUCHE() {
|
|||
int v18;
|
||||
|
||||
_vm->_fontManager.TEXTE_OFF(9);
|
||||
destX = _vm->_eventsManager.XMOUSE();
|
||||
destY = _vm->_eventsManager.YMOUSE();
|
||||
destX = _vm->_eventsManager.getMouseX();
|
||||
destY = _vm->_eventsManager.getMouseY();
|
||||
|
||||
if (!_vm->_dialogsManager._inventFl && !_vm->_globals.PLAN_FLAG && destX > _vm->_graphicsManager.ofscroll - 30 && destX < _vm->_graphicsManager.ofscroll + 50 && (uint16)(destY + 29) <= 0x4Eu) {
|
||||
v1 = _vm->_eventsManager.btsouris;
|
||||
_vm->_dialogsManager._inventFl = true;
|
||||
_vm->_dialogsManager.showInventory();
|
||||
_vm->_dialogsManager._inventFl = false;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
if (!_vm->_globals.SORTIE) {
|
||||
_vm->_dialogsManager._inventFl = false;
|
||||
_vm->_eventsManager.btsouris = v1;
|
||||
|
@ -2862,9 +2862,7 @@ void ObjectsManager::PARADISE() {
|
|||
int v1;
|
||||
char result;
|
||||
int v3;
|
||||
uint16 v4;
|
||||
int v5;
|
||||
uint16 v6;
|
||||
|
||||
v1 = 0;
|
||||
ARRET_PERSO_FLAG = 0;
|
||||
|
@ -2875,15 +2873,15 @@ void ObjectsManager::PARADISE() {
|
|||
if (!_vm->_globals.FORET || ((uint16)(NUMZONE - 20) > 1u && (uint16)(NUMZONE - 22) > 1u)) {
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN == true) {
|
||||
_vm->_graphicsManager.no_scroll = 2;
|
||||
if (_vm->_eventsManager.start_x >= XSPR(0) - 320)
|
||||
if (_vm->_eventsManager._startPos.x >= XSPR(0) - 320)
|
||||
goto LABEL_64;
|
||||
v3 = _vm->_eventsManager.start_x + 320 - XSPR(0);
|
||||
v3 = _vm->_eventsManager._startPos.x + 320 - XSPR(0);
|
||||
if (v3 < 0)
|
||||
v3 = -v3;
|
||||
if (v3 <= 160) {
|
||||
LABEL_64:
|
||||
if (_vm->_eventsManager.start_x > XSPR(0) - 320) {
|
||||
v5 = _vm->_eventsManager.start_x + 320 - XSPR(0);
|
||||
if (_vm->_eventsManager._startPos.x > XSPR(0) - 320) {
|
||||
v5 = _vm->_eventsManager._startPos.x + 320 - XSPR(0);
|
||||
if (v5 < 0)
|
||||
v5 = -v5;
|
||||
if (v5 > 160) {
|
||||
|
@ -2898,12 +2896,11 @@ LABEL_64:
|
|||
_vm->_graphicsManager.SCROLL = SCREEN_WIDTH;
|
||||
v1 = 1;
|
||||
}
|
||||
if (_vm->_eventsManager.XMOUSE() > _vm->_graphicsManager.SCROLL + 620) {
|
||||
v6 = _vm->_eventsManager.YMOUSE();
|
||||
_vm->_eventsManager.souris_xy(_vm->_eventsManager.souris_x - 4, v6);
|
||||
}
|
||||
if (_vm->_eventsManager.getMouseX() > _vm->_graphicsManager.SCROLL + 620)
|
||||
_vm->_eventsManager.setMouseXY(_vm->_eventsManager._mousePos.x - 4, _vm->_eventsManager.getMouseY());
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (v1 != 1 && _vm->_eventsManager.start_x > XSPR(0) - 320);
|
||||
} while (v1 != 1 && _vm->_eventsManager._startPos.x > XSPR(0) - 320);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -2917,17 +2914,16 @@ LABEL_64:
|
|||
_vm->_graphicsManager.SCROLL = SCREEN_WIDTH;
|
||||
v1 = 1;
|
||||
}
|
||||
if (_vm->_eventsManager.XMOUSE() < _vm->_graphicsManager.SCROLL + 10) {
|
||||
v4 = _vm->_eventsManager.YMOUSE();
|
||||
_vm->_eventsManager.souris_xy(_vm->_eventsManager.souris_x + 4, v4);
|
||||
}
|
||||
if (_vm->_eventsManager.getMouseX() < _vm->_graphicsManager.SCROLL + 10)
|
||||
_vm->_eventsManager.setMouseXY(_vm->_eventsManager._mousePos.x + 4, _vm->_eventsManager.getMouseY());
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
} while (v1 != 1 && _vm->_eventsManager.start_x < XSPR(0) - 320);
|
||||
} while (v1 != 1 && _vm->_eventsManager._startPos.x < XSPR(0) - 320);
|
||||
}
|
||||
if (_vm->_eventsManager.XMOUSE() > _vm->_graphicsManager.SCROLL + 620)
|
||||
_vm->_eventsManager.souris_xy(_vm->_graphicsManager.SCROLL + 610, 0);
|
||||
if (_vm->_eventsManager.XMOUSE() < _vm->_graphicsManager.SCROLL + 10)
|
||||
_vm->_eventsManager.souris_xy(_vm->_graphicsManager.SCROLL + 10, 0);
|
||||
if (_vm->_eventsManager.getMouseX() > _vm->_graphicsManager.SCROLL + 620)
|
||||
_vm->_eventsManager.setMouseXY(_vm->_graphicsManager.SCROLL + 610, 0);
|
||||
if (_vm->_eventsManager.getMouseX() < _vm->_graphicsManager.SCROLL + 10)
|
||||
_vm->_eventsManager.setMouseXY(_vm->_graphicsManager.SCROLL + 10, 0);
|
||||
_vm->_eventsManager.VBL();
|
||||
_vm->_graphicsManager.no_scroll = 0;
|
||||
}
|
||||
|
@ -2935,7 +2931,7 @@ LABEL_64:
|
|||
} else {
|
||||
_vm->_talkManager.REPONSE2(_vm->_globals.SAUVEGARDE->data[svField2], _vm->_globals.SAUVEGARDE->data[svField1]);
|
||||
}
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
if ((uint16)(NUMZONE + 1) > 1u && !_vm->_globals.ZONEP[NUMZONE].field16) {
|
||||
NUMZONE = -1;
|
||||
FORCEZONE = 1;
|
||||
|
@ -2953,14 +2949,14 @@ LABEL_64:
|
|||
_vm->_eventsManager.btsouris = 4;
|
||||
}
|
||||
if (_vm->_eventsManager.btsouris != 23)
|
||||
_vm->_eventsManager.CHANGE_MOUSE(_vm->_eventsManager.btsouris);
|
||||
_vm->_eventsManager.changeMouseCursor(_vm->_eventsManager.btsouris);
|
||||
NUMZONE = 0;
|
||||
_vm->_globals.SAUVEGARDE->data[svField1] = 0;
|
||||
_vm->_globals.SAUVEGARDE->data[svField2] = 0;
|
||||
}
|
||||
if (_vm->_globals.PLAN_FLAG == true) {
|
||||
_vm->_eventsManager.btsouris = 0;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
}
|
||||
if (_vm->_globals.NOMARCHE == true) {
|
||||
if (_vm->_eventsManager.btsouris == 4) {
|
||||
|
@ -3011,7 +3007,7 @@ void ObjectsManager::CLEAR_ECRAN() {
|
|||
_vm->_globals.COUCOU = _vm->_globals.LIBERE_FICHIER(_vm->_globals.COUCOU);
|
||||
if (g_PTRNUL != _vm->_globals.SPRITE_ECRAN)
|
||||
_vm->_globals.SPRITE_ECRAN = _vm->_globals.LIBERE_FICHIER(_vm->_globals.SPRITE_ECRAN);
|
||||
_vm->_eventsManager.start_x = 0;
|
||||
_vm->_eventsManager._startPos.x = 0;
|
||||
_vm->_eventsManager.souris_n = 0;
|
||||
Vold_taille = 200;
|
||||
_vm->_globals.SAUVEGARDE->data[svField1] = 0;
|
||||
|
@ -3820,7 +3816,7 @@ void ObjectsManager::BTDROITE() {
|
|||
if ((uint16)(NUMZONE + 1) > 1u) {
|
||||
VERBEPLUS();
|
||||
if (_vm->_eventsManager.btsouris != 23)
|
||||
_vm->_eventsManager.CHANGE_MOUSE(_vm->_eventsManager.btsouris);
|
||||
_vm->_eventsManager.changeMouseCursor(_vm->_eventsManager.btsouris);
|
||||
verbe = _vm->_eventsManager.btsouris;
|
||||
}
|
||||
}
|
||||
|
@ -3853,9 +3849,9 @@ int ObjectsManager::MZONE() {
|
|||
v18 = 0;
|
||||
v17 = 0;
|
||||
v16 = 0;
|
||||
xp = _vm->_eventsManager.souris_x + _vm->_eventsManager.ofset_souris_x;
|
||||
yp = _vm->_eventsManager.souris_y + _vm->_eventsManager.ofset_souris_y;
|
||||
if ((_vm->_eventsManager.souris_y + _vm->_eventsManager.ofset_souris_y) > 19) {
|
||||
xp = _vm->_eventsManager._mousePos.x + _vm->_eventsManager._mouseOffset.x;
|
||||
yp = _vm->_eventsManager._mousePos.y + _vm->_eventsManager._mouseOffset.y;
|
||||
if ((_vm->_eventsManager._mousePos.y + _vm->_eventsManager._mouseOffset.y) > 19) {
|
||||
v1 = 0;
|
||||
do {
|
||||
v2 = _vm->_globals.BOBZONE[v1];
|
||||
|
@ -4022,9 +4018,9 @@ void ObjectsManager::PARAMCADRE(int a1) {
|
|||
cadi = 0;
|
||||
}
|
||||
if (_vm->_eventsManager.btsouris != 23)
|
||||
_vm->_eventsManager.CHANGE_MOUSE(_vm->_eventsManager.btsouris);
|
||||
_vm->_eventsManager.XMOUSE();
|
||||
_vm->_eventsManager.YMOUSE();
|
||||
_vm->_eventsManager.changeMouseCursor(_vm->_eventsManager.btsouris);
|
||||
_vm->_eventsManager.getMouseX();
|
||||
_vm->_eventsManager.getMouseY();
|
||||
}
|
||||
|
||||
void ObjectsManager::OBJETPLUS(int idx) {
|
||||
|
@ -4227,15 +4223,15 @@ void ObjectsManager::SPECIAL_JEU() {
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
v2 = _vm->_graphicsManager.VESA_BUFFER;
|
||||
|
@ -5505,7 +5501,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
|||
|
||||
v5 = 0;
|
||||
_vm->_dialogsManager._inventFl = false;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
_vm->_dialogsManager._removeInventFl = false;
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
_vm->_globals.PLAN_FLAG = false;
|
||||
|
@ -5529,7 +5525,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
|||
if (!s4.empty() && _vm->_globals.NOSPRECRAN)
|
||||
_vm->_graphicsManager.INI_ECRAN2(s4);
|
||||
}
|
||||
_vm->_eventsManager.MOUSE_ON();
|
||||
_vm->_eventsManager.mouseOn();
|
||||
if (_vm->_globals.ECRAN == 61) {
|
||||
SPRITE(_vm->_globals.PERSO, 330, 418, 0, 60, 0, 0, 34, 190);
|
||||
SPRITE_ON(0);
|
||||
|
@ -5540,7 +5536,7 @@ 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.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
_vm->_globals.BPP_NOAFF = true;
|
||||
v6 = 0;
|
||||
do {
|
||||
|
@ -5568,7 +5564,7 @@ void ObjectsManager::PERSONAGE(const Common::String &backgroundFile, const Commo
|
|||
SETANISPR(0, 64);
|
||||
}
|
||||
do {
|
||||
v9 = _vm->_eventsManager.BMOUSE();
|
||||
v9 = _vm->_eventsManager.getMouseButton();
|
||||
if (v9 == 1) {
|
||||
BTGAUCHE();
|
||||
v9 = 1;
|
||||
|
@ -5605,7 +5601,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
|||
int xp, yp;
|
||||
|
||||
_vm->_dialogsManager._inventFl = false;
|
||||
_vm->_eventsManager.GAME_KEY = KEY_NONE;
|
||||
_vm->_eventsManager._gameKey = KEY_NONE;
|
||||
verbe = 4;
|
||||
_vm->_globals.MAX_COMPTE = 6;
|
||||
_vm->_graphicsManager.ofscroll = 0;
|
||||
|
@ -5633,7 +5629,7 @@ void ObjectsManager::PERSONAGE2(const Common::String &backgroundFile, const Comm
|
|||
if (!s4.empty() && _vm->_globals.NOSPRECRAN)
|
||||
_vm->_graphicsManager.INI_ECRAN2(s4);
|
||||
}
|
||||
_vm->_eventsManager.MOUSE_ON();
|
||||
_vm->_eventsManager.mouseOn();
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_graphicsManager.SETCOLOR3(252, 100, 100, 100);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
|
@ -5666,7 +5662,7 @@ LABEL_70:
|
|||
SPRITE(_vm->_globals.PERSO, PERX, PERY, 0, PERI, 0, 0, 28, 155);
|
||||
if (_vm->_globals.PERSO_TYPE == 2)
|
||||
SPRITE(_vm->_globals.PERSO, PERX, PERY, 0, PERI, 0, 0, 20, 127);
|
||||
_vm->_eventsManager.souris_xy(PERX, PERY);
|
||||
_vm->_eventsManager.setMouseXY(PERX, PERY);
|
||||
if (_vm->_graphicsManager.DOUBLE_ECRAN == true)
|
||||
_vm->_graphicsManager.SCROLL = (int16)XSPR(0) - 320;
|
||||
VERIFTAILLE();
|
||||
|
@ -5691,19 +5687,19 @@ LABEL_70:
|
|||
if (!_vm->_graphicsManager.NOFADE)
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
_vm->_graphicsManager.NOFADE = false;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
|
||||
int xCheck = 0;
|
||||
int yCheck = 0;
|
||||
|
||||
breakFlag = false;
|
||||
while (!_vm->shouldQuit() && !breakFlag) {
|
||||
mouseButtons = _vm->_eventsManager.BMOUSE();
|
||||
mouseButtons = _vm->_eventsManager.getMouseButton();
|
||||
if (mouseButtons) {
|
||||
if (mouseButtons == 1) {
|
||||
if (verbe == 16 && _vm->_eventsManager.btsouris == 16) {
|
||||
xp = _vm->_eventsManager.XMOUSE();
|
||||
yp = _vm->_eventsManager.YMOUSE();
|
||||
xp = _vm->_eventsManager.getMouseX();
|
||||
yp = _vm->_eventsManager.getMouseY();
|
||||
|
||||
if (xCheck == xp) {
|
||||
if (yCheck == yp) {
|
||||
|
|
|
@ -229,7 +229,7 @@ void SaveLoadManager::createThumbnail(Graphics::Surface *s) {
|
|||
thumb8.create(w, h, Graphics::PixelFormat::createFormatCLUT8());
|
||||
|
||||
_vm->_graphicsManager.Reduc_Ecran(_vm->_graphicsManager.VESA_BUFFER, (byte *)thumb8.pixels,
|
||||
_vm->_eventsManager.start_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));
|
||||
|
|
|
@ -719,7 +719,7 @@ LABEL_1141:
|
|||
_vm->_eventsManager.VBL();
|
||||
}
|
||||
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
do {
|
||||
if (_vm->shouldQuit())
|
||||
|
@ -738,7 +738,7 @@ LABEL_1141:
|
|||
_vm->_soundManager.SPECIAL_SOUND = 0;
|
||||
}
|
||||
_vm->_animationManager.loadAnim("ASCEN");
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.LOAD_IMAGE("ASCEN");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
|
||||
|
@ -749,7 +749,7 @@ LABEL_1141:
|
|||
_vm->_eventsManager.VBL();
|
||||
}
|
||||
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_INW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
_vm->_objectsManager.SCI_OPTI_ONE(1, 0, 17, 3);
|
||||
_vm->_graphicsManager.FADE_OUTW_LINUX(_vm->_graphicsManager.VESA_BUFFER);
|
||||
|
@ -1524,9 +1524,9 @@ LABEL_1141:
|
|||
_vm->_globals._disableInventFl = true;
|
||||
if (_vm->_globals.SAUVEGARDE->data[svField6] != _vm->_globals.SAUVEGARDE->data[svField401]) {
|
||||
_vm->_soundManager.SPECIAL_SOUND = 208;
|
||||
_vm->_eventsManager.NOESC = true;
|
||||
_vm->_eventsManager._disableEscKeyFl = true;
|
||||
_vm->_animationManager.playSequence("SORT.SEQ", 10, 4, 10);
|
||||
_vm->_eventsManager.NOESC = false;
|
||||
_vm->_eventsManager._disableEscKeyFl = false;
|
||||
_vm->_soundManager.SPECIAL_SOUND = 0;
|
||||
}
|
||||
_vm->_globals.NOT_VERIF = 1;
|
||||
|
@ -1999,7 +1999,7 @@ LABEL_1141:
|
|||
_vm->_graphicsManager.LOAD_IMAGE("IM20f");
|
||||
_vm->_animationManager.loadAnim("ANIM20f");
|
||||
_vm->_graphicsManager.VISU_ALL();
|
||||
_vm->_eventsManager.MOUSE_OFF();
|
||||
_vm->_eventsManager.mouseOff();
|
||||
_vm->_graphicsManager.FADE_INW();
|
||||
bool v52 = false;
|
||||
_vm->_soundManager.LOAD_WAV("SOUND46.WAV", 1);
|
||||
|
|
|
@ -613,10 +613,10 @@ bool SoundManager::VOICE_MIX(int voiceId, int voiceMode) {
|
|||
do {
|
||||
if (SPECIAL_SOUND != 4 && !VBL_MERDE)
|
||||
_vm->_eventsManager.VBL();
|
||||
if (_vm->_eventsManager.BMOUSE())
|
||||
if (_vm->_eventsManager.getMouseButton())
|
||||
break;
|
||||
_vm->_eventsManager.CONTROLE_MES();
|
||||
if (_vm->_eventsManager.ESC_KEY)
|
||||
if (_vm->_eventsManager._escKeyFl)
|
||||
break;
|
||||
if (!VOICE_STAT(2))
|
||||
breakFlag = true;
|
||||
|
@ -626,7 +626,7 @@ bool SoundManager::VOICE_MIX(int voiceId, int voiceMode) {
|
|||
STOP_VOICE(2);
|
||||
DEL_SAMPLE_SDL(20);
|
||||
MUSICVOL = oldMusicVol;
|
||||
_vm->_eventsManager.ESC_KEY = false;
|
||||
_vm->_eventsManager._escKeyFl = false;
|
||||
VBL_MERDE = 0;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
|||
PLIGNE4 = v2 + 3;
|
||||
v14 = _vm->_eventsManager.btsouris;
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
if (!_vm->_globals.NOPARLE) {
|
||||
v4 = v2 + 3;
|
||||
do {
|
||||
|
@ -154,7 +154,7 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
|||
_vm->_objectsManager.PERSO_ON = false;
|
||||
_vm->_eventsManager.btsouris = v14;
|
||||
|
||||
_vm->_eventsManager.CHANGE_MOUSE(v14);
|
||||
_vm->_eventsManager.changeMouseCursor(v14);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
|
||||
if (_vm->getIsDemo() == false)
|
||||
|
@ -165,15 +165,15 @@ void TalkManager::PARLER_PERSO(const Common::String &filename) {
|
|||
_vm->_graphicsManager.DD_LOCK();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
_vm->_graphicsManager.DD_UNLOCK();
|
||||
v8 = _vm->_graphicsManager.VESA_BUFFER;
|
||||
|
@ -236,7 +236,7 @@ void TalkManager::PARLER_PERSO2(const Common::String &filename) {
|
|||
PLIGNE4 = v1 + 3;
|
||||
int v8 = _vm->_eventsManager.btsouris;
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
|
||||
if (!_vm->_globals.NOPARLE) {
|
||||
int v2 = v1 + 3;
|
||||
|
@ -261,7 +261,7 @@ void TalkManager::PARLER_PERSO2(const Common::String &filename) {
|
|||
BUFFERPERSO = _vm->_globals.LIBERE_FICHIER(BUFFERPERSO);
|
||||
_vm->_eventsManager.btsouris = v8;
|
||||
|
||||
_vm->_eventsManager.CHANGE_MOUSE(v8);
|
||||
_vm->_eventsManager.changeMouseCursor(v8);
|
||||
_vm->_graphicsManager.INIT_TABLE(145, 150, _vm->_graphicsManager.Palette);
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
_vm->_objectsManager.DESACTIVE_CURSOR = 0;
|
||||
|
@ -332,7 +332,7 @@ int TalkManager::DIALOGUE() {
|
|||
v5 = -1;
|
||||
v6 = 0;
|
||||
do {
|
||||
v7 = _vm->_eventsManager.YMOUSE();
|
||||
v7 = _vm->_eventsManager.getMouseY();
|
||||
if ((v4 - 20 * v19) < v7 && (v4 - 1) > v7) {
|
||||
v8 = v7;
|
||||
_vm->_fontManager.OPTI_COUL_TXT(6, 7, 8, 5);
|
||||
|
@ -357,7 +357,7 @@ int TalkManager::DIALOGUE() {
|
|||
}
|
||||
|
||||
_vm->_eventsManager.VBL();
|
||||
if (_vm->_eventsManager.BMOUSE())
|
||||
if (_vm->_eventsManager.getMouseButton())
|
||||
v6 = 1;
|
||||
if (v5 == -1)
|
||||
v6 = 0;
|
||||
|
@ -492,7 +492,7 @@ int TalkManager::DIALOGUE_REP(int idx) {
|
|||
++v14;
|
||||
if ( _vm->_eventsManager.souris_b || _vm->_eventsManager.souris_bb )
|
||||
v14 = v6;
|
||||
if (_vm->_eventsManager.BMOUSE()) {
|
||||
if (_vm->_eventsManager.getMouseButton()) {
|
||||
i = 5;
|
||||
tmpVal = v6 / 5;
|
||||
if (tmpVal < 0)
|
||||
|
@ -807,7 +807,7 @@ void TalkManager::CHERCHE_ANIM0(int a1, int a2) {
|
|||
do {
|
||||
v7 = (int16)READ_LE_UINT16(&v8[2 * v6 + 4]);
|
||||
if (v7 && _vm->_globals.vitesse != 501)
|
||||
_vm->_graphicsManager.AFFICHE_SPEED(PERSOSPR, _vm->_eventsManager.start_x + (int16)READ_LE_UINT16(&v8[2 * v6]),
|
||||
_vm->_graphicsManager.AFFICHE_SPEED(PERSOSPR, _vm->_eventsManager._startPos.x + (int16)READ_LE_UINT16(&v8[2 * v6]),
|
||||
(int16)READ_LE_UINT16(&v8[2 * v6 + 2]), v9[2 * v6 + 8]);
|
||||
v6 += 5;
|
||||
} while (_vm->_globals.vitesse != 501 && v7);
|
||||
|
@ -1218,7 +1218,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
|||
while (v2 <= 44);
|
||||
_vm->_objectsManager.NUMZONE = -1;
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(0);
|
||||
_vm->_eventsManager.changeMouseCursor(0);
|
||||
BUFFERPERSO = _vm->_fileManager.searchCat(a2, 5);
|
||||
TAILLEPERSO = _vm->_globals.CAT_TAILLE;
|
||||
if (BUFFERPERSO == g_PTRNUL) {
|
||||
|
@ -1277,7 +1277,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
|||
_vm->_objectsManager.FORCEZONE = 1;
|
||||
_vm->_objectsManager.NUMZONE = -1;
|
||||
do {
|
||||
v12 = _vm->_eventsManager.BMOUSE();
|
||||
v12 = _vm->_eventsManager.getMouseButton();
|
||||
if (v12 == 1) {
|
||||
_vm->_objectsManager.BTGAUCHE();
|
||||
v12 = 1;
|
||||
|
@ -1321,7 +1321,7 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
|||
|
||||
_vm->_objectsManager.PERSO_ON = false;
|
||||
_vm->_eventsManager.btsouris = 4;
|
||||
_vm->_eventsManager.CHANGE_MOUSE(4);
|
||||
_vm->_eventsManager.changeMouseCursor(4);
|
||||
_vm->_graphicsManager.SETCOLOR3(253, 100, 100, 100);
|
||||
|
||||
if (!_vm->getIsDemo())
|
||||
|
@ -1332,15 +1332,15 @@ void TalkManager::OBJET_VIVANT(const Common::String &a2) {
|
|||
_vm->_graphicsManager.DD_Lock();
|
||||
if (_vm->_graphicsManager.Winbpp == 2) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll16(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
if (_vm->_graphicsManager.Winbpp == 1) {
|
||||
if (_vm->_graphicsManager.SDL_ECHELLE)
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2A(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
else
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager.start_x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
_vm->_graphicsManager.m_scroll2(_vm->_graphicsManager.VESA_SCREEN, _vm->_eventsManager._startPos.x, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0);
|
||||
}
|
||||
_vm->_graphicsManager.DD_Unlock();
|
||||
_vm->_graphicsManager.setpal_vga256(_vm->_graphicsManager.Palette);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue