diff options
-rw-r--r-- | engines/cine/various.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 7f9c13b147..1998f4264b 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -885,13 +885,12 @@ uint16 executePlayerInput() { if (!(mouseButton & kRightMouseButton)) { // Right mouse button is up // A player command is given, left mouse button is down, right mouse button is up int16 si; - do { + while (mouseButton && !g_cine->shouldQuit()) { manageEvents(); getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16); - } while (mouseButton && !g_cine->shouldQuit()); + } - si = getObjectUnderCursor(mouseX, - mouseY); + si = getObjectUnderCursor(mouseX, mouseY); if (si != -1) { commandVar3[commandVar1] = si; @@ -900,7 +899,6 @@ uint16 executePlayerInput() { commandBuffer += " "; commandBuffer += objectTable[si].name; - isDrawCommandEnabled = 1; if (choiceResultTable[playerCommand] == commandVar1) { @@ -922,11 +920,27 @@ uint16 executePlayerInput() { commandVar1 = 0; commandBuffer = ""; - renderer->setCommand(commandBuffer); + } else if (g_cine->getGameType() == Cine::GType_OS) { + isDrawCommandEnabled = 1; + commandBuffer += commandPrepositionTable[playerCommand]; } + + renderer->setCommand(commandBuffer); } else { globalVars[VAR_MOUSE_X_POS] = mouseX; + if (!mouseX) { + globalVars[VAR_MOUSE_X_POS]++; + } + globalVars[VAR_MOUSE_Y_POS] = mouseY; + + if (g_cine->getGameType() == Cine::GType_OS) { + if (!mouseY) { + globalVars[VAR_MOUSE_Y_POS]++; + } + globalVars[VAR_MOUSE_X_POS_2ND] = globalVars[VAR_MOUSE_X_POS]; + globalVars[VAR_MOUSE_Y_POS_2ND] = globalVars[VAR_MOUSE_X_POS]; + } } } } else if (!(mouseButton & kRightMouseButton)) { // Right mouse button is up |