[Scummvm-cvs-logs] CVS: scummvm/queen queen.cpp,1.127,1.128 resource.cpp,1.57,1.58 resource.h,1.42,1.43 sound.cpp,1.53,1.54 talk.cpp,1.115,1.116

Max Horn fingolfin at users.sourceforge.net
Tue May 10 16:00:29 CEST 2005


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

Modified Files:
	queen.cpp resource.cpp resource.h sound.cpp talk.cpp 
Log Message:
Moved class File and the MD5 stuff to namespace Common

Index: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- queen.cpp	9 May 2005 12:12:14 -0000	1.127
+++ queen.cpp	10 May 2005 22:55:48 -0000	1.128
@@ -95,7 +95,7 @@
 			const char *gameName = file->displayName().c_str();
 
 			if (0 == scumm_stricmp("queen.1", gameName) || 0 == scumm_stricmp("queen.1c", gameName)) {
-				File dataFile;
+				Common::File dataFile;
 				dataFile.open(file->path().c_str());
 				assert(dataFile.isOpen());
 				

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- resource.cpp	1 Jan 2005 16:09:09 -0000	1.57
+++ resource.cpp	10 May 2005 22:55:48 -0000	1.58
@@ -54,7 +54,7 @@
 
 Resource::Resource()
 	: _resourceEntries(0), _resourceTable(NULL) {
-	_resourceFile = new File();
+	_resourceFile = new Common::File();
 	if (!findCompressedVersion() && !findNormalVersion())
 		error("Could not open resource file '%s'", "queen.1");
 	checkJASVersion();
@@ -190,7 +190,7 @@
 }
 
 bool Resource::readTableFile(const GameVersion *gameVersion) {
-	File tableFile;
+	Common::File tableFile;
 	tableFile.open(_tableFilename);
 	if (tableFile.isOpen() && tableFile.readUint32BE() == 'QTBL') {
 		if (tableFile.readUint32BE() != CURRENT_TBL_VERSION)
@@ -214,7 +214,7 @@
 	readTableEntries(_resourceFile);
 }
 
-void Resource::readTableEntries(File *file) {
+void Resource::readTableEntries(Common::File *file) {
 	_resourceEntries = file->readUint16BE();
 	_resourceTable = new ResourceEntry[_resourceEntries];
 	for (uint16 i = 0; i < _resourceEntries; ++i) {
@@ -237,7 +237,7 @@
 	return NULL;
 }
 
-File *Resource::giveCompressedSound(const char *filename, uint32 *size) {
+Common::File *Resource::giveCompressedSound(const char *filename, uint32 *size) {
 	assert(strstr(filename, ".SB"));
 	ResourceEntry *re = resourceEntry(filename);
 	assert(re != NULL);

Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- resource.h	1 Jan 2005 16:09:09 -0000	1.42
+++ resource.h	10 May 2005 22:55:48 -0000	1.43
@@ -68,7 +68,7 @@
 	bool fileExists(const char *filename) const { return resourceEntry(filename) != NULL; }
 
 	//! returns a reference to a sound file
-	File *giveCompressedSound(const char *filename, uint32 *size);
+	Common::File *giveCompressedSound(const char *filename, uint32 *size);
 
 	bool isDemo() const { return !strcmp(_versionString, "PE100"); }
 	bool isInterview() const { return !strcmp(_versionString, "PEint"); }
@@ -114,7 +114,7 @@
 
 protected:
 
-	File *_resourceFile;
+	Common::File *_resourceFile;
 	
 	//! compression type for audio files
 	uint8 _compression;
@@ -146,7 +146,7 @@
 	void readTableCompResource();
 	
 	//! read the resource table from the specified file
-	void readTableEntries(File *file);
+	void readTableEntries(Common::File *file);
 	
 	//! detect game version based on queen.1 datafile size
 	const GameVersion *detectGameVersion(uint32 size) const;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- sound.cpp	7 Apr 2005 08:57:40 -0000	1.53
+++ sound.cpp	10 May 2005 22:55:48 -0000	1.54
@@ -200,7 +200,7 @@
 #ifdef USE_MAD
 void MP3Sound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
-	File *f = _vm->resource()->giveCompressedSound(name, &size);
+	Common::File *f = _vm->resource()->giveCompressedSound(name, &size);
 	_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeMP3Stream(f, size));
 }
 #endif
@@ -208,7 +208,7 @@
 #ifdef USE_VORBIS
 void OGGSound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
-	File *f = _vm->resource()->giveCompressedSound(name, &size);		
+	Common::File *f = _vm->resource()->giveCompressedSound(name, &size);		
 	_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeVorbisStream(f, size));
 }
 #endif
@@ -216,7 +216,7 @@
 #ifdef USE_FLAC
 void FLACSound::sfxPlay(const char *name, bool isSpeech) {
 	uint32 size;
-	File *f = _vm->resource()->giveCompressedSound(name, &size);		
+	Common::File *f = _vm->resource()->giveCompressedSound(name, &size);		
 	_mixer->playInputStream(SoundMixer::kSFXSoundType, isSpeech ? &_speechHandle : &_sfxHandle, makeFlacStream(f, size));
 }
 #endif

Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- talk.cpp	8 May 2005 21:49:43 -0000	1.115
+++ talk.cpp	10 May 2005 22:55:48 -0000	1.116
@@ -355,7 +355,7 @@
 	for (int i = 0; i < ARRAYSIZE(dogFiles); ++i) {
 		if (!scumm_stricmp(filename, dogFiles[i].filename) &&
 			_vm->resource()->getLanguage() == dogFiles[i].lang) {
-			File fdog;
+			Common::File fdog;
 			fdog.open(filename);
 			if (fdog.isOpen()) {
 				debug(6, "Loading dog file '%s' from game data path", filename);





More information about the Scummvm-git-logs mailing list