aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2006-04-19 18:14:28 +0000
committerMax Horn2006-04-19 18:14:28 +0000
commit70d23ccf2922ce6743cb7a49f4f55a9372fe44f8 (patch)
tree1bc542876cffaf413a649e47ce76a3b585ac1e43 /engines/scumm
parentc5507879fc2c0edfcce7ad8802401d9d7c21e10f (diff)
downloadscummvm-rg350-70d23ccf2922ce6743cb7a49f4f55a9372fe44f8.tar.gz
scummvm-rg350-70d23ccf2922ce6743cb7a49f4f55a9372fe44f8.tar.bz2
scummvm-rg350-70d23ccf2922ce6743cb7a49f4f55a9372fe44f8.zip
Added a small comment to ScummEngine::openRoom that explains why we check for room==0 instead of just using it as-is
svn-id: r22038
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/resource.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 7ffb05f654..326b958128 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -84,7 +84,10 @@ void ScummEngine::openRoom(const int room) {
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) {