[Scummvm-git-logs] scummvm master -> 55f65e2290778674e721fb97760fb1add795554c
tag2015
noreply at scummvm.org
Mon Dec 11 01:31:42 UTC 2023
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:
9b5dddd9ac AGS: Remove overzealous assert in spritecache
55f65e2290 AGS: Prevent showing autosaves twice in some games
Commit: 9b5dddd9ace7aa01f295e6db2e2c3251885adc2c
https://github.com/scummvm/scummvm/commit/9b5dddd9ace7aa01f295e6db2e2c3251885adc2c
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-12-11T02:11:38+01:00
Commit Message:
AGS: Remove overzealous assert in spritecache
The assertion is reduntant since there's already an identical check with error
logging and it should not trigger for remapped sprites.
Fixes TRAC #14730
Changed paths:
engines/ags/shared/ac/sprite_cache.cpp
diff --git a/engines/ags/shared/ac/sprite_cache.cpp b/engines/ags/shared/ac/sprite_cache.cpp
index 05b20bc6d5f..dba16011b46 100644
--- a/engines/ags/shared/ac/sprite_cache.cpp
+++ b/engines/ags/shared/ac/sprite_cache.cpp
@@ -238,9 +238,15 @@ void SpriteCache::DisposeOldest() {
auto it = std::prev(_mru.end());
const auto sprnum = *it;
// Safety check: must be a sprite from resources
- assert(_spriteData[sprnum].IsAssetSprite());
+ // TODO: compare with latest upstream
+ // Commented out the assertion, since it triggers for sprites that are in the list but remapped to the placeholder (sprite 0)
+ // Whispers of a Machine is affected by this issue (see TRAC #14730)
+
+ // assert(_spriteData[sprnum].IsAssetSprite());
+
if (!_spriteData[sprnum].IsAssetSprite()) {
- Debug::Printf(kDbgGroup_SprCache, kDbgMsg_Error, "SpriteCache::DisposeOldest: in MRU list sprite %d is external or does not exist", sprnum);
+ if (!(_spriteData[sprnum].Flags & SPRCACHEFLAG_REMAPPED))
+ Debug::Printf(kDbgGroup_SprCache, kDbgMsg_Error, "SpriteCache::DisposeOldest: in MRU list sprite %d is external or does not exist", sprnum);
_mru.erase(it);
// std::list::erase() invalidates iterators to the erased item.
// But our implementation does not.
Commit: 55f65e2290778674e721fb97760fb1add795554c
https://github.com/scummvm/scummvm/commit/55f65e2290778674e721fb97760fb1add795554c
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-12-11T02:14:45+01:00
Commit Message:
AGS: Prevent showing autosaves twice in some games
Changed paths:
engines/ags/engine/ac/listbox.cpp
diff --git a/engines/ags/engine/ac/listbox.cpp b/engines/ags/engine/ac/listbox.cpp
index 822e322e4b5..0c3a572b06f 100644
--- a/engines/ags/engine/ac/listbox.cpp
+++ b/engines/ags/engine/ac/listbox.cpp
@@ -146,6 +146,15 @@ int ListBox_FillSaveGameList(GUIListBox *listbox) {
for (const auto &item : saveList) {
int slot = item.getSaveSlot();
Common::String desc = item.getDescription();
+ if (strcmp(_GP(game).guid, "{623a837d-9007-4174-b8be-af23192c3d73}" /* Blackwell Epiphany */) == 0 ||
+ strcmp(_GP(game).guid, "{139fc4b0-c680-4e03-984e-bda22af424e9}" /* Gemini Rue */) == 0 ||
+ strcmp(_GP(game).guid, "{db1e693d-3c6a-4565-ae08-45fe4c536498}" /* Old Skies */) == 0 ||
+ strcmp(_GP(game).guid, "{a0488eca-2275-47c8-860a-3b755fd51a59}" /* The Shivah: Kosher Edition */) == 0 ||
+ strcmp(_GP(game).guid, "{ea2bf7d0-7eca-4127-9970-031ee8f37eba}" /* Unavowed */) == 0)
+ if (slot == 101) {
+ debug(0, "Skipping game-managed autosave slot entry in savelist");
+ continue;
+ }
listbox->AddItem(desc);
listbox->SavedGameIndex[listbox->ItemCount - 1] = slot;
More information about the Scummvm-git-logs
mailing list