[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.74,1.75

James Brown ender at users.sourceforge.net
Fri Nov 15 02:49:01 CET 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv8068/simon

Modified Files:
	simon.cpp 
Log Message:
638809: Simon startup speedup


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- simon.cpp	13 Nov 2002 16:34:22 -0000	1.74
+++ simon.cpp	15 Nov 2002 10:44:58 -0000	1.75
@@ -4735,15 +4735,8 @@
 #endif
 #ifdef USE_MAD
 			if (_voice_type == FORMAT_MP3) {
-				uint8 buf[2048];
-				uint32 pos = 0;
-				_voice_file->seek(0, SEEK_SET);
-			        while ((_voice_file->read(buf, 2048)) > 0) {
-					if (pos == _voice_file->pos())
-						break;
-					pos = _voice_file->pos();
-			        }
-				_voice_offsets[gss->NUM_EFFECTS_RESOURCES] = pos;
+				_voice_file->seek(0, SEEK_END);
+				_voice_offsets[gss->NUM_EFFECTS_RESOURCES] = _voice_file->pos();
 			}
 #endif
 		}
@@ -4789,15 +4782,8 @@
 #endif
 #ifdef USE_MAD
 			if (_effects_type == FORMAT_MP3) {
-				uint8 buf[2048];
-				uint32 pos = 0;
-				_effects_file->seek(0, SEEK_SET);
-			        while ((_effects_file->read(buf, 2048)) > 0) {
-					if (pos == _effects_file->pos())
-						break;
-					pos = _effects_file->pos();
-			        }
-				_effects_offsets[gss->NUM_EFFECTS_RESOURCES] = pos;
+				_effects_file->seek(0, SEEK_END);
+				_effects_offsets[gss->NUM_EFFECTS_RESOURCES] = _effects_file->pos();
 			}
 #endif
 		} else {





More information about the Scummvm-git-logs mailing list