aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/project_item.cpp3
-rw-r--r--engines/titanic/detection.cpp4
-rw-r--r--engines/titanic/main_game_window.cpp2
3 files changed, 3 insertions, 6 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index a3ac284af8..b16d076f14 100644
--- a/engines/titanic/core/project_item.cpp
+++ b/engines/titanic/core/project_item.cpp
@@ -35,7 +35,6 @@
namespace Titanic {
#define CURRENT_SAVEGAME_VERSION 1
-#define MAX_SAVEGAME_SLOTS 99
#define MINIMUM_SAVEGAME_VERSION 1
static const char *const SAVEGAME_STR = "TNIC";
@@ -464,7 +463,7 @@ SaveStateList CProjectItem::getSavegameList(const Common::String &target) {
const char *ext = strrchr(file->c_str(), '.');
int slot = ext ? atoi(ext + 1) : -1;
- if (slot >= 0 && slot < MAX_SAVEGAME_SLOTS) {
+ if (slot >= 0 && slot <= MAX_SAVES) {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
if (in) {
diff --git a/engines/titanic/detection.cpp b/engines/titanic/detection.cpp
index 8c990e2525..098c20ca1d 100644
--- a/engines/titanic/detection.cpp
+++ b/engines/titanic/detection.cpp
@@ -33,8 +33,6 @@
#include "graphics/colormasks.h"
#include "graphics/surface.h"
-#define MAX_SAVES 99
-
namespace Titanic {
struct TitanicGameDescription {
@@ -120,7 +118,7 @@ SaveStateList TitanicMetaEngine::listSaves(const char *target) const {
const char *ext = strrchr(file->c_str(), '.');
int slot = ext ? atoi(ext + 1) : -1;
- if (slot >= 0 && slot < MAX_SAVES) {
+ if (slot >= 0 && slot <= MAX_SAVES) {
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file);
if (in) {
diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp
index b578bb942e..559e186f70 100644
--- a/engines/titanic/main_game_window.cpp
+++ b/engines/titanic/main_game_window.cpp
@@ -117,7 +117,7 @@ int CMainGameWindow::selectSavegame() {
bool hasSavegames = false;
// Loop through save slots to find any existing save slots
- for (int idx = 0; idx < MAX_SAVES; ++idx) {
+ for (int idx = 0; idx <= MAX_SAVES; ++idx) {
CString saveName = g_vm->getSavegameName(idx);
if (!saveName.empty()) {
dialog.addSavegame(idx, saveName);