[Scummvm-git-logs] scummvm branch-2-7 -> bcb1645f9fafd218e3ef82760c831222a3a30d59

sluicebox noreply at scummvm.org
Tue Jan 24 22:02:06 UTC 2023


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:
0f89797807 SCI: Fix broken SQ4 save game deletion
40c5830a95 SCI: Fix desynchronized kMenuSelect inversion
bcb1645f9f SCI: Amend CAMELOT script patch description


Commit: 0f8979780723917e41b68bcbec9dfb604939af23
    https://github.com/scummvm/scummvm/commit/0f8979780723917e41b68bcbec9dfb604939af23
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T14:00:42-08:00

Commit Message:
SCI: Fix broken SQ4 save game deletion

The file extension is the Virtual ID, not the slot.

(cherry picked from commit 32d53da7b11b86bb96e905b9a941497e5fc8354f)

Changed paths:
    engines/sci/engine/kfile.cpp


diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 454c8901dd8..287d689aa7e 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -661,18 +661,12 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) {
 		name.deleteChar(0);
 	}
 
-	// Special case for SQ4 floppy: This game has hardcoded names for all of
-	// its savegames, and they are all named "sq4sg.xxx", where xxx is the
-	// slot. We just take the slot number here, and delete the appropriate
-	// save game.
 	if (name.hasPrefix("sq4sg.")) {
-		// Special handling for SQ4... get the slot number and construct the
-		// save game name.
-		int slotNum = atoi(name.c_str() + name.size() - 3);
-		Common::Array<SavegameDesc> saves;
-		listSavegames(saves);
-		int savedir_nr = saves[slotNum].id;
-		name = g_sci->getSavegameName(savedir_nr);
+		// Special case for SQ4 floppy: This game has hardcoded save game names.
+		// They are named "sq4sg.xxx", where xxx is the virtual ID. We construct
+		// the appropriate save game name and delete it.
+		const int savegameId = atoi(name.c_str() + name.size() - 3) - SAVEGAMEID_OFFICIALRANGE_START;
+		name = g_sci->getSavegameName(savegameId);
 		result = saveFileMan->removeSavefile(name);
 #ifdef ENABLE_SCI32
 	} else if (getSciVersion() >= SCI_VERSION_2) {


Commit: 40c5830a952b03d103f648845f68d3c0fbf8580f
    https://github.com/scummvm/scummvm/commit/40c5830a952b03d103f648845f68d3c0fbf8580f
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T14:00:52-08:00

Commit Message:
SCI: Fix desynchronized kMenuSelect inversion

When selecting a new menu while another menu open, the new menu
will be drawn before inverting the old item selection. In the
next loop iteration, when the inversion happens, it now inverts
the brand new white item.

(cherry picked from commit f7c44a452953415c3ba4dbdf96162f83efde8f51)

Changed paths:
    engines/sci/graphics/menu.cpp


diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index aff8bd284e5..6b44a65dee6 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -994,6 +994,13 @@ GuiMenuItemEntry *GfxMenu::interactiveWithMouse() {
 			curItemEntry = interactiveGetItem(curMenuId, newItemId, false);
 		}
 
+		if (newItemId != curItemId) {
+			// Item changed
+			invertMenuSelection(curItemId);
+			invertMenuSelection(newItemId);
+			curItemId = newItemId;
+		}
+
 		if (newMenuId != curMenuId) {
 			// Menu changed, remove cur menu and paint new menu
 			drawMenu(curMenuId, newMenuId);
@@ -1002,13 +1009,6 @@ GuiMenuItemEntry *GfxMenu::interactiveWithMouse() {
 				firstMenuChange = false;
 			}
 			curMenuId = newMenuId;
-		} else {
-			if (newItemId != curItemId) {
-				// Item changed
-				invertMenuSelection(curItemId);
-				invertMenuSelection(newItemId);
-				curItemId = newItemId;
-			}
 		}
 
 	}


Commit: bcb1645f9fafd218e3ef82760c831222a3a30d59
    https://github.com/scummvm/scummvm/commit/bcb1645f9fafd218e3ef82760c831222a3a30d59
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T14:01:13-08:00

Commit Message:
SCI: Amend CAMELOT script patch description

(cherry picked from commit c9d2fad29d795f038899f12f321d398e7fb98224)

Changed paths:
    engines/sci/engine/script_patches.cpp


diff --git a/engines/sci/engine/script_patches.cpp b/engines/sci/engine/script_patches.cpp
index 3ca76cbd1db..edee8acd2ec 100644
--- a/engines/sci/engine/script_patches.cpp
+++ b/engines/sci/engine/script_patches.cpp
@@ -791,8 +791,8 @@ static const uint16 sciPatchTimerRollover[] = {
 // ===========================================================================
 // Conquests of Camelot
 // At the bazaar in Jerusalem, it's possible to see a girl taking a shower.
-//  If you get too close, you get warned by the father - if you don't get away,
-//  he will kill you.
+//  If you get too close, you get warned by Merlin - if you don't get away,
+//  the girl's father will kill you.
 // Instead of walking there manually, it's also possible to enter "look window"
 //  and ego will automatically walk to the window. It seems that this is something
 //  that wasn't properly implemented, because instead of getting killed, you will




More information about the Scummvm-git-logs mailing list