[Scummvm-git-logs] scummvm master -> 2e49b33ee54c80946d1c969f921a1a4d9c36288f
criezy
criezy at scummvm.org
Tue Apr 13 19:43:04 UTC 2021
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:
d1d2f106bb AGS: Sort savegame by decreasing slot number
2e49b33ee5 AGS: Remove duplicate id for The Cat Lady
Commit: d1d2f106bb78ea672af05c026e68a5e6ab2d83c7
https://github.com/scummvm/scummvm/commit/d1d2f106bb78ea672af05c026e68a5e6ab2d83c7
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-13T20:42:54+01:00
Commit Message:
AGS: Sort savegame by decreasing slot number
The original interpreter sorts the savegame from the most recent
to the oldest. We don't have the savegame date in ScummVM, but
sorting by decreasing slot number should approximate this better
than using increasing slot numbers.
Changed paths:
engines/ags/engine/ac/listbox.cpp
engines/ags/engine/gui/guidialog.cpp
diff --git a/engines/ags/engine/ac/listbox.cpp b/engines/ags/engine/ac/listbox.cpp
index 520246cd51..e83b6f18e2 100644
--- a/engines/ags/engine/ac/listbox.cpp
+++ b/engines/ags/engine/ac/listbox.cpp
@@ -132,6 +132,13 @@ int ListBox_FillSaveGameList(GUIListBox *listbox) {
SaveStateList saveList = ::AGS::g_vm->listSaves();
+ // The original AGS sorts the list from most recent to oldest.
+ // We don't have the modification date in ScummVM though. We could try to
+ // parse the date string, but for now, sort by decreasing slot number, which
+ // should work better than the default sort by increasing slot.
+ Common::sort(saveList.begin(), saveList.end(),
+ [](const SaveStateDescriptor &x, const SaveStateDescriptor &y) {return x.getSaveSlot() > y.getSaveSlot(); });
+
for (uint idx = 0; idx < saveList.size(); ++idx) {
if (numsaves >= MAXSAVEGAMES)
break;
diff --git a/engines/ags/engine/gui/guidialog.cpp b/engines/ags/engine/gui/guidialog.cpp
index 6f10842504..40006b6ee9 100644
--- a/engines/ags/engine/gui/guidialog.cpp
+++ b/engines/ags/engine/gui/guidialog.cpp
@@ -272,6 +272,14 @@ void preparesavegamelist(int ctrllist) {
// Get a list of savegames
SaveStateList saveList = ::AGS::g_vm->listSaves();
+ // The original AGS sorts the list from most recent to oldest.
+ // We don't have the modification date in ScummVM though. We could try to
+ // parse the date string, but for now, sort by decreasing slot number, which
+ // should work better than the default sort by increasing slot.
+ Common::sort(saveList.begin(), saveList.end(),
+ [](const SaveStateDescriptor &x, const SaveStateDescriptor &y) {return x.getSaveSlot() > y.getSaveSlot(); });
+
+
for (SaveStateList::iterator it = saveList.begin(); it != saveList.end(); ++it) {
Common::String desc = it->getDescription();
@@ -290,29 +298,6 @@ void preparesavegamelist(int ctrllist) {
// Select the first item
CSCISendControlMessage(ctrllist, CLB_SETCURSEL, 0, 0);
-
- // The code below reorder the savegames according to filedates
- // Since we don't currently have this info, there is no sense in doing it.
- // Also the newer AGS code does the sorting of the list before the loop above,
- // which simpligies the code, and we might want to do the same.
-/*
- for (int nn = 0; nn < _G(numsaves) - 1; nn++) {
- for (int kk = 0; kk < _G(numsaves) - 1; kk++) { // Date order the games
- if (_G(filedates)[kk] < _G(filedates)[kk + 1]) { // swap them round
- CSCISendControlMessage(ctrllist, CLB_GETTEXT, kk, &_G(buff)[0]);
- CSCISendControlMessage(ctrllist, CLB_GETTEXT, kk + 1, &_G(buffer2)[0]);
- CSCISendControlMessage(ctrllist, CLB_SETTEXT, kk + 1, &_G(buff)[0]);
- CSCISendControlMessage(ctrllist, CLB_SETTEXT, kk, &_G(buffer2)[0]);
- int numtem = _G(filenumbers)[kk];
- _G(filenumbers)[kk] = _G(filenumbers)[kk + 1];
- _G(filenumbers)[kk + 1] = numtem;
- long numted = _G(filedates)[kk];
- _G(filedates)[kk] = _G(filedates)[kk + 1];
- _G(filedates)[kk + 1] = numted;
- }
- }
- }
-*/
}
void enterstringwindow(const char *prompttext, char *stouse) {
Commit: 2e49b33ee54c80946d1c969f921a1a4d9c36288f
https://github.com/scummvm/scummvm/commit/2e49b33ee54c80946d1c969f921a1a4d9c36288f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-13T20:42:54+01:00
Commit Message:
AGS: Remove duplicate id for The Cat Lady
Also move one of the entry to the commercial game section with
the other entries.
Changed paths:
engines/ags/detection_tables.h
diff --git a/engines/ags/detection_tables.h b/engines/ags/detection_tables.h
index e97db13689..f5a5f815d0 100644
--- a/engines/ags/detection_tables.h
+++ b/engines/ags/detection_tables.h
@@ -421,7 +421,6 @@ const PlainGameDescriptor GAME_NAMES[] = {
{ "castleoffire", "Castle of Fire" },
{ "catacombic", "Catacombic" },
{ "catapault", "CATapault" },
- { "catlady", "The Cat Lady" },
{ "cayannepepper", "CAYANNE PEPPER" },
{ "cedricandtherevolution", "Cedric and the Revolution" },
{ "celticchaos2fishermensfiends", "Celtic Chaos 2 - Fishermen's fiends" },
@@ -1802,6 +1801,7 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("thecastle", "maniac.exe", "3b96c2143d927f005715be73344e456c", 22362337), // Steam
GAME_ENTRY("thecatlady", "thecatlady.exe", "0ea2b985dc5d7d27cb7c1b7da5eedea0", 1072316702), // GOG
GAME_ENTRY("thecatlady", "thecatlady.exe", "0ea2b985dc5d7d27cb7c1b7da5eedea0", 53988582), // Steam
+ GAME_ENTRY("thecatlady", "Cat Lady.exe", "92320e20e3d4c70a94d89e2f797e65c1", 1061000756), // DVD
GAME_ENTRY("thesecretsofjesus", "the secrets of jesus.exe", "2e17ab52586ad34b5e597c20a59f60a0", 1577637692), // Steam
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "e07a475bcf14bc75c016724186f222ac", 369769127), // Steam
GAME_ENTRY("theterribleoldman", "the terrible old man.exe", "b3a10d7d3b5a728330b028ec28ff2d05", 103852030), // Steam
@@ -2109,7 +2109,6 @@ const AGSGameDescription GAME_DESCRIPTIONS[] = {
GAME_ENTRY("castleoffire", "castle of fire.exe", "b6f0726bd5776abee0d452b8f1073850", 14800915),
GAME_ENTRY("catacombic", "catacombic.exe", "057d1aa29f6fadd83209268efcfb35a3", 7317791),
GAME_ENTRY("catapault", "catapault.exe", "290afe0bac54418822f15175e474731d", 8286661),
- GAME_ENTRY("catlady", "Cat Lady.exe", "92320e20e3d4c70a94d89e2f797e65c1", 1061000756),
GAME_ENTRY("cayannepepper", "cpepper.exe", "06a03fe35791b0578068ab1873455463", 16117141),
GAME_ENTRY("cedricandtherevolution", "elves!.exe", "b216ee957dd677023e02d900281a02d6", 10205755),
GAME_ENTRY("celticchaos2fishermensfiends", "cc2.exe", "a01a9639ce30bdcd5bf82e528b51fa06", 17463014),
More information about the Scummvm-git-logs
mailing list