[Scummvm-cvs-logs] SF.net SVN: scummvm:[51477] scummvm/trunk/engines/sci/graphics/menu.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Thu Jul 29 21:08:08 CEST 2010
Revision: 51477
http://scummvm.svn.sourceforge.net/scummvm/?rev=51477&view=rev
Author: mthreepwood
Date: 2010-07-29 19:08:07 +0000 (Thu, 29 Jul 2010)
Log Message:
-----------
SCI: Ignore setAttribute() on any non-existent menu items
This fixes two fan games: Al Pond 2 and Aquarius. The original interpreter did this as well.
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/menu.cpp
Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp 2010-07-29 17:26:56 UTC (rev 51476)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp 2010-07-29 19:08:07 UTC (rev 51477)
@@ -271,14 +271,15 @@
void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeId, reg_t value) {
GuiMenuItemEntry *itemEntry = findItem(menuId, itemId);
+
if (!itemEntry) {
- // Check if the game actually has a menu. PQ2 demo calls this, for example, but has no menus.
- // (bug report #3034507)
- if (_itemList.size() == 0)
- return;
- else
- error("Tried to setAttribute() on non-existant menu-item %d:%d", menuId, itemId);
+ // PQ2 demo calls this, for example, but has no menus (bug report #3034507). Some SCI
+ // fan games (Al Pond 2, Aquarius) call this too on non-existent menu items. The
+ // original interpreter ignored these as well.
+ debugC(2, kDebugLevelGraphics, "Tried to setAttribute() on non-existent menu-item %d:%d", menuId, itemId);
+ return;
}
+
switch (attributeId) {
case SCI_MENU_ATTRIBUTE_ENABLED:
itemEntry->enabled = value.isNull() ? false : true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list