[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.515,2.516 saveload.cpp,1.232,1.233 script_v6.cpp,1.450,1.451 script_v72he.cpp,2.303,2.304 vars.cpp,1.142,1.143

Gregory Montoir cyx at users.sourceforge.net
Fri Sep 2 04:25:03 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21638/scumm

Modified Files:
	intern.h saveload.cpp script_v6.cpp script_v72he.cpp vars.cpp 
Log Message:
cleanup

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.515
retrieving revision 2.516
diff -u -d -r2.515 -r2.516
--- intern.h	31 Aug 2005 20:54:51 -0000	2.515
+++ intern.h	2 Sep 2005 11:24:16 -0000	2.516
@@ -958,7 +958,7 @@
 	virtual void decodeParseString(int a, int b);
 	void decodeScriptString(byte *dst, bool scriptString = false);
 	void copyScriptString(byte *dst, int dstSize);
-	int convertFilePath(byte *dst, bool setFilePath = 0);
+	int convertFilePath(byte *dst, bool setFilePath = false);
 
 	int findObject(int x, int y, int num, int *args);
 	int getSoundResourceSize(int id);

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -d -r1.232 -r1.233
--- saveload.cpp	30 Jul 2005 21:11:27 -0000	1.232
+++ saveload.cpp	2 Sep 2005 11:24:16 -0000	1.233
@@ -1088,7 +1088,7 @@
 		MKEND()
 	};
 
-	_sprite->saveOrLoadSpriteData(&*s, savegameVersion);
+	_sprite->saveOrLoadSpriteData(s, savegameVersion);
 
 	s->saveLoadArrayOf(&_floodStateParams, 1, sizeof(_floodStateParams), floodStateEntries);
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.450
retrieving revision 1.451
diff -u -d -r1.450 -r1.451
--- script_v6.cpp	2 Sep 2005 10:49:21 -0000	1.450
+++ script_v6.cpp	2 Sep 2005 11:24:16 -0000	1.451
@@ -1083,7 +1083,7 @@
 
 	// In Fatty Bear's Birthday Surprise the piano uses offsets 1 - 23 to
 	// indicate which note to play, but only when using the standard piano
-	// sound. See also o6_soundOps()
+	// sound. See also o60_soundOps()
 	if (_heversion >= 61)
 		offset = pop();
 

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.303
retrieving revision 2.304
diff -u -d -r2.303 -r2.304
--- script_v72he.cpp	14 Aug 2005 01:41:52 -0000	2.303
+++ script_v72he.cpp	2 Sep 2005 11:24:16 -0000	2.304
@@ -538,20 +538,13 @@
 	}
 
 	if (setFilePath) {
-		Common::File f;
-		char filePath[256], newFilePath[256];
-
+		char filePath[256];
 		sprintf(filePath, "%s%s", _gameDataPath.c_str(), dst + r);
-		if (f.exists(filePath)) {
-			sprintf(newFilePath, "%s%s", _gameDataPath.c_str(), dst + r);
-		} else {
-			sprintf(newFilePath, "%s%s", _saveFileMan->getSavePath(), dst + r);
+		if (!Common::File::exists(filePath)) {
+			sprintf(filePath, "%s%s", _saveFileMan->getSavePath(), dst + r);
 		}
-
-		len = resStrLen((const byte *)newFilePath);
-		memcpy(dst, newFilePath, len);
-		dst[len] = 0;
-		debug(0, "convertFilePath: newFilePath is %s", newFilePath);
+		strcpy((char *)dst, filePath);
+		debug(0, "convertFilePath: filePath is %s", dst);
 	}
 
 	return r;

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/vars.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- vars.cpp	30 Jul 2005 21:11:32 -0000	1.142
+++ vars.cpp	2 Sep 2005 11:24:16 -0000	1.143
@@ -600,13 +600,18 @@
 #endif
 
 void ScummEngine::initScummVars() {
-
 	if (_heversion < 70 && _version <= 6) {
 		switch (_midiDriver) {
-		case MD_NULL:  VAR(VAR_SOUNDCARD) = 0; break;
+		case MD_NULL:
+			VAR(VAR_SOUNDCARD) = 0;
+			break;
 		case MD_PCSPK:
-		case MD_PCJR:  VAR(VAR_SOUNDCARD) = 1; break;
-		case MD_ADLIB: VAR(VAR_SOUNDCARD) = 3; break;
+		case MD_PCJR:
+			VAR(VAR_SOUNDCARD) = 1;
+			break;
+		case MD_ADLIB:
+			VAR(VAR_SOUNDCARD) = 3;
+			break;
 		default:
 			if ((_gameId == GID_MONKEY_EGA || _gameId == GID_MONKEY_VGA || _gameId == GID_LOOM)
 			   &&  (_platform == Common::kPlatformPC)) {
@@ -615,16 +620,12 @@
 					Common::File f;
 					for (int i = 82; i < 86; i++) {
 						sprintf(buf, "%d.LFL", i);
-						f.open(buf);
-						if (f.isOpen() == false)
+						if (!Common::File::exists(buf))
 							error("Native MIDI support requires Roland patch from LucasArts");
-						f.close();
 					}
 				} else if (_gameId == GID_MONKEY_EGA) {
-						Common::File f;
-						f.open("DISK09.LEC");
-						if (f.isOpen() == false)
-							error("Native MIDI support requires Roland patch from LucasArts");
+					if (!Common::File::exists("DISK09.LEC"))
+						error("Native MIDI support requires Roland patch from LucasArts");
 				}
 				VAR(VAR_SOUNDCARD) = 4;
 			} else {
@@ -670,10 +671,10 @@
 		}
 		if (_version >= 4) {
 			VAR(VAR_HEAPSPACE) = 1400;
-			VAR(VAR_FIXEDDISK) = true;
+			VAR(VAR_FIXEDDISK) = 1;
 		}
 		if (_version >= 5)
-			VAR(VAR_MOUSEPRESENT) = true;
+			VAR(VAR_MOUSEPRESENT) = 1;
 		if (_version == 6)
 			VAR(VAR_V6_EMSSPACE) = 10000;
 	}





More information about the Scummvm-git-logs mailing list