[Scummvm-cvs-logs] SF.net SVN: scummvm: [22038] scummvm/trunk/engines/scumm/resource.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Apr 19 11:25:23 CEST 2006


Revision: 22038
Author:   fingolfin
Date:     2006-04-19 11:14:28 -0700 (Wed, 19 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22038&view=rev

Log Message:
-----------
Added a small comment to ScummEngine::openRoom that explains why we check for room==0 instead of just using it as-is

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/resource.cpp
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp	2006-04-19 16:16:57 UTC (rev 22037)
+++ scummvm/trunk/engines/scumm/resource.cpp	2006-04-19 18:14:28 UTC (rev 22038)
@@ -84,7 +84,10 @@
 		return;
 	}
 
-	const int diskNumber = (room == 0 ? 0 : res.roomno[rtRoom][room]);
+	// Load the disk numer / room offs (special case for room 0 exists because
+	// room 0 contains the data which is used to create the roomno / roomoffs
+	// tables -- hence obviously we mustn't use those when loading room 0.
+	const int diskNumber = room ? res.roomno[rtRoom][room] : 0;
 	const int room_offs = room ? res.roomoffs[rtRoom][room] : 0;
 
 	while (room_offs != -1) {


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