SHERLOCK: Further minor cleanups
This commit is contained in:
parent
033241eb43
commit
6f9693102f
4 changed files with 6 additions and 5 deletions
|
@ -1114,13 +1114,14 @@ int Journal::getSearchString(bool printError) {
|
|||
xp -= screen.charWidth(name.lastChar());
|
||||
screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), INV_FOREGROUND);
|
||||
name.deleteLastChar();
|
||||
}
|
||||
|
||||
if (keyState.keycode == Common::KEYCODE_RETURN) {
|
||||
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
|
||||
done = 1;
|
||||
|
||||
} 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.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);
|
||||
|
|
|
@ -41,7 +41,6 @@ const int ENV_POINTS[6][3] = {
|
|||
static const char *const EMPTY_SAVEGAME_SLOT = "-EMPTY-";
|
||||
static const char *const SAVEGAME_STR = "SHLK";
|
||||
#define SAVEGAME_STR_SIZE 4
|
||||
#define ONSCREEN_FILES_COUNT 5
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
namespace Sherlock {
|
||||
|
||||
#define MAX_SAVEGAME_SLOTS 99
|
||||
#define ONSCREEN_FILES_COUNT 5
|
||||
#define SHERLOCK_SAVEGAME_VERSION 1
|
||||
|
||||
enum SaveMode { SAVEMODE_NONE = 0, SAVEMODE_LOAD = 1, SAVEMODE_SAVE = 2 };
|
||||
|
|
|
@ -714,7 +714,7 @@ void UserInterface::doEnvControl() {
|
|||
// Handle selecting buttons, if any
|
||||
saves.highlightButtons(found);
|
||||
|
||||
if (found == 0 || found == 5)
|
||||
if (found == 0 || found == ONSCREEN_FILES_COUNT)
|
||||
saves._envMode = SAVEMODE_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue