[Scummvm-cvs-logs] SF.net SVN: scummvm:[46452] tools/branches/gsoc2009-gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Dec 21 00:02:51 CET 2009


Revision: 46452
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46452&view=rev
Author:   fingolfin
Date:     2009-12-20 23:02:50 +0000 (Sun, 20 Dec 2009)

Log Message:
-----------
TOOLS: Move class File into namespace Common

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/common/file.cpp
    tools/branches/gsoc2009-gui/common/file.h
    tools/branches/gsoc2009-gui/compress.cpp
    tools/branches/gsoc2009-gui/compress.h
    tools/branches/gsoc2009-gui/compress_agos.cpp
    tools/branches/gsoc2009-gui/compress_agos.h
    tools/branches/gsoc2009-gui/compress_gob.cpp
    tools/branches/gsoc2009-gui/compress_gob.h
    tools/branches/gsoc2009-gui/compress_kyra.cpp
    tools/branches/gsoc2009-gui/compress_kyra.h
    tools/branches/gsoc2009-gui/compress_queen.cpp
    tools/branches/gsoc2009-gui/compress_queen.h
    tools/branches/gsoc2009-gui/compress_saga.cpp
    tools/branches/gsoc2009-gui/compress_saga.h
    tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
    tools/branches/gsoc2009-gui/compress_scumm_bun.h
    tools/branches/gsoc2009-gui/compress_scumm_san.cpp
    tools/branches/gsoc2009-gui/compress_scumm_san.h
    tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
    tools/branches/gsoc2009-gui/compress_scumm_sou.h
    tools/branches/gsoc2009-gui/compress_sword1.cpp
    tools/branches/gsoc2009-gui/compress_sword1.h
    tools/branches/gsoc2009-gui/compress_sword2.cpp
    tools/branches/gsoc2009-gui/compress_sword2.h
    tools/branches/gsoc2009-gui/compress_tinsel.cpp
    tools/branches/gsoc2009-gui/compress_tinsel.h
    tools/branches/gsoc2009-gui/compress_touche.cpp
    tools/branches/gsoc2009-gui/compress_touche.h
    tools/branches/gsoc2009-gui/compress_tucker.cpp
    tools/branches/gsoc2009-gui/compress_tucker.h
    tools/branches/gsoc2009-gui/degob.cpp
    tools/branches/gsoc2009-gui/dekyra.cpp
    tools/branches/gsoc2009-gui/desword2.cpp
    tools/branches/gsoc2009-gui/encode_dxa.cpp
    tools/branches/gsoc2009-gui/encode_dxa.h
    tools/branches/gsoc2009-gui/example_tool.cpp
    tools/branches/gsoc2009-gui/extract_agos.cpp
    tools/branches/gsoc2009-gui/extract_agos.h
    tools/branches/gsoc2009-gui/extract_cine.cpp
    tools/branches/gsoc2009-gui/extract_cine.h
    tools/branches/gsoc2009-gui/extract_gob_stk.cpp
    tools/branches/gsoc2009-gui/extract_gob_stk.h
    tools/branches/gsoc2009-gui/extract_kyra.cpp
    tools/branches/gsoc2009-gui/extract_kyra.h
    tools/branches/gsoc2009-gui/extract_loom_tg16.cpp
    tools/branches/gsoc2009-gui/extract_loom_tg16.h
    tools/branches/gsoc2009-gui/extract_mm_apple.cpp
    tools/branches/gsoc2009-gui/extract_mm_apple.h
    tools/branches/gsoc2009-gui/extract_mm_c64.cpp
    tools/branches/gsoc2009-gui/extract_mm_nes.cpp
    tools/branches/gsoc2009-gui/extract_mm_nes.h
    tools/branches/gsoc2009-gui/extract_parallaction.cpp
    tools/branches/gsoc2009-gui/extract_parallaction.h
    tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
    tools/branches/gsoc2009-gui/extract_scumm_mac.h
    tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
    tools/branches/gsoc2009-gui/extract_t7g_mac.h
    tools/branches/gsoc2009-gui/extract_zak_c64.cpp
    tools/branches/gsoc2009-gui/gui/gui_tools.cpp
    tools/branches/gsoc2009-gui/gui/gui_tools.h
    tools/branches/gsoc2009-gui/gui/main.cpp
    tools/branches/gsoc2009-gui/gui/pages.cpp
    tools/branches/gsoc2009-gui/kyra_ins.cpp
    tools/branches/gsoc2009-gui/kyra_pak.cpp
    tools/branches/gsoc2009-gui/kyra_pak.h
    tools/branches/gsoc2009-gui/tool.cpp
    tools/branches/gsoc2009-gui/tool.h
    tools/branches/gsoc2009-gui/tools.cpp
    tools/branches/gsoc2009-gui/tools.h
    tools/branches/gsoc2009-gui/utils/adpcm.cpp
    tools/branches/gsoc2009-gui/utils/adpcm.h
    tools/branches/gsoc2009-gui/utils/voc.cpp
    tools/branches/gsoc2009-gui/utils/voc.h
    tools/branches/gsoc2009-gui/utils/wave.cpp
    tools/branches/gsoc2009-gui/utils/wave.h

Modified: tools/branches/gsoc2009-gui/common/file.cpp
===================================================================
--- tools/branches/gsoc2009-gui/common/file.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/common/file.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <assert.h>
 
+namespace Common {
+
 // Filenname implementation
 Filename::Filename() {
 }
@@ -484,3 +486,5 @@
 	return sz;
 }
 
+} // End of namespace Common
+

Modified: tools/branches/gsoc2009-gui/common/file.h
===================================================================
--- tools/branches/gsoc2009-gui/common/file.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/common/file.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -28,6 +28,9 @@
 
 #include "tool_exception.h"
 
+
+namespace Common {
+
 /**
  * Something unexpected happened while reading / writing to a file.
  * Usually premature end, or that it could not be opened (write / read protected).
@@ -158,7 +161,7 @@
  * Offers functionality to write words easily, and deallocates the FILE
  * automatically on destruction.
  */
-class File : public Common::NonCopyable {
+class File : public NonCopyable {
 public:
 	/**
 	 * Opens the given file path as an in/out stream, depending on the
@@ -389,4 +392,7 @@
 	uint8 _xormode;
 };
 
+} // End of namespace Common
+
+
 #endif

Modified: tools/branches/gsoc2009-gui/compress.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -247,7 +247,7 @@
 		long length;
 		char *rawData;
 
-		File inputRaw(inname, "rb");
+		Common::File inputRaw(inname, "rb");
 		length = inputRaw.size();
 		rawData = (char *)malloc(length);
 		inputRaw.read_throwsOnError(rawData, length);
@@ -259,7 +259,7 @@
 		int fmtHeaderSize, length, numChannels, sampleRate, bitsPerSample;
 		char *wavData;
 
-		File inputWav(inname, "rb");
+		Common::File inputWav(inname, "rb");
 
 		/* Standard PCM fmt header is 16 bits, but at least Simon 1 and 2 use 18 bits */
 		inputWav.seek(16, SEEK_SET);
@@ -315,7 +315,7 @@
 		ogg_packet header_comm;
 		ogg_packet header_code;
 
-		File outputOgg(outname, "wb");
+		Common::File outputOgg(outname, "wb");
 
 		vorbis_info_init(&vi);
 
@@ -562,7 +562,7 @@
 #endif
 }
 
-void CompressionTool::extractAndEncodeWAV(const char *outName, File &input, AudioFormat compMode) {
+void CompressionTool::extractAndEncodeWAV(const char *outName, Common::File &input, AudioFormat compMode) {
 	unsigned int length;
 	char fbuf[2048];
 	size_t size;
@@ -573,7 +573,7 @@
 	input.seek(-8, SEEK_CUR);
 
 	/* Copy the WAV data to a temporary file */
-	File f(outName, "wb");
+	Common::File f(outName, "wb");
 	while (length > 0) {
 		size = input.read_noThrow(fbuf, length > sizeof(fbuf) ? sizeof(fbuf) : length);
 		if (size <= 0)
@@ -587,7 +587,7 @@
 	encodeAudio(outName, false, -1, tempEncoded, compMode);
 }
 
-void CompressionTool::extractAndEncodeVOC(const char *outName, File &input, AudioFormat compMode) {
+void CompressionTool::extractAndEncodeVOC(const char *outName, Common::File &input, AudioFormat compMode) {
 	int bits;
 	int blocktype;
 	int channels;
@@ -598,7 +598,7 @@
 	size_t size;
 	int real_samplerate = -1;
 
-	File f(outName, "wb");
+	Common::File f(outName, "wb");
 
 	while ((blocktype = input.readByte())) {
 		if (blocktype != 1 && blocktype != 9) {

Modified: tools/branches/gsoc2009-gui/compress.h
===================================================================
--- tools/branches/gsoc2009-gui/compress.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -129,8 +129,8 @@
 
 	void setTempFileName();
 
-	void extractAndEncodeVOC(const char *outName, File &input, AudioFormat compMode);
-	void extractAndEncodeWAV(const char *outName, File &input, AudioFormat compMode);
+	void extractAndEncodeVOC(const char *outName, Common::File &input, AudioFormat compMode);
+	void extractAndEncodeWAV(const char *outName, Common::File &input, AudioFormat compMode);
 
 	void encodeAudio(const char *inname, bool rawInput, int rawSamplerate, const char *outname, AudioFormat compmode);
 	void encodeRaw(char *rawData, int length, int samplerate, const char *outname, AudioFormat compmode);

Modified: tools/branches/gsoc2009-gui/compress_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_agos.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_agos.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -47,7 +47,7 @@
 	_output_idx.close();
 	_output_snd.close();
 
-	File outputFile(_outputPath, "wb");
+	Common::File outputFile(_outputPath, "wb");
 
 	_input.open(TEMP_IDX, "rb");
 	while ((size = _input.read_noThrow(fbuf, 2048)) > 0) {
@@ -124,7 +124,7 @@
 
 	/* Append the converted data to the master output file */
 	sprintf(outname, "%s", tempEncoded);
-	File f(outname, "rb");
+	Common::File f(outname, "rb");
 	tot_size = 0;
 	while ((size = f.read_noThrow(fbuf, 2048)) > 0) {
 		tot_size += size;
@@ -135,7 +135,7 @@
 }
 
 
-void CompressAgos::convert_pc(Filename* inputPath) {
+void CompressAgos::convert_pc(Common::Filename* inputPath) {
 	int i, size, num;
 	uint32 filenums[32768];
 	uint32 offsets[32768];
@@ -170,7 +170,7 @@
 	}
 }
 
-void CompressAgos::convert_mac(Filename *inputPath) {
+void CompressAgos::convert_mac(Common::Filename *inputPath) {
 	int i, size, num;
 	uint32 filenums[32768];
 	uint32 offsets[32768];
@@ -223,7 +223,7 @@
 }
 
 void CompressAgos::execute() {
-	Filename inpath(_inputPaths[0].path);
+	Common::Filename inpath(_inputPaths[0].path);
 
 	if (_outputPath.empty()) {
 		_outputPath = inpath;

Modified: tools/branches/gsoc2009-gui/compress_agos.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_agos.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_agos.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,14 +36,14 @@
 protected:
 	void parseExtraArguments();
 
-	File _input, _output_idx, _output_snd;
+	Common::File _input, _output_idx, _output_snd;
 
 	void end();
 	int get_offsets(size_t maxcount, uint32 filenums[], uint32 offsets[]);
 	int get_offsets_mac(size_t maxcount, uint32 filenums[], uint32 offsets[]);
 	uint32 get_sound(uint32 offset);
-	void convert_pc(Filename* inputPath);
-	void convert_mac(Filename *inputPath);
+	void convert_pc(Common::Filename* inputPath);
+	void convert_mac(Common::Filename *inputPath);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_gob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_gob.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -65,12 +65,12 @@
 }
 
 void CompressGob::execute() {
-	File stk;
-	File gobConf;
+	Common::File stk;
+	Common::File gobConf;
 	uint16 chunkCount;
 
 
-	Filename inpath(_inputPaths[0].path);
+	Common::Filename inpath(_inputPaths[0].path);
 
 // We output with .stk extension, if there is no specific out file
 	if (_outputPath.empty()) {
@@ -108,12 +108,12 @@
  * In order to have a slightly better compression ration in some cases (Playtoons), it
  * also detects duplicate files.
  */
-CompressGob::Chunk *CompressGob::readChunkConf(File &gobConf, Filename &stkName, uint16 &chunkCount) {
+CompressGob::Chunk *CompressGob::readChunkConf(Common::File &gobConf, Common::Filename &stkName, uint16 &chunkCount) {
 	Chunk *chunks = new Chunk;
 	Chunk *curChunk = chunks;
 	Chunk *parseChunk;
-	File src1;
-	Filename srcName("");
+	Common::File src1;
+	Common::Filename srcName("");
 	char buffer[1024];
 
 	chunkCount = 1;
@@ -190,7 +190,7 @@
  *
  * This header will be overwritten just before the end of the program execution
  */
-void CompressGob::writeEmptyHeader(File &stk, uint16 chunkCount) {
+void CompressGob::writeEmptyHeader(Common::File &stk, uint16 chunkCount) {
 	for (uint32 count = 0; count < 2 + (uint32) (chunkCount * 22); count++)
 		stk.writeByte(0);
 
@@ -206,9 +206,9 @@
  * with the size of the chunk in the archive, the compression method (if modified),
  * ...
  */
-void CompressGob::writeBody(Filename *inpath, File &stk, Chunk *chunks) {
+void CompressGob::writeBody(Common::Filename *inpath, Common::File &stk, Chunk *chunks) {
 	Chunk *curChunk = chunks;
-	File src;
+	Common::File src;
 	uint32 tmpSize;
 	
 	while (curChunk) {
@@ -260,7 +260,7 @@
  * The duplicate files are defined using the same information
  * as the one of the replacement file.
 */
-void CompressGob::rewriteHeader(File &stk, uint16 chunkCount, Chunk *chunks) {
+void CompressGob::rewriteHeader(Common::File &stk, uint16 chunkCount, Chunk *chunks) {
 	uint16 i;
 	char buffer[1024];
 	Chunk *curChunk = chunks;
@@ -313,7 +313,7 @@
  *
  * This function stores a file in the STK archive
  */
-uint32 CompressGob::writeBodyStoreFile(File &stk, File &src) {
+uint32 CompressGob::writeBodyStoreFile(Common::File &stk, Common::File &src) {
 	int count;
 	char buffer[4096];
 	uint32 tmpSize = 0;
@@ -333,7 +333,7 @@
  *
  * This function compress a file in the STK archive
  */
-uint32 CompressGob::writeBodyPackFile(File &stk, File &src) {
+uint32 CompressGob::writeBodyPackFile(Common::File &stk, Common::File &src) {
 	byte dico[4114];
 	byte writeBuffer[17];
 	uint32 counter;
@@ -438,12 +438,12 @@
  * This function compares a file to another defined in a chunk. The file sizes 
  * are already tested outside the function.
  */
-bool CompressGob::filcmp(File &src1, Filename &stkName) {
+bool CompressGob::filcmp(Common::File &src1, Common::Filename &stkName) {
 	uint16 readCount;
 	bool checkFl = true;
 	char buf1[4096]; 
 	char buf2[4096];
-	File src2;
+	Common::File src2;
 
 	src1.rewind();
 	src2.open(stkName.getFullPath(), "rb");

Modified: tools/branches/gsoc2009-gui/compress_gob.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_gob.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -50,13 +50,13 @@
 
 	void parseExtraArguments();
 
-	Chunk *readChunkConf(File &gobconf, Filename &stkName, uint16 &chunkCount);
-	void writeEmptyHeader(File &stk, uint16 chunkCount);
-	void writeBody(Filename *inpath, File &stk, Chunk *chunks);
-	uint32 writeBodyStoreFile(File &stk, File &src);
-	uint32 writeBodyPackFile(File &stk, File &src);
-	void rewriteHeader(File &stk, uint16 chunkCount, Chunk *chunks);
-	bool filcmp(File &src1, Filename &stkName);
+	Chunk *readChunkConf(Common::File &gobconf, Common::Filename &stkName, uint16 &chunkCount);
+	void writeEmptyHeader(Common::File &stk, uint16 chunkCount);
+	void writeBody(Common::Filename *inpath, Common::File &stk, Chunk *chunks);
+	uint32 writeBodyStoreFile(Common::File &stk, Common::File &src);
+	uint32 writeBodyPackFile(Common::File &stk, Common::File &src);
+	void rewriteHeader(Common::File &stk, uint16 chunkCount, Chunk *chunks);
+	bool filcmp(Common::File &src1, Common::Filename &stkName);
 	bool checkDico(byte *unpacked, uint32 unpackedIndex, int32 counter, byte *dico, uint16 currIndex, uint16 &pos, uint8 &length);
 
 };

Modified: tools/branches/gsoc2009-gui/compress_kyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_kyra.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_kyra.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -39,7 +39,7 @@
 	_helptext = "\nUsage: " + getName() + " [mode params] [-o outfile] <infile>\n";
 }
 
-InspectionMatch CompressKyra::inspectInput(const Filename &filename) {
+InspectionMatch CompressKyra::inspectInput(const Common::Filename &filename) {
 	if (filename.hasExtension("VRM") ||
 		filename.hasExtension("PAK") ||
 		filename.hasExtension("TLK") ||
@@ -49,8 +49,8 @@
 }
 
 void CompressKyra::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 	outpath.setFullName(inpath.getFullName());
 
 	if (inpath == outpath)
@@ -63,7 +63,7 @@
 		processKyra3(&inpath, &outpath);
 }
 
-void CompressKyra::process(Filename *infile, Filename *outfile) {
+void CompressKyra::process(Common::Filename *infile, Common::Filename *outfile) {
 	PAKFile input, output;
 
 	if (!input.loadFile(infile->getFullPath().c_str(), false))
@@ -84,11 +84,11 @@
 			continue;
 		}
 
-		Filename outputName;
+		Common::Filename outputName;
 		input.outputFileAs(list->filename, TEMPFILE);
 		outputName._path = list->filename;
 
-		File tempFile(TEMPFILE, "rb");
+		Common::File tempFile(TEMPFILE, "rb");
 		tempFile.seek(26, SEEK_CUR);
 		extractAndEncodeVOC(TEMP_RAW, tempFile, _format);
 		tempFile.close();
@@ -118,7 +118,7 @@
 	return sample;
 }
 
-int CompressKyra::decodeChunk(File &in, File &out) {
+int CompressKyra::decodeChunk(Common::File &in, Common::File &out) {
 	uint16 size = in.readUint16LE();
 	uint16 outSize = in.readUint16LE();
 	uint32 id = in.readUint32LE();
@@ -266,7 +266,7 @@
 	byte type;
 } AUDHeader;
 
-void CompressKyra::compressAUDFile(File &input, const char *outfile) {
+void CompressKyra::compressAUDFile(Common::File &input, const char *outfile) {
 	AUDHeader header;
 
 	header.freq = input.readUint16LE();
@@ -275,7 +275,7 @@
 	header.type = input.readByte();
 	//print("%d Hz, %d bytes, type %d (%08X)\n", header.freq, header.size, header.type, header.flags);
 
-	File output(TEMP_RAW, "wb");
+	Common::File output(TEMP_RAW, "wb");
 
 	uint32 remaining = header.size;
 	while (remaining > 0)
@@ -300,17 +300,17 @@
 	return 0;
 }
 
-void CompressKyra::processKyra3(Filename *infile, Filename *outfile) {
+void CompressKyra::processKyra3(Common::Filename *infile, Common::Filename *outfile) {
 	if (infile->hasExtension("AUD")) {
 		outfile->setExtension(audio_extensions(_format));
 
-		File input(*infile, "rb");
+		Common::File input(*infile, "rb");
 
 		compressAUDFile(input, outfile->getFullPath().c_str());
 	} else if (infile->hasExtension("TLK")) {
 		PAKFile output;
 
-		File input(*infile, "rb");
+		Common::File input(*infile, "rb");
 
 		if (!output.loadFile(NULL, false))
 			return;
@@ -358,7 +358,7 @@
 	}
 }
 
-bool CompressKyra::detectKyra3File(Filename *infile) {
+bool CompressKyra::detectKyra3File(Common::Filename *infile) {
 	if (infile->hasExtension("AUD")) {
 		return true;
 	} else if (infile->hasExtension("VRM") || infile->hasExtension("PAK")) {
@@ -369,7 +369,7 @@
 		if (PAKFile::isPakFile(infile->getFullPath().c_str()))
 			return false;
 
-		File f(*infile, "rb");
+		Common::File f(*infile, "rb");
 
 		uint16 entries = f.readUint16LE();
 		uint32 entryTableSize = (entries * 8);

Modified: tools/branches/gsoc2009-gui/compress_kyra.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_kyra.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_kyra.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -31,18 +31,18 @@
 
 	virtual void execute();
 
-	virtual InspectionMatch inspectInput(const Filename &filename);
+	virtual InspectionMatch inspectInput(const Common::Filename &filename);
 
 protected:
 	struct DuplicatedFile;
 
 	uint16 clip8BitSample(int16 sample);
-	int decodeChunk(File &in, File &out);
-	void compressAUDFile(File &input, const char *outfile);
+	int decodeChunk(Common::File &in, Common::File &out);
+	void compressAUDFile(Common::File &input, const char *outfile);
 	const DuplicatedFile *findDuplicatedFile(uint32 resOffset, const DuplicatedFile *list, const uint32 maxEntries);
-	void process(Filename *infile, Filename *output);
-	void processKyra3(Filename *infile, Filename *output);
-	bool detectKyra3File(Filename *infile);
+	void process(Common::Filename *infile, Common::Filename *output);
+	void processKyra3(Common::Filename *infile, Common::Filename *output);
+	bool detectKyra3File(Common::Filename *infile);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_queen.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_queen.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_queen.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -118,7 +118,7 @@
 	return NULL;
 }
 
-void CompressQueen::fromFileToFile(File &in, File &out, uint32 amount) {
+void CompressQueen::fromFileToFile(Common::File &in, Common::File &out, uint32 amount) {
 	char fBuf[2048];
 	uint32 numRead;
 
@@ -133,16 +133,16 @@
 	}
 }
 
-void CompressQueen::createFinalFile(Filename outPath) {
+void CompressQueen::createFinalFile(Common::Filename outPath) {
 	int i;
 	uint32 dataStartOffset;
 	uint32 dataSize;
 
 	outPath.setFullName(FINAL_OUT);
 
-	File inTbl(TEMP_TBL, "rb");
-	File inData(TEMP_DAT, "rb");
-	File outFinal(outPath, "wb");
+	Common::File inTbl(TEMP_TBL, "rb");
+	Common::File inData(TEMP_DAT, "rb");
+	Common::File outFinal(outPath, "wb");
 
 	dataStartOffset = inTbl.size() + EXTRA_TBL_HEADER;
 	dataSize = inData.size();
@@ -173,13 +173,13 @@
 }
 
 void CompressQueen::execute() {
-	File inputData, inputTbl, outputTbl, outputData, compFile;
+	Common::File inputData, inputTbl, outputTbl, outputData, compFile;
 	char tmp[5];
 	int size, i = 1;
 	uint32 prevOffset;
 
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty())
 		outpath = inpath;
@@ -239,7 +239,7 @@
 			int headerSize;
 
 			/* Read in .SB */
-			File tmpFile(TEMP_SB, "wb");
+			Common::File tmpFile(TEMP_SB, "wb");
 			inputData.seek(_entry.offset, SEEK_SET);
 
 			inputData.seek(2, SEEK_CUR);
@@ -288,7 +288,7 @@
 
 				if (_version->versionString[1] == pf->lang && strcmp(pf->filename, _entry.filename) == 0) {
 					/* XXX patched data files are supposed to be in cwd */
-					File fpPatch(pf->filename, "rb");
+					Common::File fpPatch(pf->filename, "rb");
 
 					if (fpPatch.isOpen()) {
 						_entry.size = fpPatch.size();

Modified: tools/branches/gsoc2009-gui/compress_queen.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_queen.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_queen.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -57,8 +57,8 @@
 	VersionExtra _versionExtra;
 	const GameVersion *_version;
 
-	void createFinalFile(Filename outPath);
-	void fromFileToFile(File &in, File &out, uint32 amount);
+	void createFinalFile(Common::Filename outPath);
+	void fromFileToFile(Common::File &in, Common::File &out, uint32 amount);
 	const GameVersion *detectGameVersion(uint32 size);
 };
 

Modified: tools/branches/gsoc2009-gui/compress_saga.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_saga.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_saga.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -41,7 +41,7 @@
 
 // Known ITE files
 static CompressSaga::GameFileDescription ITE_GameFiles[] = {
-	//	Filename					swapEndian	md5									resourceType	frequency	stereo
+	//	Common::Filename					swapEndian	md5									resourceType	frequency	stereo
 	{"sounds.rsc",					false,		"e2ccb61c325d6d1ead3be0e731fe29fe", kSoundPCM,		22050,		false},	// PC CD/disk
 	{"sounds.rsc",					true,		"95863b89a0916941f6c5e1789843ba14", kSoundPCM,		22050,		false},	// Mac
 	{"soundsd.rsc",					false,		"95a6c148e22e99a8c243f2978223583c", kSoundPCM,		22050,		false},	// New PC demos
@@ -72,7 +72,7 @@
 
 // Known IHNM files
 static CompressSaga::GameFileDescription IHNM_GameFiles[] = {
-	//	Filename					swapEndian	md5									resourceType	frequency	stereo
+	//	Common::Filename					swapEndian	md5									resourceType	frequency	stereo
 	// FIXME: sfx.res is disabled for now, as there are issues when trying to encode it
 	//{"sfx.res",					false,		"1c610d543f32ec8b525e3f652536f269", kSoundWAV,		-1,			false},
 	{"voicess.res",					false,		"-1", 								kSoundWAV,		-1,			false},
@@ -126,7 +126,7 @@
 	_helptext = "\nUsage: " + getName() +" [mode] [mode params] [-o outputfile = infile.cmp] <inputfile>\n";
 }
 
-InspectionMatch CompressSaga::inspectInput(const Filename &filename) {
+InspectionMatch CompressSaga::inspectInput(const Common::Filename &filename) {
 	if (detectFile(&filename))
 		return IMATCH_PERFECT;
 	return IMATCH_AWFUL;
@@ -134,7 +134,7 @@
 
 // --------------------------------------------------------------------------------
 
-bool CompressSaga::detectFile(const Filename *infile) {
+bool CompressSaga::detectFile(const Common::Filename *infile) {
 	int gamesCount = ARRAYSIZE(gameDescriptions);
 	int i, j;
 	uint8 md5sum[16];
@@ -160,7 +160,7 @@
 					return true;
 				}
 			} else {			// IHNM
-				// Filename based detection, used in IHNM, as all its sound files have the
+				// Common::Filename based detection, used in IHNM, as all its sound files have the
 				// same encoding
 
 				if (scumm_stricmp(gameDescriptions[i].filesDescriptions[j].fileName, infile->getFullName().c_str()) == 0) {
@@ -177,10 +177,10 @@
 	return false;
 }
 
-uint32 CompressSaga::copyFile(const char *fromFileName, File &outputFile) {
+uint32 CompressSaga::copyFile(const char *fromFileName, Common::File &outputFile) {
 	size_t size;
 	char fbuf[2048];
-	File tempf(fromFileName, "rb");
+	Common::File tempf(fromFileName, "rb");
 
 	if (!tempf.isOpen())
 		error("Unable to open %s", fromFileName);
@@ -192,10 +192,10 @@
 	return size;
 }
 
-void CompressSaga::copyFile(File &inputFile, uint32 inputSize, const char *toFileName) {
+void CompressSaga::copyFile(Common::File &inputFile, uint32 inputSize, const char *toFileName) {
 	size_t size;
 	char fbuf[2048];
-	File tempf(toFileName, "wb");
+	Common::File tempf(toFileName, "wb");
 
 	if (!tempf.isOpen())
 		error("Unable to open %s", toFileName);
@@ -210,7 +210,7 @@
 }
 
 void CompressSaga::writeBufferToFile(uint8 *data, uint32 inputSize, const char *toFileName) {
-	File tempf(toFileName, "wb");
+	Common::File tempf(toFileName, "wb");
 	if (!tempf.isOpen())
 		error("Unable to open %s", toFileName);
 	tempf.write(data, inputSize);
@@ -230,7 +230,7 @@
 	}
 }
 
-void CompressSaga::writeHeader(File &outputFile) {
+void CompressSaga::writeHeader(Common::File &outputFile) {
 	outputFile.writeByte(compression_format(_format));
 	outputFile.writeUint16LE(_sampleRate);
 	outputFile.writeUint32LE(_sampleSize);
@@ -238,7 +238,7 @@
 	outputFile.writeByte(_sampleStereo);
 }
 
-uint32 CompressSaga::encodeEntry(File &inputFile, uint32 inputSize, File &outputFile) {
+uint32 CompressSaga::encodeEntry(Common::File &inputFile, uint32 inputSize, Common::File &outputFile) {
 	uint8 *inputData = 0;
 	byte *buffer = 0;
 	int rate, size;
@@ -333,9 +333,9 @@
 	return 0;
 }
 
-void CompressSaga::sagaEncode(Filename *inpath, Filename *outpath) {
-	File inputFile;
-	File outputFile;
+void CompressSaga::sagaEncode(Common::Filename *inpath, Common::Filename *outpath) {
+	Common::File inputFile;
+	Common::File outputFile;
 	uint32 inputFileSize;
 	uint32 resTableOffset;
 	uint32 resTableCount;
@@ -435,8 +435,8 @@
 }
 
 void CompressSaga::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.directory()) {
 		outpath.setFullName(inpath.getName());

Modified: tools/branches/gsoc2009-gui/compress_saga.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_saga.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_saga.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -46,7 +46,7 @@
 
 	virtual void execute();
 	
-	virtual InspectionMatch inspectInput(const Filename &filename);
+	virtual InspectionMatch inspectInput(const Common::Filename &filename);
 
 	// Declarations should be inside the class to prevent linker errors
 
@@ -75,13 +75,13 @@
 	uint8 _sampleBits;
 	uint8 _sampleStereo;
 
-	bool detectFile(const Filename *infile);
-	uint32 copyFile(const char *fromFileName, File &outputFile);
-	void copyFile(File &inputFile, uint32 inputSize, const char *toFileName);
+	bool detectFile(const Common::Filename *infile);
+	uint32 copyFile(const char *fromFileName, Common::File &outputFile);
+	void copyFile(Common::File &inputFile, uint32 inputSize, const char *toFileName);
 	void writeBufferToFile(uint8 *data, uint32 inputSize, const char *toFileName);
-	void writeHeader(File &outputFile);
-	uint32 encodeEntry(File &inputFile, uint32 inputSize, File &outputFile);
-	void sagaEncode(Filename *inpath, Filename *outpath);
+	void writeHeader(Common::File &outputFile);
+	uint32 encodeEntry(Common::File &inputFile, uint32 inputSize, Common::File &outputFile);
+	void sagaEncode(Common::Filename *inpath, Common::Filename *outpath);
 
 	byte compression_format(AudioFormat format);
 };

Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -714,7 +714,7 @@
 
 typedef struct { int offset, size, codec; } CompTable;
 
-byte *CompressScummBun::decompressBundleSound(int index, File  &input, int32 &finalSize) {
+byte *CompressScummBun::decompressBundleSound(int index, Common::File  &input, int32 &finalSize) {
 	byte compOutput[0x2000];
 	int i;
 
@@ -866,7 +866,7 @@
 static Region *_region;
 static int _numRegions;
 
-void CompressScummBun::writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, File &output) {
+void CompressScummBun::writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, Common::File &output) {
 	char tmpPath[200];
 
 	for (int l = 0; l < _numRegions; l++) {
@@ -916,7 +916,7 @@
 		}
 		_cbundleTable[_cbundleCurIndex].offset = startPos;
 
-		File cmpFile(tmpPath, "rb");
+		Common::File cmpFile(tmpPath, "rb");
 		cmpFile.seek(0, SEEK_END);
 		size = cmpFile.pos();
 		cmpFile.seek(0, SEEK_SET);
@@ -942,7 +942,7 @@
 	value = size;
 }
 
-void CompressScummBun::writeToRMAPFile(byte *ptr, File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels) {
+void CompressScummBun::writeToRMAPFile(byte *ptr, Common::File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels) {
 	byte *s_ptr = ptr;
 	int32 size = 0;
 	int l;
@@ -1084,13 +1084,13 @@
 }
 
 void CompressScummBun::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	uint32 tag;
 	int32 numFiles, offset;
 
-	File input(inpath, "rb");
+	Common::File input(inpath, "rb");
 
 	if (outpath.empty()) {
 		// Change extension for output
@@ -1098,7 +1098,7 @@
 		outpath.setExtension(".bun");
 	}
 
-	File output(outpath, "wb");
+	Common::File output(outpath, "wb");
 
 	output.writeUint32BE('LB23');
 	output.writeUint32BE(0); // will be later

Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -39,7 +39,7 @@
 
 protected:
 
-	File _waveTmpFile;
+	Common::File _waveTmpFile;
 	int32 _waveDataSize;
 	BundleAudioTable *_bundleTable;
 	BundleAudioTable _cbundleTable[10000]; // difficult to calculate
@@ -52,12 +52,12 @@
 	void encodeWaveWithLame(char *filename);
 	void writeWaveHeader(int s_size, int rate, int chan);
 	void writeToTempWave(char *fileName, byte *output_data, unsigned int size);
-	byte *decompressBundleSound(int index, File  &input, int32 &finalSize);
+	byte *decompressBundleSound(int index, Common::File  &input, int32 &finalSize);
 	byte *convertTo16bit(byte *ptr, int inputSize, int &outputSize, int bits, int freq, int channels);
 	void countMapElements(byte *ptr, int &numRegions, int &numJumps, int &numSyncs, int &numMarkers);
-	void writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, File &output);
+	void writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, Common::File &output);
 	void recalcRegions(int32 &value, int bits, int freq, int channels);
-	void writeToRMAPFile(byte *ptr, File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels);
+	void writeToRMAPFile(byte *ptr, Common::File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_scumm_san.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -167,7 +167,7 @@
 	}
 }
 
-void CompressScummSan::handleComiIACT(File &input, int size, const std::string &outputDir, const std::string &inputFilename) {
+void CompressScummSan::handleComiIACT(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename) {
 	input.seek(10, SEEK_CUR);
 	int bsize = size - 18;
 	byte output_data[0x1000];
@@ -322,7 +322,7 @@
 	int l, r, z;
 
 	const std::string wavPath = outputDir + "/" + inputFilename + ".wav";
-	File &wavFile(_waveTmpFile);
+	Common::File &wavFile(_waveTmpFile);
 
 	wavFile.open(wavPath.c_str(), "wb+");
 
@@ -398,7 +398,7 @@
 	_waveDataSize = frames * frameAudioSize;
 }
 
-void CompressScummSan::handleMapChunk(AudioTrackInfo *audioTrack, File &input) {
+void CompressScummSan::handleMapChunk(AudioTrackInfo *audioTrack, Common::File &input) {
 	uint32 tag;
 	int32 size;
 	tag = input.readUint32BE();
@@ -450,7 +450,7 @@
 	assert(tag == 'DATA');
 }
 
-int32 CompressScummSan::handleSaudChunk(AudioTrackInfo *audioTrack, File &input) {
+int32 CompressScummSan::handleSaudChunk(AudioTrackInfo *audioTrack, Common::File &input) {
 	uint32 tag;
 	int32 size;
 	tag = input.readUint32BE();
@@ -466,7 +466,7 @@
 	return size;
 }
 
-void CompressScummSan::handleAudioTrack(int index, int trackId, int frame, int nbframes, File &input, const std::string &outputDir,
+void CompressScummSan::handleAudioTrack(int index, int trackId, int frame, int nbframes, Common::File &input, const std::string &outputDir,
 					  const std::string &inputFilename, int &size, int volume, int pan, bool iact) {
 	AudioTrackInfo *audioTrack = NULL;
 	if (index == 0) {
@@ -533,7 +533,7 @@
 	}
 }
 
-void CompressScummSan::handleDigIACT(File &input, int size, const std::string &outputDir, const std::string &inputFilename,int flags, int track_flags, int frame) {
+void CompressScummSan::handleDigIACT(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename,int flags, int track_flags, int frame) {
 	int track = input.readUint16LE();
 	int index = input.readUint16LE();
 	int nbframes = input.readUint16LE();
@@ -564,7 +564,7 @@
 	handleAudioTrack(index, trackId, frame, nbframes, input, outputDir, inputFilename, size, volume, pan, true);
 }
 
-void CompressScummSan::handlePSAD(File &input, int size, const std::string &outputDir, const std::string &inputFilename, int frame) {
+void CompressScummSan::handlePSAD(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename, int frame) {
 	int trackId = input.readUint16LE();
 	int index = input.readUint16LE();
 	int nbframes = input.readUint16LE();
@@ -594,8 +594,8 @@
 	if (_format == AUDIO_FLAC)
 		error("Only ogg vorbis and MP3 are supported for this tool.");
 
-	Filename inpath(_inputPaths[0].path);
-	Filename outpath(_outputPath);
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename outpath(_outputPath);
 
 	// We default to the current directory.
 	// TODO: We shouldn't have to do this, an empty output path *should* work
@@ -615,13 +615,13 @@
 	// (This check won't catch all cases of this, but it's better than nothing.)
 	assert(inpath.getFullPath() != outpath.getFullPath());
 
-	File input(inpath, "rb");
-	File output(outpath, "wb");
+	Common::File input(inpath, "rb");
+	Common::File output(outpath, "wb");
 
-	Filename flupath(inpath);
+	Common::Filename flupath(inpath);
 	flupath.setExtension(".flu");
 
-	File flu_in;
+	Common::File flu_in;
 	
 	try {
 		flu_in.open(flupath, "rb");
@@ -629,7 +629,7 @@
 		// pass
 	}
 
-	File flu_out;
+	Common::File flu_out;
 	if (flu_in.isOpen()) {
 		flupath = outpath;
 		flupath.setExtension(".flu");

Modified: tools/branches/gsoc2009-gui/compress_scumm_san.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -51,7 +51,7 @@
 		bool stereo;
 		int freq;
 		bool used;
-		File file;
+		Common::File file;
 		int waveDataSize;
 		int *volumes;
 		int *pans;
@@ -65,7 +65,7 @@
 protected:
 	byte _IACToutput[0x1000];
 	int _IACTpos;
-	File _waveTmpFile;
+	Common::File _waveTmpFile;
 	int32 _waveDataSize;
 	AudioTrackInfo _audioTracks[COMPRESS_SCUMM_SAN_MAX_TRACKS];
 
@@ -74,18 +74,18 @@
 	void writeWaveHeader(int s_size);
 	void writeToTempWaveFile(const std::string &fileName, byte *output_data, unsigned int size);
 	void decompressComiIACT(const std::string &fileName, byte *output_data, byte *d_src, int bsize);
-	void handleComiIACT(File &input, int size, const std::string &outputDir, const std::string &inputFilename);
+	void handleComiIACT(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename);
 	AudioTrackInfo *allocAudioTrack(int trackId, int frame);
 	AudioTrackInfo *findAudioTrack(int trackId);
 	void flushTracks(int frame);
 	void prepareForMixing(const std::string &outputDir, const std::string &inputFilename);
 	void mixing(const std::string &outputDir, const std::string &inputFilename, int frames, int fps);
-	void handleMapChunk(AudioTrackInfo *audioTrack, File &input);
-	int32 handleSaudChunk(AudioTrackInfo *audioTrack, File &input);
-	void handleAudioTrack(int index, int trackId, int frame, int nbframes, File &input, const std::string &outputDir,
+	void handleMapChunk(AudioTrackInfo *audioTrack, Common::File &input);
+	int32 handleSaudChunk(AudioTrackInfo *audioTrack, Common::File &input);
+	void handleAudioTrack(int index, int trackId, int frame, int nbframes, Common::File &input, const std::string &outputDir,
 		const std::string &inputFilename, int &size, int volume, int pan, bool iact);
-	void handleDigIACT(File &input, int size, const std::string &outputDir, const std::string &inputFilename,int flags, int track_flags, int frame);
-	void handlePSAD(File &input, int size, const std::string &outputDir, const std::string &inputFilename, int frame);
+	void handleDigIACT(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename,int flags, int track_flags, int frame);
+	void handlePSAD(Common::File &input, int size, const std::string &outputDir, const std::string &inputFilename, int frame);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -54,7 +54,7 @@
 	_output_idx.open(_outputPath, "wb");
 	_output_idx.writeUint32BE((uint32)idx_size);
 
-	File in(TEMP_IDX, "rb");
+	Common::File in(TEMP_IDX, "rb");
 	while ((size = in.read_noThrow(buf, 2048)) > 0) {
 		_output_idx.write(buf, size);
 	}
@@ -96,7 +96,7 @@
 			pos++;
 			append_byte(4, buf);
 		}
-	} catch (FileException &) {
+	} catch (Common::FileException &) {
 		// EOF reached
 		return false;
 	}
@@ -126,7 +126,7 @@
 	extractAndEncodeVOC(TEMP_RAW, _input, _format);
 
 	/* Append the converted data to the master output file */
-	File f(tempEncoded, "rb");
+	Common::File f(tempEncoded, "rb");
 	tot_size = 0;
 	while ((size = f.read_noThrow(buf, 2048)) > 0) {
 		tot_size += size;
@@ -151,8 +151,8 @@
 void CompressScummSou::execute() {
 	char buf[2048];
 
-	Filename inpath(_inputPaths[0].path);
-	//Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	//Common::Filename &outpath = _outputPath;
 
 	if (_outputPath.directory())
 		_outputPath.setFullName(getOutputName());

Modified: tools/branches/gsoc2009-gui/compress_scumm_sou.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -32,7 +32,7 @@
 	virtual void execute();
 
 protected:
-	File _input, _output_idx, _output_snd;
+	Common::File _input, _output_idx, _output_snd;
 
 	std::string getOutputName() const;
 	void end_of_file();

Modified: tools/branches/gsoc2009-gui/compress_sword1.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_sword1.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -308,7 +308,7 @@
 	{ "RM3D", false }
 };
 
-int16 *CompressSword1::uncompressSpeech(File &clu, uint32 idx, uint32 cSize, uint32 *returnSize) {
+int16 *CompressSword1::uncompressSpeech(Common::File &clu, uint32 idx, uint32 cSize, uint32 *returnSize) {
 	uint32 resSize, srcPos;
 	int16 *srcData, *dstData, *dstPos;
 	uint32 headerPos = 0;
@@ -355,7 +355,7 @@
 	uint8 *resBuf;
 
 	uint32 size;
-	File temp(TEMP_RAW, "wb");
+	Common::File temp(TEMP_RAW, "wb");
 	size = temp.write(rawData, rawSize);
 	assert(size == rawSize);
 	encodeAudio(TEMP_RAW, true, 11025, _audioOuputFilename.c_str(), _format);
@@ -368,7 +368,7 @@
 	return resBuf;
 }
 
-void CompressSword1::convertClu(File &clu, File &cl3) {
+void CompressSword1::convertClu(Common::File &clu, Common::File &cl3) {
 	uint32 *cowHeader;
 	uint32 numRooms;
 	uint32 numSamples;
@@ -434,8 +434,8 @@
 	free(cowHeader);
 }
 
-void CompressSword1::compressSpeech(const Filename *inpath, const Filename *outpath) {
-	File clu, cl3;
+void CompressSword1::compressSpeech(const Common::Filename *inpath, const Common::Filename *outpath) {
+	Common::File clu, cl3;
 	int i;
 	char cluName[256], outName[256];
 
@@ -448,7 +448,7 @@
 		sprintf(cluName, "%s/SPEECH/SPEECH%d.CLU", inpath->getPath().c_str(), i);
 		try {
 			clu.open(cluName, "rb");
-		} catch(FileException &) {
+		} catch (Common::FileException &) {
 			print("Unable to open \"SPEECH%d.CLU\".\n", i);
 			print("Please copy the \"SPEECH.CLU\" from CD %d\nand rename it to \"SPEECH%d.CLU\".\n", i, i);
 			continue;
@@ -481,7 +481,7 @@
 	unlink(_audioOuputFilename.c_str());
 }
 
-void CompressSword1::compressMusic(const Filename *inpath, const Filename *outpath) {
+void CompressSword1::compressMusic(const Common::Filename *inpath, const Common::Filename *outpath) {
 	int i;
 	char fNameIn[256], fNameOut[256];
 
@@ -491,7 +491,7 @@
 
 		sprintf(fNameIn, "%s/MUSIC/%s.WAV", inpath->getPath().c_str(), musicNames[i].fileName);
 		try {
-			File inf(fNameIn, "rb");
+			Common::File inf(fNameIn, "rb");
 
 			switch (_format) {
 			case AUDIO_MP3:
@@ -509,13 +509,13 @@
 
 			print("encoding file (%3d/%d) %s -> %s\n", i + 1, TOTAL_TUNES, musicNames[i].fileName, fNameOut);
 			encodeAudio(fNameIn, false, -1, fNameOut, _format);
-		} catch(FileException& err) {
+		} catch (Common::FileException& err) {
 			print(err.what());
 		}
 	}
 }
 
-void CompressSword1::checkFilesExist(bool checkSpeech, bool checkMusic, const Filename *inpath) {
+void CompressSword1::checkFilesExist(bool checkSpeech, bool checkMusic, const Common::Filename *inpath) {
 	int i;
 	FILE *testFile;
 	char fileName[256];
@@ -596,8 +596,8 @@
 }
 
 void CompressSword1::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	switch (_format) {
 	case AUDIO_MP3:

Modified: tools/branches/gsoc2009-gui/compress_sword1.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_sword1.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -39,12 +39,12 @@
 
 	std::string _audioOuputFilename;
 
-	int16 *uncompressSpeech(File &clu, uint32 idx, uint32 cSize, uint32 *returnSize);
+	int16 *uncompressSpeech(Common::File &clu, uint32 idx, uint32 cSize, uint32 *returnSize);
 	uint8 *convertData(uint8 *rawData, uint32 rawSize, uint32 *resSize);
-	void convertClu(File &clu, File &cl3);
-	void compressSpeech(const Filename *inpath, const Filename *outpath);
-	void compressMusic(const Filename *inpath, const Filename *outpath);
-	void checkFilesExist(bool checkSpeech, bool checkMusic, const Filename *inpath);
+	void convertClu(Common::File &clu, Common::File &cl3);
+	void compressSpeech(const Common::Filename *inpath, const Common::Filename *outpath);
+	void compressMusic(const Common::Filename *inpath, const Common::Filename *outpath);
+	void checkFilesExist(bool checkSpeech, bool checkMusic, const Common::Filename *inpath);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_sword2.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword2.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_sword2.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -25,12 +25,12 @@
 #define TEMP_IDX	"tempfile.idx"
 #define TEMP_DAT	"tempfile.dat"
 
-uint32 CompressSword2::append_to_file(File &f1, const char *filename) {
+uint32 CompressSword2::append_to_file(Common::File &f1, const char *filename) {
 	uint32 length, orig_length;
 	size_t size;
 	char fbuf[2048];
 
-	File f2(filename, "rb");
+	Common::File f2(filename, "rb");
 	orig_length = length = f2.size();
 
 	while (length > 0) {
@@ -66,8 +66,8 @@
 	uint32 totalSize;
 	uint32 length;
 	
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	switch (_format) {
 	case AUDIO_MP3:
@@ -119,7 +119,7 @@
 		if (pos != 0 && length != 0) {
 			uint16 prev;
 
-			File f(TEMP_WAV, "wb");
+			Common::File f(TEMP_WAV, "wb");
 
 			/*
 			 * The number of decodeable 16-bit samples is one less
@@ -187,7 +187,7 @@
 		}
 	}
 
-	File output(outpath, "wb");
+	Common::File output(outpath, "wb");
 
 	append_to_file(output, TEMP_IDX);
 	append_to_file(output, TEMP_DAT);

Modified: tools/branches/gsoc2009-gui/compress_sword2.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword2.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_sword2.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -33,10 +33,10 @@
 
 protected:
 
-	File _input, _output_snd, _output_idx;
+	Common::File _input, _output_snd, _output_idx;
 	std::string _audioOutputFilename;
 	
-	uint32 append_to_file(File &f1, const char *filename);
+	uint32 append_to_file(Common::File &f1, const char *filename);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_tinsel.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_tinsel.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_tinsel.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -69,7 +69,7 @@
 	uint32 copyLeft = 0;
 	uint32 doneRead = 0;
 	char buffer[2048];
-	File curFileHandle;
+	Common::File curFileHandle;
 
 	print("Assuming DW1 sample being 8-bit raw...\n");
 
@@ -142,7 +142,7 @@
 	uint32 copyLeft = 0;
 	uint32 doneRead = 0;
 	char buffer[2048];
-	File curFileHandle;
+	Common::File curFileHandle;
 
 	print("Assuming DW2 sample using ADPCM 6-bit, decoding to 16-bit raw...\n");
 
@@ -261,8 +261,8 @@
 	uint32 sampleSize = 0;
 	uint32 sampleCount = 0;
 
-	Filename inpath_smp = _inputPaths[0].path;
-	Filename inpath_idx = _inputPaths[1].path;
+	Common::Filename inpath_smp = _inputPaths[0].path;
+	Common::Filename inpath_idx = _inputPaths[1].path;
 
 	_input_idx.open(inpath_idx, "rb");
 	_input_smp.open(inpath_smp, "rb");

Modified: tools/branches/gsoc2009-gui/compress_tinsel.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_tinsel.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_tinsel.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -32,7 +32,7 @@
 	virtual void execute();
 
 protected:
-	File _input_idx, _input_smp, _output_idx, _output_smp;
+	Common::File _input_idx, _input_smp, _output_idx, _output_smp;
 
 	void convertTinselRawSample(uint32 sampleSize);
 	void convertTinselADPCMSample(uint32 sampleSize);

Modified: tools/branches/gsoc2009-gui/compress_touche.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_touche.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_touche.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -51,9 +51,9 @@
 	_helptext = "\nUsage: " + getName() + " [params] [-o outputfile TOUCHE.*] <inputdir>\n* differs with compression type.\n" + _shorthelp + "\n";
 }
 
-InspectionMatch CompressTouche::inspectInput(const Filename &filename) {
+InspectionMatch CompressTouche::inspectInput(const Common::Filename &filename) {
 	// We don't care for the actual file, just what's in this directory
-	Filename probe(filename);
+	Common::Filename probe(filename);
 
 	probe.setFullName("TOUCHE.DAT");
 	if (probe.exists())
@@ -62,7 +62,7 @@
 	return IMATCH_AWFUL;
 }
 
-uint32 CompressTouche::compress_sound_data_file(uint32 current_offset, File &output, File &input, uint32 *offs_table, uint32 *size_table, int len) {
+uint32 CompressTouche::compress_sound_data_file(uint32 current_offset, Common::File &output, Common::File &input, uint32 *offs_table, uint32 *size_table, int len) {
 	int i, size;
 	uint8 buf[2048];
 	uint32 start_offset = current_offset;
@@ -91,7 +91,7 @@
 			extractAndEncodeVOC(TEMP_RAW, input, _format);
 
 			/* append converted data to output file */
-			File temp(tempEncoded, "rb");
+			Common::File temp(tempEncoded, "rb");
 
 			size_table[i] = 0;
 
@@ -116,12 +116,12 @@
 	return current_offset;
 }
 
-void CompressTouche::compress_sound_data(Filename *inpath, Filename *outpath) {
+void CompressTouche::compress_sound_data(Common::Filename *inpath, Common::Filename *outpath) {
 	int i;
 	uint32 current_offset;
 	uint32 offsets_table[MAX_OFFSETS];
 
-	File output(*outpath, "wb");
+	Common::File output(*outpath, "wb");
 
 	output.writeUint16LE(1); /* current version */
 	output.writeUint16LE(0); /* flags */
@@ -137,7 +137,7 @@
 
 	/* process 'OBJ' file */
 	inpath->setFullName("OBJ");
-	File input(*inpath, "rb");
+	Common::File input(*inpath, "rb");
 
 	offsets_table[0] = current_offset;
 	current_offset = compress_sound_data_file(current_offset, output, input, input_OBJ_offs, input_OBJ_size, OBJ_HDR_LEN);
@@ -179,8 +179,8 @@
 }
 
 void CompressTouche::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty()) {
 		switch(_format) {

Modified: tools/branches/gsoc2009-gui/compress_touche.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_touche.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_touche.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -31,12 +31,12 @@
 
 	virtual void execute();
 
-	virtual InspectionMatch inspectInput(const Filename &filename);
+	virtual InspectionMatch inspectInput(const Common::Filename &filename);
 
 protected:
 
-	uint32 compress_sound_data_file(uint32 current_offset, File &output, File &input, uint32 *offs_table, uint32 *size_table, int len);
-	void compress_sound_data(Filename *inpath, Filename *outpath);
+	uint32 compress_sound_data_file(uint32 current_offset, Common::File &output, Common::File &input, uint32 *offs_table, uint32 *size_table, int len);
+	void compress_sound_data(Common::Filename *inpath, Common::Filename *outpath);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/compress_tucker.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_tucker.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_tucker.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -53,11 +53,11 @@
 	_helptext = "\nUsage: " + getName() + " [mode params] [-o outputdir] inputdir\n";
 }
 
-int CompressTucker::append_compress_file(File &output) {
+int CompressTucker::append_compress_file(Common::File &output) {
 	char buf[2048];
 	int sz, compress_sz = 0;
 
-	File input_temp(tempEncoded, "rb");
+	Common::File input_temp(tempEncoded, "rb");
 	while ((sz = input_temp.read_noThrow(buf, sizeof(buf))) > 0) {
 		if ((sz = output.write(buf, sz)) > 0) {
 			compress_sz += sz;
@@ -66,7 +66,7 @@
 	return compress_sz;
 }
 
-int CompressTucker::compress_file_wav(File &input, File &output) {
+int CompressTucker::compress_file_wav(Common::File &input, Common::File &output) {
 	char buf[8];
 
 	if (input.read_noThrow(buf, 8) == 8 && memcmp(buf, "RIFF", 4) == 0) {
@@ -76,7 +76,7 @@
 	return 0;
 }
 
-int CompressTucker::compress_file_raw(const char *input, bool is16, File &output) {
+int CompressTucker::compress_file_raw(const char *input, bool is16, Common::File &output) {
 	if (is16) {
 		setRawAudioType(true, false, 16);
 	} else {
@@ -104,20 +104,20 @@
 	{ "SPEECH", "sam%04d.wav", MAX_SPEECH_FILES }
 };
 
-uint32 CompressTucker::compress_sounds_directory(const Filename *inpath, const Filename *outpath, File &output, const struct SoundDirectory *dir) {
+uint32 CompressTucker::compress_sounds_directory(const Common::Filename *inpath, const Common::Filename *outpath, Common::File &output, const struct SoundDirectory *dir) {
 	char filepath[1024];
 	char *filename;
 	//struct stat s;
 	int i, pos;
 	uint32 current_offset;
-	File input;
+	Common::File input;
 
 	assert(dir->count <= ARRAYSIZE(temp_table));
 
 	// We can't use setFullName since dir->name can contain '/'
 	snprintf(filepath, sizeof(filepath), "%s/%s", inpath->getPath().c_str(), dir->name);
 	/* stat is NOT standard C, but rather a POSIX call and fails under MSVC
-	 * this could be factored out to Filename::isDirectory ?
+	 * this could be factored out to Common::Filename::isDirectory ?
 	if (stat(filepath, &s) != 0 || !S_ISDIR(s.st_mode)) {
 		error("Cannot stat directory '%s'", filepath);
 	}
@@ -303,7 +303,7 @@
 	2, 1
 };
 
-uint32 CompressTucker::compress_audio_directory(const Filename *inpath, const Filename *outpath, File &output) {
+uint32 CompressTucker::compress_audio_directory(const Common::Filename *inpath, const Common::Filename *outpath, Common::File &output) {
 	char filepath[1024];
 	int i, pos, count;
 	uint32 current_offset;
@@ -323,7 +323,7 @@
 		sprintf(filepath, "%s/audio/%s", inpath->getPath().c_str(), audio_files_list[i]);
 		
 		try {
-			File input(filepath, "rb");
+			Common::File input(filepath, "rb");
 			
 			switch (audio_formats_table[i]) {
 			case 1:
@@ -356,14 +356,14 @@
 	return current_offset + count * 8;
 }
 
-void CompressTucker::compress_sound_files(const Filename *inpath, const Filename *outpath) {
+void CompressTucker::compress_sound_files(const Common::Filename *inpath, const Common::Filename *outpath) {
 	int i;
 	uint32 current_offset;
 	uint32 sound_directory_size[SOUND_TYPES_COUNT];
 	uint32 audio_directory_size;
 	const uint16 flags = HEADER_FLAG_AUDIO_INTRO;
 
-	File output(*outpath, "wb");
+	Common::File output(*outpath, "wb");
 
 	output.writeUint16LE(CURRENT_VER);
 	output.writeUint16LE(flags);
@@ -420,8 +420,8 @@
 
 
 void CompressTucker::execute() {
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	// Default out is same as in directory, file names differ by extension
 	if (outpath.empty()) {

Modified: tools/branches/gsoc2009-gui/compress_tucker.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_tucker.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/compress_tucker.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -33,13 +33,13 @@
 
 protected:
 
-	int append_compress_file(File &output);
-	int compress_file_wav(File &input, File &output);
-	int compress_file_raw(const char *input, bool is16, File &output);
-	uint32 compress_sounds_directory(const Filename *inpath, const Filename *outpath, File &output, const struct SoundDirectory *dir);
-	uint32 compress_audio_directory(const Filename *inpath, const Filename *outpath, File &output);
-	void compress_sound_data(Filename *inpath, Filename *outpath);
-	void compress_sound_files(const Filename *inpath, const Filename *outpath);
+	int append_compress_file(Common::File &output);
+	int compress_file_wav(Common::File &input, Common::File &output);
+	int compress_file_raw(const char *input, bool is16, Common::File &output);
+	uint32 compress_sounds_directory(const Common::Filename *inpath, const Common::Filename *outpath, Common::File &output, const struct SoundDirectory *dir);
+	uint32 compress_audio_directory(const Common::Filename *inpath, const Common::Filename *outpath, Common::File &output);
+	void compress_sound_data(Common::Filename *inpath, Common::Filename *outpath);
+	void compress_sound_files(const Common::Filename *inpath, const Common::Filename *outpath);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/degob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/degob.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/degob.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -148,7 +148,7 @@
 }
 
 byte *readFile(const char *filename, uint32 &size) {
-	File f(filename, "rb");
+	Common::File f(filename, "rb");
 	if (!f.isOpen())
 		error("Couldn't open file \"%s\"", filename);
 

Modified: tools/branches/gsoc2009-gui/dekyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/dekyra.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/dekyra.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -188,7 +188,7 @@
 }
 
 bool Script::loadScript(const char *filename, ScriptData *scriptData, OpcodeEntry *opcodes, int opcodeSize) {
-	File scriptFile(filename, "rb");
+	Common::File scriptFile(filename, "rb");
 
 	if (!scriptFile.isOpen()) {
 		error("couldn't load file '%s'", filename);

Modified: tools/branches/gsoc2009-gui/desword2.cpp
===================================================================
--- tools/branches/gsoc2009-gui/desword2.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/desword2.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -273,7 +273,7 @@
 }
 
 int entry(int argc, char *argv[]) {
-	File in;
+	Common::File in;
 	uint8 type;
 	char name[34];
 	int32 size;

Modified: tools/branches/gsoc2009-gui/encode_dxa.cpp
===================================================================
--- tools/branches/gsoc2009-gui/encode_dxa.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/encode_dxa.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -48,7 +48,7 @@
 
 class DxaEncoder {
 private:
-	File _dxa;
+	Common::File _dxa;
 	int _width, _height, _framerate, _framecount, _workheight;
 	uint8 *_prevframe, *_prevpalette;
 	ScaleMode _scaleMode;
@@ -63,14 +63,14 @@
 	uLong m13encode(byte *frame, byte *outbuf);
 
 public:
-	DxaEncoder(Tool &tool, Filename filename, int width, int height, int framerate, ScaleMode scaleMode);
+	DxaEncoder(Tool &tool, Common::Filename filename, int width, int height, int framerate, ScaleMode scaleMode);
 	~DxaEncoder();
 	void writeHeader();
 	void writeNULL();
 	void writeFrame(uint8 *frame, uint8 *palette);
 };
 
-DxaEncoder::DxaEncoder(Tool &tool, Filename filename, int width, int height, int framerate, ScaleMode scaleMode) {
+DxaEncoder::DxaEncoder(Tool &tool, Common::Filename filename, int width, int height, int framerate, ScaleMode scaleMode) {
 	_dxa.open(filename, "wb");
 	_width = width;
 	_height = height;
@@ -552,15 +552,15 @@
 void EncodeDXA::execute() {
 	int width, height, framerate, frames;
 	ScaleMode scaleMode;
-	Filename inpath(_inputPaths[0].path);
-	Filename outpath(_outputPath);
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename outpath(_outputPath);
 	
 	if (outpath.empty())
 		// Actual change of extension is done later...
 		outpath = inpath;
 
 	// check if the wav file exists.
-	Filename wavpath(inpath);
+	Common::Filename wavpath(inpath);
 	wavpath.setExtension(".wav");
 	struct stat statinfo;
 	if (!stat(wavpath.getFullPath().c_str(), &statinfo)) {
@@ -648,7 +648,7 @@
 	int number_of_passes;
 	png_bytep *row_pointers;
 
-	File fp(filename, "rb");
+	Common::File fp(filename, "rb");
 
 	fp.read_throwsOnError(header, 8);
 	if (png_sig_cmp(header, 0, 8))
@@ -714,9 +714,9 @@
 	return 0;
 }
 
-void EncodeDXA::readVideoInfo(Filename *filename, int &width, int &height, int &framerate, int &frames, ScaleMode &scaleMode) {
+void EncodeDXA::readVideoInfo(Common::Filename *filename, int &width, int &height, int &framerate, int &frames, ScaleMode &scaleMode) {
 
-	File smk(*filename, "rb");
+	Common::File smk(*filename, "rb");
 
 	scaleMode = S_NONE;
 
@@ -759,7 +759,7 @@
 	}
 }
 
-void EncodeDXA::convertWAV(const Filename *inpath, const Filename* outpath) {
+void EncodeDXA::convertWAV(const Common::Filename *inpath, const Common::Filename* outpath) {
 	print("Encoding audio...");
 	fflush(stdout);
 

Modified: tools/branches/gsoc2009-gui/encode_dxa.h
===================================================================
--- tools/branches/gsoc2009-gui/encode_dxa.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/encode_dxa.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -42,8 +42,8 @@
 
 protected:
 
-	void convertWAV(const Filename *inpath, const Filename* outpath);
-	void readVideoInfo(Filename *filename, int &width, int &height, int &framerate, int &frames, ScaleMode &scaleMode);
+	void convertWAV(const Common::Filename *inpath, const Common::Filename* outpath);
+	void readVideoInfo(Common::Filename *filename, int &width, int &height, int &framerate, int &frames, ScaleMode &scaleMode);
 	int read_png_file(const char* filename, unsigned char *&image, unsigned char *&palette, int &width, int &height);
 };
 

Modified: tools/branches/gsoc2009-gui/example_tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/example_tool.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/example_tool.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -112,8 +112,8 @@
 	// It writes the of each file 100 times into X files, where X is the input file size.
 
 	// _inputPaths[0].path is always valid and contains the correct path, same for 1
-	Filename inpath1(_inputPaths[0].path);
-	Filename inpath2(_inputPaths[1].path);
+	Common::Filename inpath1(_inputPaths[0].path);
+	Common::Filename inpath2(_inputPaths[1].path);
 
 	// We always need to setup default output path, since there is no obligation to specify it
 	// If you don't do this, the OS will usually default to the working directory, if we output a file

Modified: tools/branches/gsoc2009-gui/extract_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_agos.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_agos.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -41,7 +41,7 @@
 // Run the actual tool
 void ExtractAgos::execute() {
 	// Loop through all input files
-	Filename infilename(_inputPaths[0].path);
+	Common::Filename infilename(_inputPaths[0].path);
 
 	uint8 *x = (uint8 *)loadfile(infilename);
 
@@ -181,8 +181,8 @@
  *
  * @param name The name of the file to be loaded
  */
-void *ExtractAgos::loadfile(const Filename &name) {
-	File file(name, "rb");
+void *ExtractAgos::loadfile(const Common::Filename &name) {
+	Common::File file(name, "rb");
 
 	// Using global here is not pretty
 	_filelen = file.size();
@@ -202,8 +202,8 @@
  * @param mem Where to get data from
  * @param length How many bytes to write
  */
-void ExtractAgos::savefile(const Filename &name, void *mem, size_t length) {
-	File file(name, "wb");
+void ExtractAgos::savefile(const Common::Filename &name, void *mem, size_t length) {
+	Common::File file(name, "wb");
 	file.write(mem, length);
 }
 

Modified: tools/branches/gsoc2009-gui/extract_agos.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_agos.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_agos.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,8 +36,8 @@
 
 	int simon_decr(uint8 *src, uint8 *dest, uint32 srclen);
 	uint32 simon_decr_length(uint8 *src, uint32 srclen);
-	void *loadfile(const Filename &name);
-	void savefile(const Filename &name, void *mem, size_t length);
+	void *loadfile(const Common::Filename &name);
+	void savefile(const Common::Filename &name, void *mem, size_t length);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_cine.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_cine.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_cine.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -175,7 +175,7 @@
 
 ////////////////////////////////////////////////////////////////////////////
 
-void ExtractCine::unpackFile(File &file) {
+void ExtractCine::unpackFile(Common::File &file) {
 	char fileName[15];
 
 	unsigned int entryCount = file.readUint16BE(); // How many entries?
@@ -185,7 +185,7 @@
 		file.read_throwsOnError(fileName, 14);
 		fileName[14] = '\0';
 
-		Filename outPath(_outputPath);
+		Common::Filename outPath(_outputPath);
 		outPath.setFullName(fileName);
 		
 		uint32 offset = file.readUint32BE();
@@ -197,7 +197,7 @@
 
 		print("unpacking '%s' ... ", outPath.getFullName().c_str());
 
-		File fpOut(outPath, "wb");
+		Common::File fpOut(outPath, "wb");
 
 		file.seek(offset, SEEK_SET);
 		assert(unpackedSize >= packedSize);
@@ -250,8 +250,8 @@
 	}
 }
 
-void ExtractCine::unpackAllResourceFiles(const Filename &filename) {
-	File f(filename, "rb");
+void ExtractCine::unpackAllResourceFiles(const Common::Filename &filename) {
+	Common::File f(filename, "rb");
 
 	uint32 unpackedSize, packedSize;
 	{
@@ -286,7 +286,7 @@
 		memcpy(resourceFileName, &buf[4 + i * entrySize], 8);
 		resourceFileName[8] = 0;
 		
-		File fpResFile(resourceFileName, "rb");
+		Common::File fpResFile(resourceFileName, "rb");
 		print("--- Unpacking resource file %s:\n", resourceFileName);
 		unpackFile(fpResFile);
 	}
@@ -295,7 +295,7 @@
 }
 
 void ExtractCine::execute() {
-	Filename infilename(_inputPaths[0].path);
+	Common::Filename infilename(_inputPaths[0].path);
 
 	std::string fname = infilename.getFullName();
 	std::transform(fname.begin(), fname.end(), fname.begin(), toupper);
@@ -305,7 +305,7 @@
 		unpackAllResourceFiles(infilename);
 	} else {
 		/* Unpack a single archive file */
-		File f(infilename, "rb");
+		Common::File f(infilename, "rb");
 
 		unpackFile(f);
 	}

Modified: tools/branches/gsoc2009-gui/extract_cine.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_cine.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_cine.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -114,9 +114,9 @@
 	virtual void execute();
 
 protected:
-	void unpackFile(File &file);
+	void unpackFile(Common::File &file);
 	void fixVolCnfFileName(char *dst, const uint8 *src);
-	void unpackAllResourceFiles(const Filename &filename);
+	void unpackAllResourceFiles(const Common::Filename &filename);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_gob_stk.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_gob_stk.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_gob_stk.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -58,13 +58,13 @@
 
 void ExtractGobStk::execute() {
 	char signature[7];
-	File stk;
-	File gobConf;
+	Common::File stk;
+	Common::File gobConf;
 
-	File f1;
-	File f2;
+	Common::File f1;
+	Common::File f2;
 
-	Filename inpath(_inputPaths[0].path);
+	Common::Filename inpath(_inputPaths[0].path);
 
 	stk.open(inpath.getFullPath(), "rb");
 
@@ -102,7 +102,7 @@
 	extractChunks(_outputPath, stk);
 }
 
-void ExtractGobStk::readChunkList(File &stk, File &gobConf) {
+void ExtractGobStk::readChunkList(Common::File &stk, Common::File &gobConf) {
 	uint16 numDataChunks = stk.readUint16LE();
 
 	// If we are run multiple times, free previous chunk list
@@ -138,7 +138,7 @@
 	}
 }
 
-void ExtractGobStk::readChunkListV2(File &stk, File &gobConf) {
+void ExtractGobStk::readChunkListV2(Common::File &stk, Common::File &gobConf) {
 	uint32 numDataChunks;
 	_chunks = new Chunk;
 	Chunk *curChunk = _chunks;
@@ -176,7 +176,7 @@
 
 	// Filenames - Header
 	// ==================
-	// Structure of the header of Filename section is :
+	// Structure of the header of Common::Filename section is :
 	// + 04 bytes : Number of files stored in STK/ITK
 	// + 04 bytes : Start position of Misc Section
 
@@ -231,7 +231,7 @@
 
 		// Filenames
 		// =========
-		// Filename are stored one after the other, separated by 0x00.
+		// Common::Filename are stored one after the other, separated by 0x00.
 		// Those are now long filenames, at the opposite of previous STK version.
 
 		stk.seek(filenamePos, SEEK_SET);
@@ -258,7 +258,7 @@
 	}
 }
 
-void ExtractGobStk::extractChunks(Filename &outpath, File &stk) {
+void ExtractGobStk::extractChunks(Common::Filename &outpath, Common::File &stk) {
 	Chunk *curChunk = _chunks;
 	byte *unpackedData = NULL;
 
@@ -266,7 +266,7 @@
 		print("Extracting \"%s\"\n", curChunk->name);
 
 		outpath.setFullName(curChunk->name);
-		File chunkFile(outpath, "wb");
+		Common::File chunkFile(outpath, "wb");
 
 		if (curChunk->size > 0) {
 			stk.seek(curChunk->offset, SEEK_SET);

Modified: tools/branches/gsoc2009-gui/extract_gob_stk.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_gob_stk.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_gob_stk.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,9 +36,9 @@
 
 	Chunk *_chunks;
 
-	void readChunkList(File &stk, File &gobConf);
-	void readChunkListV2(File &stk, File &gobConf);
-	void extractChunks(Filename &outpath, File &stk);
+	void readChunkList(Common::File &stk, Common::File &gobConf);
+	void readChunkListV2(Common::File &stk, Common::File &gobConf);
+	void extractChunks(Common::Filename &outpath, Common::File &stk);
 	byte *unpackData(byte *src, uint32 &size);
 	byte *unpackPreGobData(byte *src, uint32 &size, uint32 &compSize);
 };

Modified: tools/branches/gsoc2009-gui/extract_kyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_kyra.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_kyra.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -77,7 +77,7 @@
 }
 
 void ExtractKyra::execute() {
-	Filename inputpath(_inputPaths[0].path);
+	Common::Filename inputpath(_inputPaths[0].path);
 
 	Extractor *extract = 0;
 	if (isHoFInstaller) {

Modified: tools/branches/gsoc2009-gui/extract_kyra.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_kyra.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_kyra.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -46,7 +46,7 @@
 
 	virtual void drawFileList();
 
-	virtual bool outputAllFiles(Filename *outputPath);
+	virtual bool outputAllFiles(Common::Filename *outputPath);
 
 	virtual bool outputFile(const char *file) { return outputFileAs(file, file); }
 	virtual bool outputFileAs(const char *file, const char *outputName);

Modified: tools/branches/gsoc2009-gui/extract_loom_tg16.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_loom_tg16.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_loom_tg16.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -29,24 +29,24 @@
 // if not defined, dumps all resources to separate files
 #define MAKE_LFLS
 
-uint8 read_cbyte (File &input, uint32 *ctr) {
+uint8 read_cbyte(Common::File &input, uint32 *ctr) {
 	(*ctr) += 1;
 	return input.readByte();
 }
-uint16 read_cword (File &input, uint32 *ctr) {
+uint16 read_cword(Common::File &input, uint32 *ctr) {
 	(*ctr) += 2;
 	return input.readUint16LE();
 }
 
-void write_cbyte (File &output, uint8 val, uint32 *ctr) {
+void write_cbyte(Common::File &output, uint8 val, uint32 *ctr) {
 	output.writeByte(val);
 	(*ctr) += 1;
 }
-void write_cword (File &output, uint16 val, uint32 *ctr) {
+void write_cword(Common::File &output, uint16 val, uint32 *ctr) {
 	output.writeUint16LE(val);
 	(*ctr) += 2;
 }
-void write_clong (File &output, uint32 val, uint32 *ctr) {
+void write_clong(Common::File &output, uint32 val, uint32 *ctr) {
 	output.writeUint32LE(val);
 	(*ctr) += 4;
 }
@@ -692,7 +692,7 @@
 	return res->length[ISO];
 }
 
-void ExtractLoomTG16::extract_resource(File &input, File &output, p_resource res) {
+void ExtractLoomTG16::extract_resource(Common::File &input, Common::File &output, p_resource res) {
 #ifdef MAKE_LFLS
 	uint32 off;
 	uint16 j;
@@ -1174,10 +1174,10 @@
 	uint32 sound_addr[NUM_SOUNDS];
 }	lfl_index;
 #else // !MAKE_LFLS
-void dump_resource (File &input, const char *fn_template, int num, p_resource res) {
+void dump_resource (Common::File &input, const char *fn_template, int num, p_resource res) {
 	char fname[256];
 	sprintf(fname, fn_template, num);
-	File output(fname, "wb");
+	Common::File output(fname, "wb");
 	extract_resource(input, output, res);
 }
 #endif // MAKE_LFLS
@@ -1195,7 +1195,7 @@
 	}
 }
 
-uint32 ISO_CRC(File &file) {
+uint32 ISO_CRC(Common::File &file) {
 	uint32 CRC = 0xFFFFFFFF;
 	uint32 len = file.size();
 	for (uint32 i = 0; i < len; i++)
@@ -1216,7 +1216,7 @@
 	if (_outputPath.empty())
 		_outputPath.setFullPath("./");
 
-	File input(_inputPaths[0].path, "rb");
+	Common::File input(_inputPaths[0].path, "rb");
 
 	InitCRC();
 	uint32 CRC = ISO_CRC(input);
@@ -1245,7 +1245,7 @@
 		sprintf(fname, "%02i.LFL", lfl->num);
 		_outputPath.setFullName(fname);
 
-		File output(_outputPath, "wb");
+		Common::File output(_outputPath, "wb");
 
 		print("Creating %s...\n", fname);
 		for (int j = 0; lfl->entries[j] != NULL; j++) {
@@ -1278,7 +1278,7 @@
 	}
 
 	_outputPath.setFullName("00.LFL");
-	File output(_outputPath, "wb");
+	Common::File output(_outputPath, "wb");
 	print("Creating 00.LFL...\n");
 
 	lfl_index.num_rooms = NUM_ROOMS;

Modified: tools/branches/gsoc2009-gui/extract_loom_tg16.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_loom_tg16.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_loom_tg16.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,7 +36,7 @@
 
 protected:
 
-	void extract_resource(File &input, File &output, p_resource res);
+	void extract_resource(Common::File &input, Common::File &output, p_resource res);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_mm_apple.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_apple.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_mm_apple.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -60,16 +60,16 @@
 	unsigned short signature;
 	char fname[256];
 
-	Filename inpath1(_inputPaths[0].path);
-	Filename inpath2(_inputPaths[1].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath1(_inputPaths[0].path);
+	Common::Filename inpath2(_inputPaths[1].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty())
 		// Standard output path
 		outpath.setFullPath("out/");
 
-	File input1(inpath1, "rb");
-	File input2(inpath2, "rb");
+	Common::File input1(inpath1, "rb");
+	Common::File input2(inpath2, "rb");
 
 	input1.seek(142080, SEEK_SET);
 	input2.seek(143104, SEEK_SET);
@@ -84,7 +84,7 @@
 		error("Signature not found in disk 2!");
 
 	outpath.setFullName("00.LFL");
-	File output(fname, "wb");
+	Common::File output(fname, "wb");
 	// All output should be xored
 	output.setXorMode(0xFF);
 	print("Creating 00.LFL...\n");
@@ -129,7 +129,7 @@
 	/* NOTE: Extra 92 bytes of unknown data */
 
 	for (i = 0; i < NUM_ROOMS; i++) {
-		File *input;
+		Common::File *input;
 
 		if (room_disks_apple[i] == '1')
 			input = &input1;

Modified: tools/branches/gsoc2009-gui/extract_mm_apple.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_apple.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_mm_apple.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,7 +36,7 @@
 
 protected:
 
-	void dump_resource(File &input, const char *fn_template, int num, p_resource res);
+	void dump_resource(Common::File &input, const char *fn_template, int num, p_resource res);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_mm_c64.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_c64.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_mm_c64.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -61,16 +61,16 @@
 	unsigned short signature;
 	char fname[256];
 	
-	Filename inpath1(_inputPaths[0].path);
-	Filename inpath2(_inputPaths[1].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath1(_inputPaths[0].path);
+	Common::Filename inpath2(_inputPaths[1].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty())
 		// Standard output path
 		outpath.setFullPath("out/");
 	
-	File input1(inpath1, "rb");
-	File input2(inpath2, "rb");
+	Common::File input1(inpath1, "rb");
+	Common::File input2(inpath2, "rb");
 
 	/* check signature */
 	signature = input1.readUint16LE();
@@ -81,7 +81,7 @@
 		error("Signature not found in disk 2!");
 
 	outpath.setFullName("00.LFL");
-	File output(outpath, "wb");
+	Common::File output(outpath, "wb");
 	output.setXorMode(0xFF);
 	print("Creating 00.LFL...");
 
@@ -123,7 +123,7 @@
 	output.close();
 
 	for (i = 0; i < NUM_ROOMS; i++) {
-		File *input;
+		Common::File *input;
 
 		if (room_disks[i] == '1')
 			input = &input1;

Modified: tools/branches/gsoc2009-gui/extract_mm_nes.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_nes.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_mm_nes.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -818,7 +818,7 @@
 	}
 };
 
-void ExtractMMNes::extract_resource(File &input, File &output, const struct t_resource *res, res_type type) {
+void ExtractMMNes::extract_resource(Common::File &input, Common::File &output, const struct t_resource *res, res_type type) {
 	uint16 len, i, j;
 	uint8 val;
 	uint8 cnt;
@@ -1080,10 +1080,10 @@
 #include "common/pack-end.h"	/* END STRUCT PACKING */
 
 #else	/* !MAKE_LFLS */
-void ExtractMMNES::dump_resource (File &input, const char *fn_template, int num, const struct t_resource *res, res_type type) {
+void ExtractMMNES::dump_resource (Common::File &input, const char *fn_template, int num, const struct t_resource *res, res_type type) {
 	char fname[256];
 	sprintf(fname, fn_template, num);
-	File output(fname, "wb");
+	Common::File output(fname, "wb");
 	print("Extracting resource to %s\n", fname);
 	extract_resource(input, output, res, type);
 }
@@ -1101,7 +1101,7 @@
 		CRCtable[i] = n;
 	}
 }
-static uint32 CheckROM(File &file) {
+static uint32 CheckROM(Common::File &file) {
 	uint32 CRC = 0xFFFFFFFF;
 	uint32 i;
 
@@ -1129,10 +1129,10 @@
 	int i, j;
 	uint32 CRC;
 
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
-	File input(inpath, "rb");
+	Common::File input(inpath, "rb");
 
 	if ((input.readByte() == 'N') && (input.readByte() == 'E') && (input.readByte() == 'S') && (input.readByte() == 0x1A)) {
 		error(
@@ -1186,7 +1186,7 @@
 
 		sprintf(fname, "%02i.LFL", lfl->num);
 		outpath.setFullName(fname);
-		File output(outpath, "wb");
+		Common::File output(outpath, "wb");
 #ifdef MAKE_LFLS
 		output.setXorMode(0xFF);
 #endif
@@ -1257,7 +1257,7 @@
 	}
 
 	outpath.setFullName("00.LFL");
-	File output(outpath, "wb");
+	Common::File output(outpath, "wb");
 #ifdef MAKE_LFLS
 	output.setXorMode(0xFF);
 #endif

Modified: tools/branches/gsoc2009-gui/extract_mm_nes.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_nes.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_mm_nes.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -71,8 +71,8 @@
 
 protected:
 
-	void extract_resource(File &input, File &output, const t_resource *res, res_type type);
-	void dump_resource(File &input, const char *fn_template, int num, const t_resource *res, res_type type);
+	void extract_resource(Common::File &input, Common::File &output, const t_resource *res, res_type type);
+	void dump_resource(Common::File &input, const char *fn_template, int num, const t_resource *res, res_type type);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_parallaction.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_parallaction.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_parallaction.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -318,8 +318,8 @@
 
 void ExtractParallaction::execute() {
 
-	Filename inpath(_inputPaths[0].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty())
 		outpath.setFullPath("out/");
@@ -339,7 +339,7 @@
 
 		outpath.setFullName(filename);
 
-		File ofile(outpath, "wb");
+		Common::File ofile(outpath, "wb");
 		ofile.write(arc._fileData, arc._fileSize);
 	}
 }

Modified: tools/branches/gsoc2009-gui/extract_parallaction.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_parallaction.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_parallaction.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -40,7 +40,7 @@
 
 	uint32	_numSlots;
 	uint32	_numFiles;
-	File    _file;
+	Common::File    _file;
 	char	_name[260];
 
 	// file data

Modified: tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_scumm_mac.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_scumm_mac.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -41,7 +41,7 @@
 		_shorthelp + "\n";
 }
 
-InspectionMatch ExtractScummMac::inspectInput(const Filename &filename) {
+InspectionMatch ExtractScummMac::inspectInput(const Common::Filename &filename) {
 	std::string name = filename.getFullName();
 	std::transform(name.begin(), name.end(), name.begin(), tolower);
 	std::string::size_type pos = name.find(" data");
@@ -59,13 +59,13 @@
 	unsigned long i;
 	int j;
 
-	Filename inpath(_inputPaths[0].path);
-	Filename outpath(_outputPath);
+	Common::Filename inpath(_inputPaths[0].path);
+	Common::Filename outpath(_outputPath);
 
 	if (outpath.empty())
 		outpath.setFullPath("./");
 
-	File ifp(inpath, "rb");
+	Common::File ifp(inpath, "rb");
 
 	/* Get the length of the data file to use for consistency checks */
 	data_file_len = ifp.size();
@@ -132,7 +132,7 @@
 		ifp.seek(file_off, SEEK_SET);
 
 		outpath.setFullName(file_name);
-		File ofp(outpath, "wb");
+		Common::File ofp(outpath, "wb");
 
 		if (!(buf = (char *)malloc(file_len))) {
 			error("Could not allocate %ld bytes of memory.", file_len);

Modified: tools/branches/gsoc2009-gui/extract_scumm_mac.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_scumm_mac.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_scumm_mac.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -32,7 +32,7 @@
 
 	virtual void execute();
 	
-	virtual InspectionMatch inspectInput(const Filename &filename);
+	virtual InspectionMatch inspectInput(const Common::Filename &filename);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_t7g_mac.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_t7g_mac.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -42,7 +42,7 @@
 		_shorthelp + "\n";
 }
 
-std::string ExtractT7GMac::readString(File &infile) {
+std::string ExtractT7GMac::readString(Common::File &infile) {
 	byte len = infile.readByte();
 	char *name = new char[len + 1];
 	infile.read_throwsOnError(name, len);
@@ -50,7 +50,7 @@
 	return name;
 }
 
-void ExtractT7GMac::dumpResource(File &infile, std::string name) {
+void ExtractT7GMac::dumpResource(Common::File &infile, std::string name) {
 	// Show the resource details
 	uint32 fileSize = infile.readUint32BE();
 	print("  \"%s\" (%d bytes)", name.c_str(), fileSize);
@@ -61,7 +61,7 @@
 	try {
 		// Dump the resource to the output file
 		_outputPath.setFullName(name);
-		File out(_outputPath, "wb");
+		Common::File out(_outputPath, "wb");
 		infile.read_throwsOnError(buf, fileSize);
 		out.write(buf, fileSize);
 	} catch (...) {
@@ -73,7 +73,7 @@
 	delete[] buf;
 }
 
-void ExtractT7GMac::handleReferenceList(File &infile, uint32 offsetRefList, uint16 numRes, uint32 offsetResNames) {
+void ExtractT7GMac::handleReferenceList(Common::File &infile, uint32 offsetRefList, uint16 numRes, uint32 offsetResNames) {
 	for (int i = 0; i < numRes; i++) {
 		infile.seek(offsetRefList + 12 * i + 2, SEEK_SET);
 		uint32 offsetResName = offsetResNames + infile.readUint16BE();
@@ -91,7 +91,7 @@
 }
 
 void ExtractT7GMac::execute() {
-	File infile(_inputPaths[0].path, "rb");
+	Common::File infile(_inputPaths[0].path, "rb");
 	
 	if (_outputPath.empty())
 		_outputPath.setFullPath("./");

Modified: tools/branches/gsoc2009-gui/extract_t7g_mac.h
===================================================================
--- tools/branches/gsoc2009-gui/extract_t7g_mac.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_t7g_mac.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -32,9 +32,9 @@
 	virtual void execute();
 
 protected:
-	std::string readString(File &infile);
-	void dumpResource(File &infile, std::string name);
-	void handleReferenceList(File &infile, uint32 offsetRefList, uint16 numRes, uint32 offsetResNames);
+	std::string readString(Common::File &infile);
+	void dumpResource(Common::File &infile, std::string name);
+	void handleReferenceList(Common::File &infile, uint32 offsetRefList, uint16 numRes, uint32 offsetResNames);
 };
 
 #endif

Modified: tools/branches/gsoc2009-gui/extract_zak_c64.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_zak_c64.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/extract_zak_c64.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -62,16 +62,16 @@
 	char fname[256];
 
 	// Two disks...
-	Filename inpath1(_inputPaths[0].path);
-	Filename inpath2(_inputPaths[1].path);
-	Filename &outpath = _outputPath;
+	Common::Filename inpath1(_inputPaths[0].path);
+	Common::Filename inpath2(_inputPaths[1].path);
+	Common::Filename &outpath = _outputPath;
 
 	if (outpath.empty())
 		// Standard output path
 		outpath.setFullPath("out/");
 	
-	File input1(inpath1, "rb");
-	File input2(inpath2, "rb");
+	Common::File input1(inpath1, "rb");
+	Common::File input2(inpath2, "rb");
 
 	/* check signature */
 	signature = input1.readUint16LE();
@@ -82,7 +82,7 @@
 		error("Signature not found in disk 2!");
 
 	outpath.setFullName("00.LFL");
-	File output(outpath, "wb");
+	Common::File output(outpath, "wb");
 	output.setXorMode(0xFF);
 	print("Creating 00.LFL...\n");
 
@@ -126,7 +126,7 @@
 	output.close();
 
 	for (i = 0; i < NUM_ROOMS; i++) {
-		File *input;
+		Common::File *input;
 
 		if (room_disks_c64[i] == '1')
 			input = &input1;

Modified: tools/branches/gsoc2009-gui/gui/gui_tools.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/gui_tools.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/gui/gui_tools.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -61,7 +61,7 @@
 	return l;
 }
 
-wxArrayString ToolsGUI::getToolList(const Filename &filename, ToolType tt) const {
+wxArrayString ToolsGUI::getToolList(const Common::Filename &filename, ToolType tt) const {
 	ToolList choices = inspectInput(filename, tt);
 	wxArrayString l;
 

Modified: tools/branches/gsoc2009-gui/gui/gui_tools.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/gui_tools.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/gui/gui_tools.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -163,7 +163,7 @@
 	 * @param tt Only check tools of this type
 	 * @return Returns all tools might be able to handle the file
 	 */
-	wxArrayString getToolList(const Filename &filename, ToolType tt = TOOLTYPE_ALL) const;
+	wxArrayString getToolList(const Common::Filename &filename, ToolType tt = TOOLTYPE_ALL) const;
 
 protected:
 	std::map<wxString, ToolGUI *> _toolmap;

Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/gui/main.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -78,7 +78,7 @@
 	Configuration &configuration = frame->_configuration;
 
 	if (argc == 2) {
-		Filename fn((const char *)wxString(argv[1]).mb_str());
+		Common::Filename fn((const char *)wxString(argv[1]).mb_str());
 
 		wxArrayString ls = g_tools.getToolList(fn);
 		if (ls.size() == 1)

Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -433,7 +433,7 @@
 	wxDirPickerCtrl *inDirWindow = dynamic_cast<wxDirPickerCtrl *>(panel->FindWindowByName(wxT("InputPicker")));
 	wxFilePickerCtrl *inFileWindow = dynamic_cast<wxFilePickerCtrl *>(panel->FindWindowByName(wxT("InputPicker")));
 
-	Filename filename;
+	Common::Filename filename;
 
 	if (inDirWindow)
 		filename = (const char *)inDirWindow ->GetPath().mb_str();

Modified: tools/branches/gsoc2009-gui/kyra_ins.cpp
===================================================================
--- tools/branches/gsoc2009-gui/kyra_ins.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/kyra_ins.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -473,7 +473,7 @@
 		char filename[64];
 		snprintf(filename, 64, "%s%03d", _baseFilename, currentFile);
 
-		File file(filename, "rb");
+		Common::File file(filename, "rb");
 
 		file.seek(pos, SEEK_SET);
 		uint8 fileId = file.readByte();
@@ -549,7 +549,7 @@
 			char filename[64];
 			snprintf(filename, 64, "%s%03d", _baseFilename, i);
 
-			File file(filename, "rb");
+			Common::File file(filename, "rb");
 
 			uint32 size = (i == a->lastFile) ? a->endOffset : file.size();
 
@@ -606,7 +606,7 @@
 
 					snprintf(filename, 64, "%s.%03d", _baseFilename, i+1);
 
-					File file2(filename, "rb");
+					Common::File file2(filename, "rb");
 					file.read_throwsOnError(hdr, m);
 					file2.read_throwsOnError(hdr + m , b);
 				} else {

Modified: tools/branches/gsoc2009-gui/kyra_pak.cpp
===================================================================
--- tools/branches/gsoc2009-gui/kyra_pak.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/kyra_pak.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -29,7 +29,7 @@
 #include "common/util.h"
 
 bool PAKFile::isPakFile(const char *filename) {
-	File f(filename, "rb");
+	Common::File f(filename, "rb");
 
 	int32 filesize = f.size();
 	int32 offset = 0;
@@ -86,7 +86,7 @@
 	delete _fileList;
 	_fileList = 0;
 
-	File pakfile(file, "rb");
+	Common::File pakfile(file, "rb");
 
 	uint32 filesize = pakfile.size();
 
@@ -140,7 +140,7 @@
 		return true;
 	generateLinkEntry();
 
-	File f(file, "wb");
+	Common::File f(file, "wb");
 
 	// TODO: implement error handling
 	uint32 startAddr = _fileList->getTableSize()+5+4;
@@ -190,7 +190,7 @@
 		return false;
 	}
 
-	File f(file, "rb");
+	Common::File f(file, "rb");
 
 	uint32 filesize = f.size();
 	uint8 *data = new uint8[filesize];
@@ -270,7 +270,7 @@
 		return;
 
 	const int countLinks = _links->size();
-	File output("LINKLIST.TMP", "wb");
+	Common::File output("LINKLIST.TMP", "wb");
 
 	const char **linkList = new const char *[countLinks];
 	int usedLinks = 0;
@@ -412,11 +412,11 @@
 	if (_links) {
 		printf("Linked files (count: %d):\n", _links->size());
 		for (const LinkList *i = _links; i; i = i->next)
-			printf("Filename: '%s' -> '%s'\n", i->filename, i->linksTo);
+			printf("Common::Filename: '%s' -> '%s'\n", i->filename, i->linksTo);
 	}
 }
 
-bool PAKFile::outputAllFiles(Filename *outputPath) {
+bool PAKFile::outputAllFiles(Common::Filename *outputPath) {
 	if (!Extractor::outputAllFiles(outputPath))
 		return false;
 
@@ -445,12 +445,12 @@
 void Extractor::drawFileList() {
 	cFileList *cur = getFileList();
 	while (cur) {
-		printf("Filename: '%s' size: %d\n", cur->filename, cur->size);
+		printf("Common::Filename: '%s' size: %d\n", cur->filename, cur->size);
 		cur = cur->next;
 	}
 }
 
-bool Extractor::outputAllFiles(Filename *outputPath) {
+bool Extractor::outputAllFiles(Common::Filename *outputPath) {
 	cFileList *cur = getFileList();
 
 	while (cur) {

Modified: tools/branches/gsoc2009-gui/kyra_pak.h
===================================================================
--- tools/branches/gsoc2009-gui/kyra_pak.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/kyra_pak.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -50,7 +50,7 @@
 	cFileList *getFileList() const { return _fileList; }
 
 	void drawFileList();
-	bool outputAllFiles(Filename *outputPath);
+	bool outputAllFiles(Common::Filename *outputPath);
 	bool outputFileAs(const char *file, const char *outputName);
 private:
 	FileList *_fileList;

Modified: tools/branches/gsoc2009-gui/tool.cpp
===================================================================
--- tools/branches/gsoc2009-gui/tool.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/tool.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -149,7 +149,7 @@
 	execute();
 }
 
-InspectionMatch Tool::inspectInput(const Filename &filename) {
+InspectionMatch Tool::inspectInput(const Common::Filename &filename) {
 	for (ToolInputs::iterator iter = _inputPaths.begin(); iter != _inputPaths.end(); ++iter) {
 		std::string p = iter->format;
 		if (p == "/") {
@@ -158,7 +158,7 @@
 			return IMATCH_AWFUL;
 		}
 		
-		Filename cmp_filename = p;
+		Common::Filename cmp_filename = p;
 
 		if (cmp_filename.getName() == "*") {
 			if (cmp_filename.getExtension() == "*")

Modified: tools/branches/gsoc2009-gui/tool.h
===================================================================
--- tools/branches/gsoc2009-gui/tool.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/tool.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -94,7 +94,7 @@
 	 *
 	 * @param filename The file to inspect
 	 */
-	virtual InspectionMatch inspectInput(const Filename &filename);
+	virtual InspectionMatch inspectInput(const Common::Filename &filename);
 
 	/**
 	 * Aborts executing of the tool, can be called from another thread.
@@ -205,7 +205,7 @@
 	ToolInputs _inputPaths;
 
 	// Output
-	Filename _outputPath;
+	Common::Filename _outputPath;
 
 protected:
 	/** Command line arguments we are parsing. */

Modified: tools/branches/gsoc2009-gui/tools.cpp
===================================================================
--- tools/branches/gsoc2009-gui/tools.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/tools.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -88,7 +88,7 @@
 		delete *iter;
 }
 
-Tools::ToolList Tools::inspectInput(const Filename &filename, ToolType type) const {
+Tools::ToolList Tools::inspectInput(const Common::Filename &filename, ToolType type) const {
 	ToolList perfect_choices;
 	ToolList good_choices;
 	ToolList awful_choices;

Modified: tools/branches/gsoc2009-gui/tools.h
===================================================================
--- tools/branches/gsoc2009-gui/tools.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/tools.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -41,7 +41,7 @@
 	 * Returns a list of the tools that supports opening the input file
 	 * specified in the input list.
 	 */
-	ToolList inspectInput(const Filename &filename, ToolType type = TOOLTYPE_ALL) const;
+	ToolList inspectInput(const Common::Filename &filename, ToolType type = TOOLTYPE_ALL) const;
 
 protected:
 	/** List of all tools */

Modified: tools/branches/gsoc2009-gui/utils/adpcm.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/adpcm.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/adpcm.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -32,7 +32,7 @@
 // flexibility of this code.
 class ADPCMInputStream : public AudioStream {
 private:
-	File *_stream;
+	Common::File *_stream;
 	uint32 _endpos;
 	int _channels;
 	typesADPCM _type;
@@ -65,7 +65,7 @@
 	int16 decodeMS(ADPCMChannelStatus *c, byte);
 
 public:
-	ADPCMInputStream(File *stream, uint32 size, typesADPCM type, int rate, int channels = 2, uint32 blockAlign = 0);
+	ADPCMInputStream(Common::File *stream, uint32 size, typesADPCM type, int rate, int channels = 2, uint32 blockAlign = 0);
 	~ADPCMInputStream() {};
 
 	int readBuffer(int16 *buffer, const int numSamples);
@@ -86,7 +86,7 @@
 // In addition, also MS IMA ADPCM is supported. See
 //   <http://wiki.multimedia.cx/index.php?title=Microsoft_IMA_ADPCM>.
 
-ADPCMInputStream::ADPCMInputStream(File *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign)
+ADPCMInputStream::ADPCMInputStream(Common::File *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign)
 	: _stream(stream), _channels(channels), _type(type), _blockAlign(blockAlign), _rate(rate) {
 
 	_status.last = 0;
@@ -349,7 +349,7 @@
 	return (int16)predictor;
 }
 
-AudioStream *makeADPCMStream(File *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+AudioStream *makeADPCMStream(Common::File *stream, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
 	return new ADPCMInputStream(stream, size, type, rate, channels, blockAlign);
 }
 

Modified: tools/branches/gsoc2009-gui/utils/adpcm.h
===================================================================
--- tools/branches/gsoc2009-gui/utils/adpcm.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/adpcm.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -36,7 +36,7 @@
 	kADPCMMS
 };
 
-AudioStream *makeADPCMStream(File *stream, uint32 size, typesADPCM type, int rate = 22050, int channels = 2, uint32 blockAlign = 0);
+AudioStream *makeADPCMStream(Common::File *stream, uint32 size, typesADPCM type, int rate = 22050, int channels = 2, uint32 blockAlign = 0);
 
 } // End of namespace Audio
 

Modified: tools/branches/gsoc2009-gui/utils/voc.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/voc.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/voc.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -44,7 +44,7 @@
 	}
 }
 
-byte *loadVOCFromStream(File &stream, int &size, int &rate, int &loops, int &begin_loop, int &end_loop) {
+byte *loadVOCFromStream(Common::File &stream, int &size, int &rate, int &loops, int &begin_loop, int &end_loop) {
 	VocFileHeader fileHeader;
 
 	if (stream.read_noThrow(&fileHeader, 8) != 8)
@@ -124,12 +124,12 @@
 	return ret_sound;
 }
 
-byte *loadVOCFromStream(File &stream, int &size, int &rate) {
+byte *loadVOCFromStream(Common::File &stream, int &size, int &rate) {
 	int loops, begin_loop, end_loop;
 	return loadVOCFromStream(stream, size, rate, loops, begin_loop, end_loop);
 }
 
-AudioStream *makeVOCStream(File &stream) {
+AudioStream *makeVOCStream(Common::File &stream) {
 	int size, rate;
 	byte *data = loadVOCFromStream(stream, size, rate);
 

Modified: tools/branches/gsoc2009-gui/utils/voc.h
===================================================================
--- tools/branches/gsoc2009-gui/utils/voc.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/voc.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -66,7 +66,7 @@
  * responsibility to dellocate that data again later on! Currently this
  * function only supports uncompressed raw PCM data.
  */
-extern byte *loadVOCFromStream(File &stream, int &size, int &rate);
+extern byte *loadVOCFromStream(Common::File &stream, int &size, int &rate);
 
 /**
  * Try to load a VOC from the given seekable stream and create an AudioStream
@@ -75,7 +75,7 @@
  *
  * This function uses loadVOCFromStream() internally.
  */
-AudioStream *makeVOCStream(File &stream);
+AudioStream *makeVOCStream(Common::File &stream);
 
 } // End of namespace Audio
 

Modified: tools/branches/gsoc2009-gui/utils/wave.cpp
===================================================================
--- tools/branches/gsoc2009-gui/utils/wave.cpp	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/wave.cpp	2009-12-20 23:02:50 UTC (rev 46452)
@@ -28,7 +28,7 @@
 
 namespace Audio {
 
-bool loadWAVFromStream(File &stream, int &size, int &rate, byte &flags, uint16 *wavType, int *blockAlign_) {
+bool loadWAVFromStream(Common::File &stream, int &size, int &rate, byte &flags, uint16 *wavType, int *blockAlign_) {
 	const uint32 initialPos = stream.pos();
 	byte buf[4+1];
 
@@ -157,7 +157,7 @@
 	return true;
 }
 
-AudioStream *makeWAVStream(File &stream) {
+AudioStream *makeWAVStream(Common::File &stream) {
 	int size, rate;
 	byte flags;
 	uint16 type;

Modified: tools/branches/gsoc2009-gui/utils/wave.h
===================================================================
--- tools/branches/gsoc2009-gui/utils/wave.h	2009-12-20 23:02:24 UTC (rev 46451)
+++ tools/branches/gsoc2009-gui/utils/wave.h	2009-12-20 23:02:50 UTC (rev 46452)
@@ -23,7 +23,9 @@
 #ifndef SOUND_WAVE_H
 #define SOUND_WAVE_H
 
-class File;
+namespace Common {
+	class File;
+}
 
 namespace Audio {
 
@@ -36,7 +38,7 @@
  * necessary for playback. Currently this function only supports uncompressed
  * raw PCM data as well as IMA ADPCM.
  */
-extern bool loadWAVFromStream(File &stream, int &size, int &rate, byte &flags, uint16 *wavType = 0, int *blockAlign = 0);
+extern bool loadWAVFromStream(Common::File &stream, int &size, int &rate, byte &flags, uint16 *wavType = 0, int *blockAlign = 0);
 
 /**
  * Try to load a WAVE from the given seekable stream and create an AudioStream
@@ -45,7 +47,7 @@
  *
  * This function uses loadWAVFromStream() internally.
  */
-AudioStream *makeWAVStream(File &stream);
+AudioStream *makeWAVStream(Common::File &stream);
 
 } // End of namespace Audio
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list