[Scummvm-cvs-logs] SF.net SVN: scummvm:[52532] scummvm/trunk/engines/mohawk/riven.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Sat Sep 4 23:43:17 CEST 2010
Revision: 52532
http://scummvm.svn.sourceforge.net/scummvm/?rev=52532&view=rev
Author: mthreepwood
Date: 2010-09-04 21:43:16 +0000 (Sat, 04 Sep 2010)
Log Message:
-----------
MOHAWK: Ignore invalid Riven hotspots again
There is at least one example of a bad hotspot in Riven (tspit
371 (377 in the DVD version), hotspot 4). This particular hotspot is a zip hotspot which looks like it has its left and right coordinates reversed. However, the zip hotspot would only take the player to the same card as the non zip hotspot so it seems they removed this hotspot with a hack. This fixes a regression from r52487.
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/riven.cpp
Modified: scummvm/trunk/engines/mohawk/riven.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/riven.cpp 2010-09-04 18:23:37 UTC (rev 52531)
+++ scummvm/trunk/engines/mohawk/riven.cpp 2010-09-04 21:43:16 UTC (rev 52532)
@@ -385,7 +385,7 @@
// NOTE: The hotspot scripts are cleared by the RivenScriptManager automatically.
- Common::SeekableReadStream* inStream = getRawData(ID_HSPT, id);
+ Common::SeekableReadStream *inStream = getRawData(ID_HSPT, id);
_hotspotCount = inStream->readUint16BE();
_hotspots = new RivenHotspot[_hotspotCount];
@@ -401,6 +401,15 @@
int16 right = inStream->readSint16BE();
int16 bottom = inStream->readSint16BE();
+ // Riven has some invalid rects, disable them here
+ // Known weird hotspots:
+ // - tspit 371 (DVD: 377), hotspot 4
+ if (left >= right || top >= bottom) {
+ warning("%s %d hotspot %d is invalid: (%d, %d, %d, %d)", getStackName(_curStack).c_str(), _curCard, i, left, top, right, bottom);
+ left = top = right = bottom = 0;
+ _hotspots[i].enabled = 0;
+ }
+
_hotspots[i].rect = Common::Rect(left, top, right, bottom);
_hotspots[i].u0 = inStream->readUint16BE();
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