[Scummvm-cvs-logs] SF.net SVN: scummvm: [20949] scummvm/trunk/engines/scumm/resource.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Feb 26 14:00:03 CET 2006
Revision: 20949
Author: fingolfin
Date: 2006-02-26 13:59:44 -0800 (Sun, 26 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20949&view=rev
Log Message:
-----------
Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/scumm/resource.cpp
Modified: scummvm/trunk/engines/scumm/resource.cpp
===================================================================
--- scummvm/trunk/engines/scumm/resource.cpp 2006-02-26 21:52:49 UTC (rev 20948)
+++ scummvm/trunk/engines/scumm/resource.cpp 2006-02-26 21:59:44 UTC (rev 20949)
@@ -63,7 +63,6 @@
/* Open a room */
void ScummEngine::openRoom(const int room) {
- int room_offs;
bool result;
char buf[128];
char buf2[128] = "";
@@ -85,18 +84,16 @@
}
const int diskNumber = (room == 0 ? 0 : res.roomno[rtRoom][room]);
+ const int room_offs = room ? res.roomoffs[rtRoom][room] : 0;
- /* Either xxx.lfl or monkey.xxx file name */
- while (1) {
- room_offs = room ? res.roomoffs[rtRoom][room] : 0;
+ while (room_offs != -1) {
- if (room_offs == -1)
- break;
-
if (room_offs != 0 && room != 0 && _game.heversion < 98) {
_fileOffset = res.roomoffs[rtRoom][room];
return;
}
+
+ /* Either xxx.lfl or monkey.xxx file name */
if (_game.version <= 3) {
sprintf(buf, "%.2d.lfl", room);
// Maniac Mansion demo has .man instead of .lfl
@@ -164,8 +161,10 @@
}
}
+ // Try to open the file with name 'buf'. If that fails, try buf2 (if
+ // specified).
result = openResourceFile(buf, encByte);
- if ((result == false) && (buf2[0])) {
+ if (!result && buf2[0]) {
result = openResourceFile(buf2, encByte);
// We have .man files so set demo mode
if (_game.id == GID_MANIAC)
More information about the Scummvm-git-logs
mailing list