aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/engine/items_eob.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/kyra/engine/items_eob.cpp b/engines/kyra/engine/items_eob.cpp
index 39054b614d..3121f567f8 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;