diff options
author | Paul Gilbert | 2015-05-19 08:01:06 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-19 08:01:06 -0400 |
commit | fa35249a240d7bdfe5f5b7eb9ae073126d5080c4 (patch) | |
tree | e9243f68d9fcd25accbbf3cad3b8387e8e038fc9 | |
parent | dac49ddab496b9e5ca0f6589ea7b5ad906faa464 (diff) | |
download | scummvm-rg350-fa35249a240d7bdfe5f5b7eb9ae073126d5080c4.tar.gz scummvm-rg350-fa35249a240d7bdfe5f5b7eb9ae073126d5080c4.tar.bz2 scummvm-rg350-fa35249a240d7bdfe5f5b7eb9ae073126d5080c4.zip |
SHERLOCK: More syntactic fixes
-rw-r--r-- | engines/sherlock/journal.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/saveload.cpp | 6 | ||||
-rw-r--r-- | engines/sherlock/saveload.h | 2 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 17 | ||||
-rw-r--r-- | engines/sherlock/user_interface.cpp | 4 |
5 files changed, 17 insertions, 16 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 0a0144996d..7afa60d396 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -1121,8 +1121,8 @@ int Journal::getSearchString(bool printError) { } else if (keyState.keycode == Common::KEYCODE_ESCAPE) { screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE); done = -1; - } else if (keyState.ascii >= ' ' && keyState.keycode <= 'z' && keyState.keycode != Common::KEYCODE_AT && - name.size() < JOURNAL_SEACRH_MAX_CHARS && (xp + screen.charWidth(keyState.keycode)) < JOURNAL_SEARCH_RIGHT) { + } else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && keyState.keycode != Common::KEYCODE_AT && + name.size() < JOURNAL_SEACRH_MAX_CHARS && (xp + screen.charWidth(keyState.ascii)) < JOURNAL_SEARCH_RIGHT) { char ch = toupper(keyState.ascii); screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE); screen.print(Common::Point(xp, yp), TALK_FOREGROUND, "%c", ch); diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp index 053c52c4e5..63d3142262 100644 --- a/engines/sherlock/saveload.cpp +++ b/engines/sherlock/saveload.cpp @@ -385,7 +385,7 @@ bool SaveManager::checkGameOnScreen(int slot) { return false; } -bool SaveManager::getFilename(int slot) { +bool SaveManager::promptForFilename(int slot) { Events &events = *_vm->_events; Scene &scene = *_vm->_scene; Screen &screen = *_vm->_screen; @@ -455,8 +455,8 @@ bool SaveManager::getFilename(int slot) { done = -1; } - if (keyState.keycode >= ' ' && keyState.keycode <= 'z' && saveName.size() < 50 - && (xp + screen.charWidth(keyState.keycode)) < 308) { + if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && saveName.size() < 50 + && (xp + screen.charWidth(keyState.ascii)) < 308) { char c = (char)keyState.ascii; screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_BACKGROUND); diff --git a/engines/sherlock/saveload.h b/engines/sherlock/saveload.h index 371a6e4c79..07626a2082 100644 --- a/engines/sherlock/saveload.h +++ b/engines/sherlock/saveload.h @@ -133,7 +133,7 @@ public: /** * Prompts the user to enter a filename in a given slot */ - bool getFilename(int slot); + bool promptForFilename(int slot); }; } // End of namespace Sherlock diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index 170768d91d..1f83ca4872 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -63,24 +63,25 @@ static const int TITLE_FRAMES[7][9] = { }; #define NUM_PLACES 100 -const int MAP_X[NUM_PLACES] = { + +static const int MAP_X[NUM_PLACES] = { 0, 368, 0, 219, 0, 282, 0, 43, 0, 0, 396, 408, 0, 0, 0, 568, 37, 325, 28, 0, 263, 36, 148, 469, 342, 143, 443, 229, 298, 0, 157, 260, 432, 174, 0, 351, 0, 528, 0, 136, 0, 0, 0, 555, 165, 0, 506, 0, 0, 344, 0, 0 }; -const int MAP_Y[NUM_PLACES] = { +static const int MAP_Y[NUM_PLACES] = { 0, 147, 0, 166, 0, 109, 0, 61, 0, 0, 264, 70, 0, 0, 0, 266, 341, 30, 275, 0, 294, 146, 311, 230, 184, 268, 133, 94, 207, 0, 142, 142, 330, 255, 0, 37, 0, 70, 0, 116, 0, 0, 0, 50, 21, 0, 303, 0, 0, 229, 0, 0 }; -const int MAP_TRANSLATE[NUM_PLACES] = { +static const int MAP_TRANSLATE[NUM_PLACES] = { 0, 0, 0, 1, 0, 2, 0, 3, 4, 0, 4, 6, 0, 0, 0, 8, 9, 10, 11, 0, 12, 13, 14, 7, 15, 16, 17, 18, 19, 0, 20, 21, 22, 23, 0, 24, 0, 25, 0, 26, 0, 0, 0, 27, 28, 0, 29, 0, 0, 30, 0 }; -const byte MAP_SEQUENCES[3][MAX_FRAME] = { +static const byte MAP_SEQUENCES[3][MAX_FRAME] = { { 1, 1, 2, 3, 4, 0 }, // Overview Still { 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0 }, { 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0 } @@ -88,7 +89,7 @@ const byte MAP_SEQUENCES[3][MAX_FRAME] = { #define MAX_PEOPLE 66 -const byte STILL_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = { +static const byte STILL_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = { { 1, 0, 0 }, // Sherlock Holmes { 6, 0, 0 }, // Dr. Watson { 4, 0, 0 }, // Inspector Lestrade @@ -157,7 +158,7 @@ const byte STILL_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = { { 4, 0, 0 } // Inspector Lestrade (Yard) }; -byte TALK_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = { +static const byte TALK_SEQUENCES[MAX_PEOPLE][MAX_TALK_SEQUENCES] = { { 1, 0, 0 }, // Sherlock Holmes { 5, 5, 6, 7, 8, 7, 8, 6, 0, 0 }, // Dr. Watson { 2, 0, 0 }, // Inspector Lestrade @@ -381,12 +382,12 @@ bool ScalpelEngine::showAlleyCutscene() { if (finished) finished = _animation->play("27PRO3", 1, 0, true, 2); - if(finished) { + if (finished) { _screen->getPalette(palette); _screen->fadeToBlack(2); } - if(finished) { + if (finished) { ImageFile titleImages("title3.vgs", true); // "Early the following morning on Baker Street..." _screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(35, 51), false, 0); diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp index 12054bd7fb..861c1c695d 100644 --- a/engines/sherlock/user_interface.cpp +++ b/engines/sherlock/user_interface.cpp @@ -783,7 +783,7 @@ void UserInterface::doEnvControl() { if (saves.checkGameOnScreen(_selector)) _oldSelector = _selector; - if (saves.getFilename(_selector)) { + if (saves.promptForFilename(_selector)) { saves.saveGame(_selector + 1, saves._savegames[_selector]); banishWindow(1); @@ -954,7 +954,7 @@ void UserInterface::doEnvControl() { if (saves.checkGameOnScreen(_selector)) _oldSelector = _selector; - if (saves.getFilename(_selector)) { + if (saves.promptForFilename(_selector)) { saves.saveGame(_selector + 1, saves._savegames[_selector]); banishWindow(); _windowBounds.top = CONTROLS_Y1; |