[Scummvm-git-logs] scummvm master -> e1754fbec7fec66334a47d6dca7c1e90bd424039
dreammaster
dreammaster at scummvm.org
Fri Aug 4 04:45:04 CEST 2017
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
293df6a68f TITANIC: Max saved games const centralized
eb05082617 TITANIC: Allow last saved game to be loaded
e1754fbec7 Merge pull request #980 from dafioram/titanic_access_last_save
Commit: 293df6a68f9e10f1fa43139306eaf73af7ab6c09
https://github.com/scummvm/scummvm/commit/293df6a68f9e10f1fa43139306eaf73af7ab6c09
Author: David Fioramonti (dafioram at gmail.com)
Date: 2017-08-03T16:13:34-07:00
Commit Message:
TITANIC: Max saved games const centralized
Before the const specifying the max number of save/load games was
in titanic.h, core/project_item.cpp, main_game_window, and detection.cpp.
Since they all inherit from titanic.h they should just use the const there.
Also the saved game const in core/project_item.cpp was named differently
so I also changed that.
Changed paths:
engines/titanic/core/project_item.cpp
engines/titanic/detection.cpp
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index a3ac284..2655b6c 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 8c990e2..6c3177d 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 {
Commit: eb050826174c1996e9d052d554c946420c192bc8
https://github.com/scummvm/scummvm/commit/eb050826174c1996e9d052d554c946420c192bc8
Author: David Fioramonti (dafioram at gmail.com)
Date: 2017-08-03T16:14:20-07:00
Commit Message:
TITANIC: Allow last saved game to be loaded
Changed paths:
engines/titanic/core/project_item.cpp
engines/titanic/detection.cpp
engines/titanic/main_game_window.cpp
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index 2655b6c..b16d076 100644
--- a/engines/titanic/core/project_item.cpp
+++ b/engines/titanic/core/project_item.cpp
@@ -463,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_SAVES) {
+ 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 6c3177d..098c20c 100644
--- a/engines/titanic/detection.cpp
+++ b/engines/titanic/detection.cpp
@@ -118,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 b578bb9..559e186 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);
Commit: e1754fbec7fec66334a47d6dca7c1e90bd424039
https://github.com/scummvm/scummvm/commit/e1754fbec7fec66334a47d6dca7c1e90bd424039
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-03T22:44:59-04:00
Commit Message:
Merge pull request #980 from dafioram/titanic_access_last_save
TITANIC: Fix access to last savegame slot
Changed paths:
engines/titanic/core/project_item.cpp
engines/titanic/detection.cpp
engines/titanic/main_game_window.cpp
More information about the Scummvm-git-logs
mailing list