aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-05-19 07:53:45 -0400
committerPaul Gilbert2015-05-19 07:53:45 -0400
commitdac49ddab496b9e5ca0f6589ea7b5ad906faa464 (patch)
tree4890bf5cd10009e3051c4f4fa2160ef9803cd7fa /engines/sherlock
parent2752db8103c2076bc7838f6306de338f986f68a4 (diff)
downloadscummvm-rg350-dac49ddab496b9e5ca0f6589ea7b5ad906faa464.tar.gz
scummvm-rg350-dac49ddab496b9e5ca0f6589ea7b5ad906faa464.tar.bz2
scummvm-rg350-dac49ddab496b9e5ca0f6589ea7b5ad906faa464.zip
SHERLOCK: Syntactic fix and define for SaveManager
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/saveload.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp
index bec832aa05..053c52c4e5 100644
--- a/engines/sherlock/saveload.cpp
+++ b/engines/sherlock/saveload.cpp
@@ -38,6 +38,10 @@ const int ENV_POINTS[6][3] = {
{ 241, 280, 261 } // Quit
};
+const char *const SAVEGAME_STR = "SHLK";
+#define SAVEGAME_STR_SIZE 4
+#define ONSCREEN_FILES_COUNT 5
+
/*----------------------------------------------------------------*/
SaveManager::SaveManager(SherlockEngine *vm, const Common::String &target) :
@@ -84,11 +88,10 @@ void SaveManager::drawInterface() {
if (!_savegameIndex)
screen.buttonPrint(Common::Point(ENV_POINTS[3][2], CONTROLS_Y), COMMAND_NULL, 0, "Up");
- if (_savegameIndex == MAX_SAVEGAME_SLOTS - 5)
+ if (_savegameIndex == MAX_SAVEGAME_SLOTS - ONSCREEN_FILES_COUNT)
screen.buttonPrint(Common::Point(ENV_POINTS[4][2], CONTROLS_Y), COMMAND_NULL, 0, "Down");
- for (int idx = _savegameIndex; idx < _savegameIndex + 5; ++idx)
- {
+ for (int idx = _savegameIndex; idx < _savegameIndex + ONSCREEN_FILES_COUNT; ++idx) {
screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
INV_FOREGROUND, "%d.", idx + 1);
screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
@@ -163,9 +166,6 @@ SaveStateList SaveManager::getSavegameList(const Common::String &target) {
return saveList;
}
-const char *const SAVEGAME_STR = "SHLK";
-#define SAVEGAME_STR_SIZE 4
-
bool SaveManager::readSavegameHeader(Common::InSaveFile *in, SherlockSavegameHeader &header) {
char saveIdentBuffer[SAVEGAME_STR_SIZE + 1];
header._thumbnail = nullptr;