[Scummvm-git-logs] scummvm branch-2-1 -> 95bcb6116da7080cbbded5272cddf968ca506ddf

athrxx athrxx at scummvm.org
Sat Nov 9 17:28:26 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
95bcb6116d KYRA: (EOB2) - workaround for minor graphics glitch


Commit: 95bcb6116da7080cbbded5272cddf968ca506ddf
    https://github.com/scummvm/scummvm/commit/95bcb6116da7080cbbded5272cddf968ca506ddf
Author: athrxx (athrxx at scummvm.org)
Date: 2019-11-09T17:26:42+01:00

Commit Message:
KYRA: (EOB2) - workaround for minor graphics glitch

The game would actually allow placing the 4 horns or the large red rings from the ringmaster riddle into the inventory ring slots. Simply, because these items are flagged that way in the data file (itemtype.dat). I wasn't aware of this until I happened to come across some youtube video. The video was from DosBox, but this doesn't make a difference.

This patch prevents placing these items into the ring slots.

Changed paths:
    engines/kyra/engine/items_eob.cpp


diff --git a/engines/kyra/engine/items_eob.cpp b/engines/kyra/engine/items_eob.cpp
index 39054b6..3121f56 100644
--- a/engines/kyra/engine/items_eob.cpp
+++ b/engines/kyra/engine/items_eob.cpp
@@ -217,6 +217,14 @@ int EoBCoreEngine::validateInventorySlotForItem(Item item, int charIndex, int sl
 	}
 
 	uint16 v = item ? _itemTypes[_items[item].type].invFlags : 0xFFFF;
+
+	// WORKAROUND: The game allows putting the 4 horns and the red rings from the ringmaster riddle into inventory ring slots.
+	// This causes a graphics glitch, since these items are too large for that slot. I prevent this here. Patching it while
+	// loading up items.dat and itemtypes.dat would be preferable but seems too complicated (if not impossible), since the inv
+	// flags are part of itemtypes.dat and it might be wrong to patch these flags for the whole item type.
+	if (_flags.gameID == GI_EOB2 && (_items[item].icon == 107 || _items[item].icon == 61))
+		v &= ~0x100;
+
 	if (v & _slotValidationFlags[slot])
 		return 1;
 





More information about the Scummvm-git-logs mailing list