[Scummvm-git-logs] scummvm master -> 431f2887429ad63e6f98a09e61029f1e17b959b3

sluicebox noreply at scummvm.org
Tue Jan 24 21:46:18 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:
b5c2619c94 SCI: Fix broken SQ4 save game deletion
e81858c25d SCI: Fix desynchronized kMenuSelect inversion
431f288742 SCI: Amend CAMELOT script patch description


Commit: b5c2619c94294f776e19002849f029840bcfce98
    https://github.com/scummvm/scummvm/commit/b5c2619c94294f776e19002849f029840bcfce98
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T13:32:47-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: e81858c25d3c87c67dd534cb9242fe650179c0a5
    https://github.com/scummvm/scummvm/commit/e81858c25d3c87c67dd534cb9242fe650179c0a5
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T13:34:06-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: 431f2887429ad63e6f98a09e61029f1e17b959b3
    https://github.com/scummvm/scummvm/commit/431f2887429ad63e6f98a09e61029f1e17b959b3
Author: UrQuan1 (johan.shodan at gmail.com)
Date: 2023-01-24T13:34:06-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