aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-20 21:02:58 -0400
committerPaul Gilbert2015-05-20 21:02:58 -0400
commit6a8e3173555c7a34749bcf4b905dec20178bbf5f (patch)
treef08fb3c5a723c9ab2998f719c04e84a7b0c1ee7f /engines/sherlock
parenta57f569244b9d402e689de5e5f488da935bc4bed (diff)
downloadscummvm-rg350-6a8e3173555c7a34749bcf4b905dec20178bbf5f.tar.gz
scummvm-rg350-6a8e3173555c7a34749bcf4b905dec20178bbf5f.tar.bz2
scummvm-rg350-6a8e3173555c7a34749bcf4b905dec20178bbf5f.zip
SHERLOCK: Constants fixes in UserInterface
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/user_interface.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index 92fc89305e..4781f4811b 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -682,6 +682,7 @@ void UserInterface::doEnvControl() {
Talk &talk = *_vm->_talk;
Common::Point mousePos = events.mousePos();
static const char ENV_COMMANDS[7] = "ELSUDQ";
+
byte color;
_key = _oldKey = -1;
@@ -710,7 +711,7 @@ void UserInterface::doEnvControl() {
// Handle selecting buttons, if any
saves.highlightButtons(found);
- if (found == 0 || found == ONSCREEN_FILES_COUNT)
+ if (found == 0 || found == 5)
saves._envMode = SAVEMODE_NONE;
}
@@ -869,7 +870,7 @@ void UserInterface::doEnvControl() {
moreKeys = _key == 'D';
}
} while (saves._savegameIndex < (MAX_SAVEGAME_SLOTS - ONSCREEN_FILES_COUNT) && moreKeys);
- } else if ((found == ONSCREEN_FILES_COUNT && events._released) || _key == 'Q') {
+ } else if ((found == 5 && events._released) || _key == 'Q') {
clearWindow();
screen.print(Common::Point(0, CONTROLS_Y + 20), INV_FOREGROUND, "Are you sure you wish to Quit ?");
screen.vgaBar(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y + 10), BORDER_COLOR);
@@ -1867,7 +1868,7 @@ void UserInterface::printObjectDesc(const Common::String &str, bool firstTime) {
// Loop through displaying up to five lines
bool endOfStr = false;
const char *msgP = str.c_str();
- for (int lineNum = 0; lineNum < 5 && !endOfStr; ++lineNum) {
+ for (int lineNum = 0; lineNum < ONSCREEN_FILES_COUNT && !endOfStr; ++lineNum) {
int width = 0;
const char *lineStartP = msgP;