[Scummvm-git-logs] scummvm master -> 50aff67f4cdc100cb1f0146decca7cc2753c47a5
sluicebox
22204938+sluicebox at users.noreply.github.com
Tue Apr 21 20:52:14 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3edd7e2b1d SCI: Fix build when SCI32 disabled
50aff67f4c SCI: Use '#' pattern when matching filename digits
Commit: 3edd7e2b1d880c087f2e35894cf0e973c8672822
https://github.com/scummvm/scummvm/commit/3edd7e2b1d880c087f2e35894cf0e973c8672822
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-04-21T13:44:23-07:00
Commit Message:
SCI: Fix build when SCI32 disabled
Changed paths:
engines/sci/engine/file.h
engines/sci/engine/kfile.cpp
diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h
index 1583a25176..473b4e89e6 100644
--- a/engines/sci/engine/file.h
+++ b/engines/sci/engine/file.h
@@ -40,7 +40,6 @@ enum {
kMaxNumSaveGames = 20 ///< Maximum number of savegames
};
-#ifdef ENABLE_SCI32
enum {
kAutoSaveId = 0, ///< The save game slot number for autosaves
kNewGameId = 999, ///< The save game slot number for a "new game" save
@@ -53,7 +52,6 @@ enum {
kSaveIdShift = 1,
kMaxShiftedSaveId = 99
};
-#endif
enum {
kVirtualFileHandleStart = 32000,
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 3a60d64078..1dffb6336c 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -43,9 +43,9 @@
#ifdef ENABLE_SCI32
#include "graphics/thumbnail.h"
#include "sci/engine/guest_additions.h"
+#endif
#include "sci/engine/message.h"
#include "sci/resource.h"
-#endif
namespace Sci {
@@ -1108,15 +1108,15 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
case GID_QFG3: {
// Auto-save system used by QFG3
reg_t autoSaveNameId;
- SciArray &autoSaveName = *s->_segMan->allocateArray(kArrayTypeString, kMaxSaveNameLength, &autoSaveNameId);
+ s->_segMan->allocDynmem(kMaxSaveNameLength, "kSaveGame", &autoSaveNameId);
MessageTuple autoSaveNameTuple(0, 0, 16, 1);
s->_msgState->getMessage(0, autoSaveNameTuple, autoSaveNameId);
-
- if (game_description == autoSaveName.toString()) {
+ Common::String autoSaveName = s->_segMan->getString(autoSaveNameId);
+ if (game_description == autoSaveName) {
savegameId = kAutoSaveId;
}
- s->_segMan->freeArray(autoSaveNameId);
+ s->_segMan->freeDynmem(autoSaveNameId);
break;
}
case GID_FANMADE: {
Commit: 50aff67f4cdc100cb1f0146decca7cc2753c47a5
https://github.com/scummvm/scummvm/commit/50aff67f4cdc100cb1f0146decca7cc2753c47a5
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2020-04-21T13:46:29-07:00
Commit Message:
SCI: Use '#' pattern when matching filename digits
Changed paths:
engines/sci/resource.cpp
engines/sci/resource_audio.cpp
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index a9435e31a0..47486fa23c 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -631,7 +631,7 @@ int ResourceManager::addAppropriateSources() {
ResourceSource *map = addExternalMap("resource.map");
Common::ArchiveMemberList files;
- SearchMan.listMatchingMembers(files, "resource.0??");
+ SearchMan.listMatchingMembers(files, "resource.0##");
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
const Common::String name = (*x)->getName();
@@ -662,8 +662,8 @@ int ResourceManager::addAppropriateSources() {
} else {
// SCI2.1-SCI3 file naming scheme
Common::ArchiveMemberList mapFiles, files;
- SearchMan.listMatchingMembers(mapFiles, "resmap.0??");
- SearchMan.listMatchingMembers(files, "ressci.0??");
+ SearchMan.listMatchingMembers(mapFiles, "resmap.0##");
+ SearchMan.listMatchingMembers(files, "ressci.0##");
if (mapFiles.empty() || files.empty())
return 0;
@@ -1770,7 +1770,7 @@ void ResourceManager::readResourcePatches() {
szResType = getResourceTypeName((ResourceType)i);
// SCI0 naming - type.nnn
mask = szResType;
- mask += ".???";
+ mask += ".###";
SearchMan.listMatchingMembers(files, mask);
// SCI1 and later naming - nnn.typ
mask = "*.";
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 68d6ec5dd5..593fa6d14b 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -672,7 +672,7 @@ void ResourceManager::setAudioLanguage(int language) {
// Search for audio volumes for this language and add them to the source list
Common::ArchiveMemberList files;
- SearchMan.listMatchingMembers(files, filename + ".0??");
+ SearchMan.listMatchingMembers(files, filename + ".0##");
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
const Common::String name = (*x)->getName();
const char *dot = strrchr(name.c_str(), '.');
More information about the Scummvm-git-logs
mailing list