[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.38,1.39 control.cpp,1.51,1.52 credits.cpp,1.11,1.12 music.cpp,1.41,1.42 music.h,1.18,1.19 resman.cpp,1.29,1.30 resman.h,1.14,1.15 sound.h,1.18,1.19 sword1.cpp,1.85,1.86

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


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

Modified Files:
	animation.cpp control.cpp credits.cpp music.cpp music.h 
	resman.cpp resman.h sound.h sword1.cpp 
Log Message:
Moved class File and the MD5 stuff to namespace Common

Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- animation.cpp	1 May 2005 17:55:45 -0000	1.38
+++ animation.cpp	10 May 2005 22:56:21 -0000	1.39
@@ -108,7 +108,7 @@
 			// these sequences are language specific
 			char sndName[20];
 			sprintf(sndName, "%s.snd", _sequenceList[id]);
-			File *oggSource = new File();
+			Common::File *oggSource = new Common::File();
 			if (oggSource->open(sndName)) {
 				SplittedAudioStream *sStream = new SplittedAudioStream();
 				uint32 numSegs = oggSource->readUint32LE(); // number of audio segments, either 1 or 2.

Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- control.cpp	10 Apr 2005 15:13:40 -0000	1.51
+++ control.cpp	10 May 2005 22:56:21 -0000	1.52
@@ -186,7 +186,7 @@
 	_system->setPalette(palOut, 0, 256);
 	free(palOut);
 
-	File test;
+	Common::File test;
 	char fName[10];
 	uint8 textA[50];
 	sprintf(fName, "cd%d.id", SwordEngine::_systemVars.currentCD);

Index: credits.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/credits.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- credits.cpp	12 Mar 2005 18:56:07 -0000	1.11
+++ credits.cpp	10 May 2005 22:56:21 -0000	1.12
@@ -303,7 +303,7 @@
 }
 
 bool ArcFile::open(const char *name) {
-	File arc;
+	Common::File arc;
 	if (!arc.open(name))
 		return false;
 	_bufPos = _buf = (uint8*)malloc(arc.size());

Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/music.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- music.cpp	7 Apr 2005 08:42:40 -0000	1.41
+++ music.cpp	10 May 2005 22:56:21 -0000	1.42
@@ -36,11 +36,11 @@
 
 namespace Sword1 {
 
-WaveAudioStream *makeWaveStream(File *source, uint32 size) {
+WaveAudioStream *makeWaveStream(Common::File *source, uint32 size) {
 	return new WaveAudioStream(source, size);
 }
 
-WaveAudioStream::WaveAudioStream(File *source, uint32 pSize) {
+WaveAudioStream::WaveAudioStream(Common::File *source, uint32 pSize) {
 	int rate, size;
 	byte flags;
 

Index: music.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/music.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- music.h	28 Jan 2005 22:05:50 -0000	1.18
+++ music.h	10 May 2005 22:56:21 -0000	1.19
@@ -43,14 +43,14 @@
 
 class WaveAudioStream : public AudioStream {
 public:
-	WaveAudioStream(File *source, uint32 pSize);
+	WaveAudioStream(Common::File *source, uint32 pSize);
 	virtual ~WaveAudioStream();
 	virtual int readBuffer(int16 *buffer, const int numSamples);
 	virtual bool isStereo(void) const { return _isStereo; };
 	virtual bool endOfData(void) const;
 	virtual int getRate(void) const { return _rate; };
 private:
-	File	*_sourceFile;
+	Common::File	*_sourceFile;
 	uint8	*_sampleBuf;
 	uint32	 _rate;
 	bool	 _isStereo;
@@ -60,7 +60,7 @@
 
 class MusicHandle : public AudioStream {
 private:
-	File _file;
+	Common::File _file;
 	bool _looping;
 	int32 _fading;
 	int32 _fadeSamples;

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- resman.cpp	27 Apr 2005 02:16:34 -0000	1.29
+++ resman.cpp	10 May 2005 22:56:22 -0000	1.30
@@ -79,7 +79,7 @@
 }
 
 void ResMan::loadCluDescript(const char *fileName) {
-	File file;
+	Common::File file;
 	file.open(fileName);
 
 	if (!file.isOpen()) {
@@ -205,8 +205,8 @@
 void ResMan::dumpRes(uint32 id) {
 	char outn[30];
 	sprintf(outn, "DUMP%08X.BIN", id);
-	File outf;
-	if (outf.open(outn, File::kFileWriteMode)) {
+	Common::File outf;
+	if (outf.open(outn, Common::File::kFileWriteMode)) {
 		resOpen(id);
 		MemHandle *memHandle = resHandle(id);
 		outf.write(memHandle->data, memHandle->size);
@@ -253,7 +253,7 @@
 	if (memHandle->cond == MEM_FREED) { // memory has been freed
 		uint32 size = resLength(id);
 		_memMan->alloc(memHandle, size);
-		File *clusFile = resFile(id);
+		Common::File *clusFile = resFile(id);
 		assert(clusFile);
 		clusFile->seek( resOffset(id) );
 		clusFile->read( memHandle->data, size);
@@ -288,7 +288,7 @@
 	return (FrameHeader*)frameFile;
 }
 
-File *ResMan::resFile(uint32 id) {
+Common::File *ResMan::resFile(uint32 id) {
 	Clu *cluster = _prj.clu + ((id >> 24) - 1);
 	if (cluster->file == NULL) {
 		_openClus++;
@@ -298,7 +298,7 @@
 			_openCluEnd->nextOpen = cluster;
 			_openCluEnd = cluster;
 		}
-		cluster->file = new File();
+		cluster->file = new Common::File();
 		char fileName[15];
 		sprintf(fileName, "%s.CLU", _prj.clu[(id >> 24)-1].label);
 		cluster->file->open(fileName);

Index: resman.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/resman.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- resman.h	21 Feb 2005 08:15:15 -0000	1.14
+++ resman.h	10 May 2005 22:56:22 -0000	1.15
@@ -40,7 +40,7 @@
 
 struct Clu {
 	uint32 refCount;
-	File *file;
+	Common::File *file;
 	char label[MAX_LABEL_SIZE];
 	uint32 noGrp;
 	Grp *grp;
@@ -70,7 +70,7 @@
 	uint32	   resLength(uint32 id);
 	MemHandle *resHandle(uint32 id);
 	uint32     resOffset(uint32 id);
-	File      *resFile(uint32 id);
+	Common::File      *resFile(uint32 id);
 
 	void openCptResourceBigEndian(uint32 id);
 	void openScriptResourceBigEndian(uint32 id);

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sound.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- sound.h	12 Mar 2005 18:56:07 -0000	1.18
+++ sound.h	10 May 2005 22:56:22 -0000	1.19
@@ -96,7 +96,7 @@
 	void calcWaveVolume(int16 *data, uint32 length);
 	bool _waveVolume[WAVE_VOL_TAB_LENGTH];
 	uint16 _waveVolPos;
-	File		 _cowFile;
+	Common::File _cowFile;
 	uint32		 *_cowHeader;
 	uint32		 _cowHeaderSize;
 	uint8		 _currentCowFile;

Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- sword1.cpp	25 Mar 2005 17:55:57 -0000	1.85
+++ sword1.cpp	10 May 2005 22:56:22 -0000	1.86
@@ -131,14 +131,14 @@
 		warning("Sound initialization failed");
 
 	// Add default file directories
-	File::addDefaultDirectory(_gameDataPath + "CLUSTERS/");
-	File::addDefaultDirectory(_gameDataPath + "MUSIC/");
-	File::addDefaultDirectory(_gameDataPath + "SPEECH/");
-	File::addDefaultDirectory(_gameDataPath + "VIDEO/");
-	File::addDefaultDirectory(_gameDataPath + "clusters/");
-	File::addDefaultDirectory(_gameDataPath + "music/");
-	File::addDefaultDirectory(_gameDataPath + "speech/");
-	File::addDefaultDirectory(_gameDataPath + "video/");
+	Common::File::addDefaultDirectory(_gameDataPath + "CLUSTERS/");
+	Common::File::addDefaultDirectory(_gameDataPath + "MUSIC/");
+	Common::File::addDefaultDirectory(_gameDataPath + "SPEECH/");
+	Common::File::addDefaultDirectory(_gameDataPath + "VIDEO/");
+	Common::File::addDefaultDirectory(_gameDataPath + "clusters/");
+	Common::File::addDefaultDirectory(_gameDataPath + "music/");
+	Common::File::addDefaultDirectory(_gameDataPath + "speech/");
+	Common::File::addDefaultDirectory(_gameDataPath + "video/");
 }
 
 SwordEngine::~SwordEngine() {
@@ -334,7 +334,7 @@
 }
 
 void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what...
-	File test;
+	Common::File test;
 	bool fileExists[30];
 	bool isFullVersion = false; // default to demo version
 	bool missingTypes[8] = { false, false, false, false, false, false, false, false };





More information about the Scummvm-git-logs mailing list