From eae07f9e8ac679ef047ffdfef3af9845777feb32 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 30 Dec 2009 15:34:00 +0000 Subject: [PATCH] TOOLS: Whitespace cleanup svn-id: r46751 --- Makefile | 6 +- Makefile.common | 2 +- README | 50 ++-- TODO | 2 +- common/file.cpp | 22 +- common/file.h | 12 +- compress.cpp | 2 +- compress.h | 2 +- configure | 6 +- create_sjisfnt.cpp | 4 +- encode_dxa.cpp | 10 +- engines/agos/compress_agos.cpp | 2 +- engines/agos/extract_agos.cpp | 4 +- engines/cine/decine.cpp | 2 +- engines/cine/extract_cine.cpp | 10 +- engines/cruise/extract_cruise_pc.cpp | 4 +- engines/gob/compress_gob.cpp | 34 +-- engines/gob/compress_gob.h | 2 +- engines/gob/extract_gob_stk.cpp | 4 +- engines/groovie/extract_t7g_mac.cpp | 8 +- engines/kyra/extract_kyra.cpp | 4 +- engines/kyra/extract_kyra.h | 2 +- engines/mohawk/deriven.cpp | 44 ++-- engines/mohawk/extract_mohawk.cpp | 56 ++--- engines/mohawk/mohawk_file.cpp | 84 +++---- engines/mohawk/mohawk_file.h | 22 +- engines/parallaction/extract_parallaction.cpp | 2 +- engines/parallaction/extract_parallaction.h | 14 +- engines/queen/compress_queen.cpp | 4 +- engines/saga/compress_saga.cpp | 16 +- engines/saga/compress_saga.h | 2 +- engines/scumm/compress_scumm_bun.cpp | 2 +- engines/scumm/compress_scumm_san.cpp | 6 +- engines/scumm/descumm-tool.cpp | 2 +- engines/scumm/descumm.cpp | 2 +- engines/scumm/descumm6.cpp | 8 +- engines/scumm/extract_mm_apple.cpp | 2 +- engines/scumm/extract_mm_c64.cpp | 6 +- engines/scumm/extract_mm_nes.cpp | 6 +- engines/scumm/extract_scumm_mac.cpp | 4 +- engines/scumm/extract_scumm_mac.h | 2 +- engines/scumm/extract_zak_c64.cpp | 2 +- engines/sword1/compress_sword1.cpp | 2 +- engines/sword2/compress_sword2.cpp | 2 +- engines/sword2/compress_sword2.h | 2 +- engines/tinsel/compress_tinsel.cpp | 2 +- engines/tucker/compress_tucker.cpp | 20 +- example_tool.cpp | 2 +- gui/configuration.cpp | 6 +- gui/configuration.h | 4 +- gui/gui_tools.cpp | 2 +- gui/gui_tools.h | 8 +- gui/main.cpp | 40 ++-- gui/main.h | 8 +- gui/pages.cpp | 214 +++++++++--------- gui/pages.h | 48 ++-- scummvm-tools-cli.cpp | 12 +- tool.cpp | 4 +- tool.h | 18 +- tool_exception.h | 2 +- tools.cpp | 2 +- tools.h | 2 +- 62 files changed, 440 insertions(+), 440 deletions(-) diff --git a/Makefile b/Makefile index 88cc7784..25f958dc 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ DEPDIR := .deps MODULES := MODULE_DIRS := -STANDALONE := +STANDALONE := # This one will go away once all tools are converted NO_MAIN := -DEXPORT_MAIN @@ -34,10 +34,10 @@ ifeq "$(HAVE_GCC)" "1" #CXXFLAGS+= -pedantic # -pedantic is too pedantic, at least on Mac OS X CXXFLAGS+= -Wpointer-arith -Wcast-align CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings - + # Enable checking of pointers returned by "new" CXXFLAGS+= -fcheck-new - + # There is a nice extra warning that flags variables that are potentially # used before being initialized. Very handy to catch a certain kind of # bugs. Unfortunately, it only works when optimizations are turned on, diff --git a/Makefile.common b/Makefile.common index e148b801..e6c0191d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -18,7 +18,7 @@ all: #MODULES := test tools base $(MODULES) -# HACK: Until we get proper module support, add these "module dirs" to +# HACK: Until we get proper module support, add these "module dirs" to # get the dependency tracking code working. MODULE_DIRS := ./ common/ gui/ sound/ diff --git a/README b/README index 006d2f07..f2756eeb 100644 --- a/README +++ b/README @@ -14,7 +14,7 @@ Extraction Tools: extract_agos Extracts the packed files used in the Amiga and AtariST versions of Elvira 1/2, Waxworks and Simon the Sorcerer 1. - + Example of usage: extract_agos ... @@ -35,25 +35,25 @@ Extraction Tools: all WESTWOOD.### files for that, since they are one big package file splitted into several, so with -x you will extract *all* files from the installer files. - + Takes some additional arguments, run extract_kyra --help for details. - + Example of usage: extract_kyra -x [-o outputdir] - + extract_loom_tg16 Extracts data files from the PC-Engine version of Loom. Use the dumpcd utility at http://www.zeograd.com/misc_download.php to dump the code tracks on the CD. - + Example of usage: extract_loom_tg16 [-o outputdir] extract_mm_apple Extracts data files from the Apple II version of Maniac Mansion. - + Example of usage: extract_mm_apple [-o outputdir] @@ -67,7 +67,7 @@ Extraction Tools: extract_mm_nes Extracts data files from the NES version of Maniac Mansion. Japanese version is _not_ supported. - + Example of usage: extract_mm_nes [-o outputdir] @@ -76,7 +76,7 @@ Extraction Tools: Example of usage: extract_parallaction [--small] [-o outputdir] - + extract_scumm_mac Extracts Macintosh "single file" SCUMM games into their component parts, for use with ScummVM. @@ -104,10 +104,10 @@ Extraction Tools: Compression Tools: All compression tools work on the general format compress [mode] [mode params] [-o output] - mode is either --mp3, --vorbis or --flac, the specifci mode params + mode is either --mp3, --vorbis or --flac, the specifci mode params can be found by running the tool with --help. output and input are for some tools a directory, for some a file. - + compress_agos Used to compress the Feeble Files or Simon the Sorcerer 1/2 @@ -115,7 +115,7 @@ Compression Tools: Example of usage: compress_agos [mode params] [--mac] [-o outputfile] - + Specify --mac for the mac version (obviously). Default output is input with changed extension. @@ -141,12 +141,12 @@ Compression Tools: Example of usage: compress_queen [mode params] [-o outputfile] queen.1 - + Default output file is "queen.1c" compress_saga Used to compress SAGA engine digital sound files to MP3, Vorbis - or FLAC. + or FLAC. Example of usage: compress_saga [mode params] [-o outputfile] @@ -155,14 +155,14 @@ Compression Tools: extension. Default output file is input file with the extensions ".cmp" - For Inherit the Earth, the digital music (music.rsc), speech + For Inherit the Earth, the digital music (music.rsc), speech (voices.rsc or "inherit the earth voices") and sound effects - (sounds.rsc) files can be compressed. For I have no mouth, the + (sounds.rsc) files can be compressed. For I have no mouth, the speech (voices*.res) files can be compressed. - - The compressed files have the ".cmp" extension. Once compressed, - you only need the respective .cmp files. - + + The compressed files have the ".cmp" extension. Once compressed, + you only need the respective .cmp files. + There is no compression support yet for the following versions: - The Mac CD Guild version of Inherit the Earth (uses MacBinary *.bin files) @@ -174,7 +174,7 @@ Compression Tools: Example of usage: compress_scumm_bun [mode params] [-o outputfile] - + Default outputfile is inputfile with the extension ".bun" Please note that FLAC compression will produce larger files @@ -184,10 +184,10 @@ Compression Tools: Compresses '.san' smush animation files. It uses lossless zlib for compressing FOBJ gfx chunks inside a san file. It also can create a separate Ogg file with the audio track. - + Example of usage: compress_scumm_san [mode params] [-o outputfile] - + Default output is inputfile with the extension ".san" In order to use such compressed files, your ScummVM binary @@ -210,7 +210,7 @@ Compression Tools: Example of usage: compress_scumm_sou [mode params] [-o outpufile] - + Default output file is inputfile with changed extensions, depends on the compression method used. @@ -242,7 +242,7 @@ Compression Tools: Example of usage: compress_touche [mode params] [-o outputfile] - + Default outpufile is infile with modified extension (depends on compression method). @@ -259,7 +259,7 @@ Script Tools: Should work at least with Future Wars and Operation Stealth. Example of usage: - decine [type] [version] [filename] + decine [type] [version] [filename] type: -prc or -rel (Use -prc for *.prc-files, -rel for *.rel-files) version: -v1 or -v2 (Use -v1 for Future Wars, -v2 for Operation Stealth) filename: The name of the script file to decode diff --git a/TODO b/TODO index 6d1a8a1d..2e169a51 100644 --- a/TODO +++ b/TODO @@ -9,7 +9,7 @@ Future Goals ------------ * Default Options - - Things like default games path, default LAME path, default compression + - Things like default games path, default LAME path, default compression type, etc. could be added to a menu and saved to an *.ini file. * Batch Processing - Batch processing can be performed by holding a list of jobs to done in diff --git a/common/file.cpp b/common/file.cpp index 2528a9fd..cd5a6d20 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -79,7 +79,7 @@ bool Filename::directory() const { return getFullName().size() == 0; } -bool Filename::exists() const { +bool Filename::exists() const { // This fails if we don't have permission to read the file // but in most cases, that's the same thing for us. FILE *f = fopen(_path.c_str(), "r"); @@ -203,7 +203,7 @@ File::~File() { } void File::open(const Filename &filepath, const char *mode) { - + // Clean up previously opened file close(); @@ -239,7 +239,7 @@ void File::setXorMode(uint8 xormode) { } int File::readChar() { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_READ) == 0) throw FileException("Tried to read from file opened in write mode (" + _name.getFullPath() + ")"); @@ -327,7 +327,7 @@ void File::read_throwsOnError(void *dataPtr, size_t dataSize) { } size_t File::read_noThrow(void *dataPtr, size_t dataSize) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_READ) == 0) throw FileException("Tried to read from file opened in write mode (" + _name.getFullPath() + ")"); @@ -336,7 +336,7 @@ size_t File::read_noThrow(void *dataPtr, size_t dataSize) { } std::string File::readString() { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_READ) == 0) throw FileException("Tried to read from file opened in write mode (" + _name.getFullPath() + ")"); @@ -355,7 +355,7 @@ std::string File::readString() { } std::string File::readString(size_t len) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_READ) == 0) throw FileException("Tried to read from file opened in write mode (" + _name.getFullPath() + ")"); @@ -372,7 +372,7 @@ std::string File::readString(size_t len) { } void File::scanString(char *result) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_READ) == 0) throw FileException("Tried to write to file opened in read mode (" + _name.getFullPath() + ")"); @@ -381,7 +381,7 @@ void File::scanString(char *result) { } void File::writeChar(int i) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_WRITE) == 0) throw FileException("Tried to write to a file opened in read mode (" + _name.getFullPath() + ")"); @@ -421,7 +421,7 @@ void File::writeUint32LE(uint32 value) { } size_t File::write(const void *dataPtr, size_t dataSize) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_WRITE) == 0) throw FileException("Tried to write to file opened in read mode (" + _name.getFullPath() + ")"); @@ -436,7 +436,7 @@ size_t File::write(const void *dataPtr, size_t dataSize) { } void File::print(const char *format, ...) { - if (!_file) + if (!_file) throw FileException("File is not open"); if ((_mode & FILEMODE_WRITE) == 0) throw FileException("Tried to write to file opened in read mode (" + _name.getFullPath() + ")"); @@ -450,7 +450,7 @@ void File::print(const char *format, ...) { } void File::seek(long offset, int origin) { - if (!_file) + if (!_file) throw FileException("File is not open"); if (fseek(_file, offset, origin) != 0) diff --git a/common/file.h b/common/file.h index 6ee727d4..730a2c32 100644 --- a/common/file.h +++ b/common/file.h @@ -36,7 +36,7 @@ namespace Common { * Usually premature end, or that it could not be opened (write / read protected). */ class FileException : public ToolException { -public: +public: FileException(std::string error, int retcode = -1) : ToolException(error, retcode) {} }; @@ -57,7 +57,7 @@ public: inline bool operator==(const Filename &fn){ return equals(fn); } - + /** * Change the entire path including directory, volume and actual filname. * @@ -118,7 +118,7 @@ public: * @return True if they are equal. */ bool equals(const Filename &other) const; - + /** * Returns the entire path. @@ -205,7 +205,7 @@ public: * "read" and "write" methods */ void setXorMode(uint8 xormode); - + /** * Reads a single character (equivalent of fgetc). */ @@ -235,7 +235,7 @@ public: * @throws FileException if file is not open / if read failed. */ uint32 readUint32LE(); - + /** * Read a single 16-bit word, big endian. * @throws FileException if file is not open / if read failed. @@ -291,7 +291,7 @@ public: * @return the data read */ std::string readString(size_t len); - + /** * Reads a string, using until NULL or EOF or CR/LF. * @throws FileException if file is not open / if read failed. diff --git a/compress.cpp b/compress.cpp index 4c0f7096..70cf2c25 100644 --- a/compress.cpp +++ b/compress.cpp @@ -944,7 +944,7 @@ void CompressionTool::setTempFileName() { std::string CompressionTool::getHelp() const { std::ostringstream os; - + // Standard help text + our additions os << Tool::getHelp(); diff --git a/compress.h b/compress.h index f43b8d74..c81255d0 100644 --- a/compress.h +++ b/compress.h @@ -49,7 +49,7 @@ enum { -/** +/** * Different audio formats. * You can bitwise them to represent several formats. */ diff --git a/configure b/configure index 5062e22c..bf051c23 100755 --- a/configure +++ b/configure @@ -431,7 +431,7 @@ fi # # Determine extension used for executables # -get_system_exe_extension $_host_os +get_system_exe_extension $_host_os HOSTEXEEXT=$_exeext SEPARATOR=":" @@ -549,7 +549,7 @@ else ;; esac ;; - *) + *) cxx_version="$cxx_version, bad" cxx_verc_fail=yes ;; @@ -1085,7 +1085,7 @@ test -z "$_libdir" && _libdir="$_prefix/lib" if test "$have_gcc" = yes ; then if test "$_cxx_major" -ge "3" ; then case $_host_os in - # newlib-based system include files suppress non-C89 function + # newlib-based system include files suppress non-C89 function # declarations under __STRICT_ANSI__ mingw* | amigaos*) CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" diff --git a/create_sjisfnt.cpp b/create_sjisfnt.cpp index 24d85d51..91395c9a 100644 --- a/create_sjisfnt.cpp +++ b/create_sjisfnt.cpp @@ -353,7 +353,7 @@ uint32 convertSJIStoUTF32(uint8 fB, uint8 sB) { // before a character, we filter that out over here. if (ret == 0x0000FEFF) ret = *(uint32 *)(outBuf + 4); - + return ret; } @@ -414,7 +414,7 @@ bool drawGlyph(uint8 fB, uint8 sB, Glyph &glyph) { // that means unused, valid SJIS character codes. // // It might be useful to enable that warning again to detect problems with - // iconv though. An example for such an iconv problem is the + // iconv though. An example for such an iconv problem is the // "FULLWIDTH APOSTROPHE", which iconv refuses to convert to UTF-32. //warning("Conversion error on: %.2X %.02X", fB, sB); return false; diff --git a/encode_dxa.cpp b/encode_dxa.cpp index 41f205ce..707baae9 100644 --- a/encode_dxa.cpp +++ b/encode_dxa.cpp @@ -392,7 +392,7 @@ uLong DxaEncoder::m13encode(byte *frame, byte *outbuf) { byte subMot[4], subData[16]; int subMotSize = 0, subDataSize = 0; - static const int subX[4] = {0, 2, 0, 2}; + static const int subX[4] = {0, 2, 0, 2}; static const int subY[4] = {0, 0, 2, 2}; /* 0: skip @@ -538,15 +538,15 @@ uLong DxaEncoder::m13encode(byte *frame, byte *outbuf) { } EncodeDXA::EncodeDXA(const std::string &name) : CompressionTool(name, TOOLTYPE_COMPRESSION) { - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); _shorthelp = "Used to create DXA files from extracted Smacker archives."; - _helptext = + _helptext = "Usage: " + getName() + " [mode] [mode-params] [-o outpufile = inputfile.san] \n" + - "Output will be two files, one with .dxa extension and the other depending on the used audio codec."; + "Output will be two files, one with .dxa extension and the other depending on the used audio codec."; } void EncodeDXA::execute() { @@ -554,7 +554,7 @@ void EncodeDXA::execute() { ScaleMode scaleMode; Common::Filename inpath(_inputPaths[0].path); Common::Filename outpath(_outputPath); - + if (outpath.empty()) // Actual change of extension is done later... outpath = inpath; diff --git a/engines/agos/compress_agos.cpp b/engines/agos/compress_agos.cpp index 6d4790f9..6ec5b125 100644 --- a/engines/agos/compress_agos.cpp +++ b/engines/agos/compress_agos.cpp @@ -32,7 +32,7 @@ CompressAgos::CompressAgos(const std::string &name) : CompressionTool(name, TOOL _convertMac = false; _outputToDirectory = false; _supportsProgressBar = true; - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); diff --git a/engines/agos/extract_agos.cpp b/engines/agos/extract_agos.cpp index 80400235..940022d0 100644 --- a/engines/agos/extract_agos.cpp +++ b/engines/agos/extract_agos.cpp @@ -29,7 +29,7 @@ ExtractAgos::ExtractAgos(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { _filelen = 0; - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); @@ -197,7 +197,7 @@ void *ExtractAgos::loadfile(const Common::Filename &name) { /** * Saves N bytes from the buffer to the target file. * Throws FileException on failure - * + * * @param name The name of the file to save to * @param mem Where to get data from * @param length How many bytes to write diff --git a/engines/cine/decine.cpp b/engines/cine/decine.cpp index 87b7257c..d0246569 100644 --- a/engines/cine/decine.cpp +++ b/engines/cine/decine.cpp @@ -147,7 +147,7 @@ static bool decodeOpcode(int isV2) { printf("SET localvars[%d], %d", var, value); } else { uint8 num = fetchScriptByte(); - switch (type) { + switch (type) { case 1: printf("localvars[%d] = localvars[%d]", var, num); break; diff --git a/engines/cine/extract_cine.cpp b/engines/cine/extract_cine.cpp index 17f50878..9ba60930 100644 --- a/engines/cine/extract_cine.cpp +++ b/engines/cine/extract_cine.cpp @@ -43,13 +43,13 @@ //////////////////////////////////////////////////////////////////////////// ExtractCine::ExtractCine(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); _shorthelp = "Used to unpack Delphine's Cinematique engine's archive files."; - _helptext = + _helptext = "Usage: " + getName() + " [params] [-o outputdir] \n" + _shorthelp + "\n" + "Supports using Operation Stealth's 'vol.cnf' file as input.\n"; @@ -187,7 +187,7 @@ void ExtractCine::unpackFile(Common::File &file) { Common::Filename outPath(_outputPath); outPath.setFullName(fileName); - + uint32 offset = file.readUint32BE(); unsigned int packedSize = file.readUint32BE(); unsigned int unpackedSize = file.readUint32BE(); @@ -270,7 +270,7 @@ void ExtractCine::unpackAllResourceFiles(const Common::Filename &filename) { uint8 *buf = (uint8 *)calloc(unpackedSize, 1); assert(buf); f.read_throwsOnError(buf, packedSize); - + if (packedSize != unpackedSize) { CineUnpacker cineUnpacker; if (!cineUnpacker.unpack(buf, packedSize, buf, unpackedSize)) { @@ -285,7 +285,7 @@ void ExtractCine::unpackAllResourceFiles(const Common::Filename &filename) { for (unsigned int i = 0; i < resourceFilesCount; ++i) { memcpy(resourceFileName, &buf[4 + i * entrySize], 8); resourceFileName[8] = 0; - + Common::File fpResFile(resourceFileName, "rb"); print("--- Unpacking resource file %s:\n", resourceFileName); unpackFile(fpResFile); diff --git a/engines/cruise/extract_cruise_pc.cpp b/engines/cruise/extract_cruise_pc.cpp index 4bd52d19..5b8487f3 100644 --- a/engines/cruise/extract_cruise_pc.cpp +++ b/engines/cruise/extract_cruise_pc.cpp @@ -110,7 +110,7 @@ struct Disk1Decoder { // LzHuffman _parent[kHuffmanRoot] = 0; } int getHuffCode() { - static const int base[] = { 0, 1, 4, 12, 24, 48 }; + static const int base[] = { 0, 1, 4, 12, 24, 48 }; static const int count[] = { 0, 2, 5, 9, 12, 15 }; static const int length[] = { 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5 }; int index = _stream->getBits(8); @@ -187,7 +187,7 @@ struct Disk1Decoder { // LzHuffman p = index; } p = _parent[p]; - } while (p != 0); + } while (p != 0); } bool decode() { resetHuffTables(); diff --git a/engines/gob/compress_gob.cpp b/engines/gob/compress_gob.cpp index ba2a69b7..7630a57f 100644 --- a/engines/gob/compress_gob.cpp +++ b/engines/gob/compress_gob.cpp @@ -46,7 +46,7 @@ CompressGob::CompressGob(const std::string &name) : CompressionTool(name, TOOLTY _inputPaths.push_back(input); _shorthelp = "Compresses Gobliiins! data files."; - _helptext = + _helptext = "\nUsage: " + getName() + " [-o ] [-f] \n" " is a .gob file generated extract_gob_stk\n" "<-f> forces compression for all files\n\n" @@ -83,7 +83,7 @@ void CompressGob::execute() { gobConf.close(); _outputPath.setFullName(inpath.getFullName()); - + stk.open(_outputPath, "wb"); // Output in compressed format @@ -144,7 +144,7 @@ CompressGob::Chunk *CompressGob::readChunkConf(Common::File &gobConf, Common::Fi src1.open(srcName, "rb"); src1.seek(0, SEEK_END); // if file is too small, force 'Store' method - if ((curChunk->realSize = src1.pos()) < 8) + if ((curChunk->realSize = src1.pos()) < 8) curChunk->packed = 0; parseChunk = chunks; @@ -164,7 +164,7 @@ CompressGob::Chunk *CompressGob::readChunkConf(Common::File &gobConf, Common::Fi parseChunk = parseChunk->next; } src1.close(); - + gobConf.scanString(buffer); if (!gobConf.eos()) { @@ -182,7 +182,7 @@ CompressGob::Chunk *CompressGob::readChunkConf(Common::File &gobConf, Common::Fi * * This function writes an empty header in the STK archive. This is required as * the header length is variable and depends on the number of chunks to be written - * in the archive file. + * in the archive file. * * This header will be overwritten just before the end of the program execution */ @@ -206,7 +206,7 @@ void CompressGob::writeBody(Common::Filename *inpath, Common::File &stk, Chunk * Chunk *curChunk = chunks; Common::File src; uint32 tmpSize; - + while (curChunk) { inpath->setFullName(curChunk->name); src.open(*inpath, "rb"); @@ -226,7 +226,7 @@ void CompressGob::writeBody(Common::Filename *inpath, Common::File &stk, Chunk * } else print("Compressing %12s\t%d -> %d bytes\n", curChunk->name, curChunk->realSize, curChunk->size); - } + } if (curChunk->packed == 0) { tmpSize = 0; @@ -242,7 +242,7 @@ void CompressGob::writeBody(Common::Filename *inpath, Common::File &stk, Chunk * * \param chunkCount Number of chunks * \param chunks List of chunks * - * This function rewrites the header of the archive, replacing dummy values + * This function rewrites the header of the archive, replacing dummy values * by the one computed during execution. * The structure of the header is the following : * + 2 bytes : numbers of files archived in the .stk/.itk @@ -252,7 +252,7 @@ void CompressGob::writeBody(Common::Filename *inpath, Common::File &stk, Chunk * * + 4 bytes : size of the chunk * + 4 bytes : start position of the chunk in the file * + 1 byte : If 0 : not compressed, if 1 : compressed - * + * * The duplicate files are defined using the same information * as the one of the replacement file. */ @@ -355,7 +355,7 @@ uint32 CompressGob::writeBodyPackFile(Common::File &stk, Common::File &src) { writeBuffer[3] = size >> 24; stk.write(writeBuffer, 4); -// Size is already checked : small files (less than 8 characters) +// Size is already checked : small files (less than 8 characters) // are not compressed, so copying the first three bytes is safe. dicoIndex = 4078; dico[dicoIndex] = unpacked[0]; @@ -409,7 +409,7 @@ uint32 CompressGob::writeBodyPackFile(Common::File &stk, Common::File &src) { counter -= resultchecklength; } -// The command byte is complete when the file is entirely compressed, or +// The command byte is complete when the file is entirely compressed, or // when the 8 operation bits are set. if ((cpt == 7) | (counter == 0)) { writeBuffer[0] = cmd; @@ -431,19 +431,19 @@ uint32 CompressGob::writeBodyPackFile(Common::File &stk, Common::File &src) { * \param compChunk Chunk containing information on second file to be compared * \return whether they are identical or not. * - * This function compares a file to another defined in a chunk. The file sizes + * This function compares a file to another defined in a chunk. The file sizes * are already tested outside the function. */ bool CompressGob::filcmp(Common::File &src1, Common::Filename &stkName) { uint16 readCount; bool checkFl = true; - char buf1[4096]; + char buf1[4096]; char buf2[4096]; Common::File src2; src1.rewind(); src2.open(stkName.getFullPath(), "rb"); - + do { readCount = src1.read_noThrow(buf1, 4096); src2.read_noThrow(buf2, 4096); @@ -467,9 +467,9 @@ bool CompressGob::filcmp(Common::File &src1, Common::Filename &stkName) { * \param length Length of the better match found, if any * \return whether a match has been found or not or not. * - * This function search in the dictionary for matches with the characters still to be compressed. + * This function search in the dictionary for matches with the characters still to be compressed. * 'A match' is when at least three characters of the buffer (comparing from the current 'read' position) - * are found in the dictionary. The match lengths are limited to 18 characters, as the + * are found in the dictionary. The match lengths are limited to 18 characters, as the * length (minus 3) is stored on 4 bits. */ bool CompressGob::checkDico(byte *unpacked, uint32 unpackedIndex, int32 counter, byte *dico, uint16 currIndex, uint16 &pos, uint8 &length) { @@ -485,7 +485,7 @@ bool CompressGob::checkDico(byte *unpacked, uint32 unpackedIndex, int32 counter, for (tmpPos = 0; tmpPos < 0x1000; tmpPos++) { tmpLength = 0; for (i = 0; ((i < 18) & (i < counter)); i++) - if ((unpacked[unpackedIndex + i] == dico[(tmpPos + i) % 4096]) & + if ((unpacked[unpackedIndex + i] == dico[(tmpPos + i) % 4096]) & // avoid dictionary collision (((tmpPos + i) % 4096 != currIndex) | (i == 0))) tmpLength++; diff --git a/engines/gob/compress_gob.h b/engines/gob/compress_gob.h index 7bb2bad4..4e4212aa 100644 --- a/engines/gob/compress_gob.h +++ b/engines/gob/compress_gob.h @@ -44,7 +44,7 @@ public: protected: struct Chunk; - + uint8 _execMode; Chunk *_chunks; diff --git a/engines/gob/extract_gob_stk.cpp b/engines/gob/extract_gob_stk.cpp index f2b4a993..ef3e1d1d 100644 --- a/engines/gob/extract_gob_stk.cpp +++ b/engines/gob/extract_gob_stk.cpp @@ -43,7 +43,7 @@ struct ExtractGobStk::Chunk { ExtractGobStk::ExtractGobStk(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { _chunks = NULL; - + ToolInput input; input.format = "*.stk"; _inputPaths.push_back(input); @@ -378,7 +378,7 @@ byte *ExtractGobStk::unpackPreGobData(byte *src, uint32 &size, uint32 &compSize) newCounter -= 2; // The 6 first bytes are grouped by 2 : -// - bytes 0&1 : if set to 0xFFFF, the real size is in bytes 2&3. Else : unknown +// - bytes 0&1 : if set to 0xFFFF, the real size is in bytes 2&3. Else : unknown // - bytes 2&3 : Either the real size or 0x007D. Directly related to the size of the file. // - bytes 4&5 : 0x0000 (files are small) ;) if (dummy1 == 0xFFFF) diff --git a/engines/groovie/extract_t7g_mac.cpp b/engines/groovie/extract_t7g_mac.cpp index ceebb159..4a65a76f 100644 --- a/engines/groovie/extract_t7g_mac.cpp +++ b/engines/groovie/extract_t7g_mac.cpp @@ -31,13 +31,13 @@ static uint32 offsetResourceData; ExtractT7GMac::ExtractT7GMac(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); _shorthelp = "Extract data files from the The 7th Guest Macintosh data file."; - _helptext = + _helptext = "Usage: " + getName() + " [params] [-o outputdir] \n" + _shorthelp + "\n"; } @@ -57,7 +57,7 @@ void ExtractT7GMac::dumpResource(Common::File &infile, std::string name) { // Read the resource contents byte *buf = new byte[fileSize]; - + try { // Dump the resource to the output file _outputPath.setFullName(name); @@ -92,7 +92,7 @@ void ExtractT7GMac::handleReferenceList(Common::File &infile, uint32 offsetRefLi void ExtractT7GMac::execute() { Common::File infile(_inputPaths[0].path, "rb"); - + if (_outputPath.empty()) _outputPath.setFullPath("./"); diff --git a/engines/kyra/extract_kyra.cpp b/engines/kyra/extract_kyra.cpp index 322b23e1..68605394 100644 --- a/engines/kyra/extract_kyra.cpp +++ b/engines/kyra/extract_kyra.cpp @@ -32,13 +32,13 @@ ExtractKyra::ExtractKyra(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTI isAmiga = false; isHoFInstaller = false; singleFilename = ""; - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); _shorthelp = "Extract data files from the The Legend of Kyrandia series of games."; - _helptext = + _helptext = "Usage: " + getName() + " [-o output] [params] \n" + _shorthelp + "\n" + "Default output path is ./out/\n" + diff --git a/engines/kyra/extract_kyra.h b/engines/kyra/extract_kyra.h index b00c7db5..9bebef8a 100644 --- a/engines/kyra/extract_kyra.h +++ b/engines/kyra/extract_kyra.h @@ -32,7 +32,7 @@ public: ExtractKyra(const std::string &name = "extract_kyra"); virtual void execute(); - + void parseExtraArguments(); bool extractAll, extractOne, isAmiga, isHoFInstaller; diff --git a/engines/mohawk/deriven.cpp b/engines/mohawk/deriven.cpp index 57cd8d7f..a38214a3 100644 --- a/engines/mohawk/deriven.cpp +++ b/engines/mohawk/deriven.cpp @@ -95,26 +95,26 @@ void printUsage(const char *appName) { Common::StringList getNameList(MohawkFile *mohawkFile, uint16 id) { MohawkOutputStream nameResource = mohawkFile->getRawData(ID_NAME, id); Common::StringList nameList; - + uint16 namesCount = nameResource.stream->readUint16BE(); uint16 *stringOffsets = new uint16[namesCount]; for (uint16 i = 0; i < namesCount; i++) stringOffsets[i] = nameResource.stream->readUint16BE(); nameResource.stream->seek(namesCount * 2, SEEK_CUR); int32 curNamesPos = nameResource.stream->pos(); - + for (uint32 i = 0; i < namesCount; i++) { nameResource.stream->seek(curNamesPos + stringOffsets[i]); - + Common::String name = Common::String::emptyString; for (char c = nameResource.stream->readByte(); c; c = nameResource.stream->readByte()) name += c; nameList.push_back(name); } - + delete nameResource.stream; delete[] stringOffsets; - + return nameList; } @@ -125,10 +125,10 @@ static void printTabs(byte tabs) { void dumpCommands(Common::SeekableReadStream *script, Common::StringList varNames, Common::StringList exNames, byte tabs) { uint16 commandCount = script->readUint16BE(); - + for (uint16 i = 0; i < commandCount; i++) { uint16 command = script->readUint16BE(); - + if (command == 8) { // "Switch" Statement if (script->readUint16BE() != 2) warning ("if-then-else unknown value is not 2"); @@ -137,7 +137,7 @@ void dumpCommands(Common::SeekableReadStream *script, Common::StringList varName uint16 logicBlockCount = script->readUint16BE(); for (uint16 j = 0; j < logicBlockCount; j++) { uint16 varCheck = script->readUint16BE(); - printTabs(tabs + 1); + printTabs(tabs + 1); if (varCheck == 0xFFFF) printf("default:\n"); else @@ -183,7 +183,7 @@ void dumpCommands(Common::SeekableReadStream *script, Common::StringList varName void dumpScript(Common::SeekableReadStream *script, Common::StringList varNames, Common::StringList exNames, byte tabs) { uint16 scriptCount = script->readUint16BE(); - + for (uint16 i = 0; i < scriptCount; i++) { printTabs(tabs); printf ("Stream Type %d:\n", script->readUint16BE()); dumpCommands(script, varNames, exNames, tabs + 1); @@ -195,54 +195,54 @@ int main(int argc, char *argv[]) { printUsage(argv[0]); return 1; } - + FILE *file = fopen(argv[1], "rb"); if (!file) { printf ("Could not open \'%s\'\n", argv[1]); return 1; } - + // Open the file as a Mohawk archive MohawkFile *mohawkFile = new MohawkFile(); mohawkFile->open(new Common::File(file)); - + // Load in Variable/External Command Names' Common::StringList exNames = getNameList(mohawkFile, 3); Common::StringList varNames = getNameList(mohawkFile, 4); - + uint32 tag = READ_BE_UINT32(argv[2]); uint32 cardId = (uint16)atoi(argv[3]); - + if (tag == ID_CARD) { printf("\n\nDumping scripts for card %d!\n", cardId); printf("==================================\n\n"); - + MohawkOutputStream cardStream = mohawkFile->getRawData(ID_CARD, cardId); cardStream.stream->readUint32BE(); // Skip first 4 bytes - + dumpScript(cardStream.stream, varNames, exNames, 0); - + delete cardStream.stream; } else if (tag == ID_HSPT) { printf("\n\nDumping scripts for card %d hotspots!\n", cardId); printf("===========================================\n\n"); - + MohawkOutputStream hsptStream = mohawkFile->getRawData(ID_HSPT, cardId); uint16 hotspotCount = hsptStream.stream->readUint16BE(); - + for (uint16 i = 0; i < hotspotCount; i++) { printf("Hotspot %d:\n", i); hsptStream.stream->seek(22, SEEK_CUR); // Skip non-script related stuff dumpScript(hsptStream.stream, varNames, exNames, 1); } - + delete hsptStream.stream; } else { printf("That resource (if it exists) doesn't contain script data!\n"); } - + exNames.clear(); varNames.clear(); - + return 0; } diff --git a/engines/mohawk/extract_mohawk.cpp b/engines/mohawk/extract_mohawk.cpp index 6bf3dcb0..57e68607 100644 --- a/engines/mohawk/extract_mohawk.cpp +++ b/engines/mohawk/extract_mohawk.cpp @@ -45,38 +45,38 @@ void convertMIDIResource(MohawkOutputStream output) { assert(output.stream->readUint32BE() == ID_MHWK); output.stream->readUint32BE(); // Skip size assert(output.stream->readUint32BE() == ID_MIDI); - + uint32 size = output.stream->size() - 12; // Skip MHWK header's size - + byte *midiData = (byte *)malloc(size); - + // Read the MThd Data output.stream->read(midiData, 14); - + // Skip the unknown Prg# section assert(output.stream->readUint32BE() == ID_PRG); output.stream->skip(output.stream->readUint32BE()); - + // Read the MTrk Data uint32 mtrkSize = output.stream->size() - output.stream->pos(); output.stream->read(midiData + 14, mtrkSize); - + // Change the extension to midi output.name += ".mid"; - + printf ("Extracting \'%s\'...\n", output.name.c_str()); - + FILE *outputFile = fopen(output.name.c_str(), "wb"); if (!outputFile) { printf ("Could not open file for output!\n"); free(midiData); return; } - + // Output the data to the file. fwrite(midiData, 1, 14 + mtrkSize, outputFile); free(midiData); - + fflush(outputFile); fclose(outputFile); } @@ -88,43 +88,43 @@ void outputMohawkStream(MohawkOutputStream output) { sprintf(strBuf, "%s_%d", tag2str(output.tag), output.id); output.name = strBuf; } - + // Intercept the sound tags if (output.tag == ID_TWAV || output.tag == ID_MSND || output.tag == ID_SND) { convertSoundResource(output); return; } - + // Intercept the movie tag (need to change the offsets) // TODO: Actually convert. Just dump for now. if (output.tag == ID_TMOV) { convertMovieResource(output); //return; } - + // Intercept the MIDI tag (strip out Mohawk header/Prg# stuff) if (output.tag == ID_TMID) { convertMIDIResource(output); return; } - + // TODO: Convert other resources? PICT/WDIB/tBMP? - + assert(outputBuffer); - + printf ("Extracting \'%s\'...\n", output.name.c_str()); - + FILE *outputFile = fopen(output.name.c_str(), "wb"); if (!outputFile) { printf ("Could not open file for output!\n"); return; } - + while (output.stream->pos() < output.stream->size()) { uint32 size = output.stream->read(outputBuffer, MAX_BUF_SIZE); - fwrite(outputBuffer, 1, size, outputFile); + fwrite(outputBuffer, 1, size, outputFile); } - + fflush(outputFile); fclose(outputFile); } @@ -134,13 +134,13 @@ int main(int argc, char *argv[]) { printUsage(argv[0]); return 1; } - + FILE *file = fopen(argv[1], "rb"); if (!file) { printf ("Could not open \'%s\'\n", argv[1]); return 1; } - + // Open the file as a Mohawk archive MohawkFile *mohawkFile; if(Common::String(argv[0]).hasSuffix("old")) @@ -148,16 +148,16 @@ int main(int argc, char *argv[]) { else mohawkFile = new MohawkFile(); mohawkFile->open(new Common::File(file)); - + // Allocate a buffer for the output outputBuffer = (byte *)malloc(MAX_BUF_SIZE); - + if (argc > 3) { uint32 tag = READ_BE_UINT32(argv[2]); uint16 id = (uint16)atoi(argv[3]); - + MohawkOutputStream output = mohawkFile->getRawData(tag, id); - + if (output.stream) { outputMohawkStream(output); delete output.stream; @@ -172,9 +172,9 @@ int main(int argc, char *argv[]) { output = mohawkFile->getNextFile(); } } - + printf ("Done!\n"); - + free(outputBuffer); return 0; diff --git a/engines/mohawk/mohawk_file.cpp b/engines/mohawk/mohawk_file.cpp index 87fca70f..386595bb 100644 --- a/engines/mohawk/mohawk_file.cpp +++ b/engines/mohawk/mohawk_file.cpp @@ -39,7 +39,7 @@ void MohawkFile::close() { delete _mhk; _mhk = NULL; delete[] _types; _types = NULL; delete[] _fileTable; _fileTable = NULL; - + _curFile = Common::String::emptyString; } @@ -66,7 +66,7 @@ void MohawkFile::open(Common::SeekableReadStream *stream) { ///////////////////////////////// //Resource Dir - ///////////////////////////////// + ///////////////////////////////// // Type Table _mhk->seek(_rsrc.abs_offset); @@ -95,12 +95,12 @@ void MohawkFile::open(Common::SeekableReadStream *stream) { debug (3, "Resources = %04x", _types[i].resTable.resources); _types[i].resTable.entries = new Type::ResourceTable::Entries[_types[i].resTable.resources]; - + for (uint16 j = 0; j < _types[i].resTable.resources; j++) { _types[i].resTable.entries[j].id = _mhk->readUint16BE(); _types[i].resTable.entries[j].index = _mhk->readUint16BE(); - debug (4, "Entry[%02x]: ID = %04x (%d) Index = %04x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].index); + debug (4, "Entry[%02x]: ID = %04x (%d) Index = %04x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].index); } // Name Table @@ -110,7 +110,7 @@ void MohawkFile::open(Common::SeekableReadStream *stream) { debug (3, "Names = %04x", _types[i].nameTable.num); _types[i].nameTable.entries = new Type::NameTable::Entries[_types[i].nameTable.num]; - + for (uint16 j = 0; j < _types[i].nameTable.num; j++) { _types[i].nameTable.entries[j].offset = _mhk->readUint16BE(); _types[i].nameTable.entries[j].index = _mhk->readUint16BE(); @@ -141,14 +141,14 @@ void MohawkFile::open(Common::SeekableReadStream *stream) { _mhk->seek(_rsrc.abs_offset + _rsrc.file_table_offset); _fileTableAmount = _mhk->readUint32BE(); _fileTable = new FileTable[_fileTableAmount]; - + for (uint32 i = 0; i < _fileTableAmount; i++) { _fileTable[i].offset = _mhk->readUint32BE(); _fileTable[i].dataSize = _mhk->readUint16BE(); _fileTable[i].dataSize += _mhk->readByte() << 16; // Get bits 15-24 of dataSize too _fileTable[i].flags = _mhk->readByte(); _fileTable[i].unk = _mhk->readUint16BE(); - + // Add in another 3 bits for file size from the flags. // The flags are useless to us except for doing this ;) _fileTable[i].dataSize += (_fileTable[i].flags & 7) << 24; @@ -187,7 +187,7 @@ MohawkOutputStream MohawkFile::getRawData(uint32 tag, uint16 id) { // Note: the fileTableIndex is based off 1, not 0. So, subtract 1 uint16 fileTableIndex = _types[typeIndex].resTable.entries[idIndex].index - 1; - + // WORKAROUND: tMOV resources pretty much ignore the size part of the file table, // as the original just passed the full Mohawk file to QuickTime and the offset. // We need to do this because of the way Mohawk is set up (this is much more "proper" @@ -200,7 +200,7 @@ MohawkOutputStream MohawkFile::getRawData(uint32 tag, uint16 id) { } else output.stream = new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex].offset + _fileTable[fileTableIndex].dataSize); output.tag = tag; - output.id = id; + output.id = id; if (_types[typeIndex].nameTable.num > 0) output.name = _types[typeIndex].nameTable.entries[idIndex].name; @@ -209,34 +209,34 @@ MohawkOutputStream MohawkFile::getRawData(uint32 tag, uint16 id) { MohawkOutputStream MohawkFile::getNextFile() { MohawkOutputStream output = { 0, 0, 0, "" }; - + if (_curExType >= _typeTable.resource_types) // No more! return output; - + if (_curExTypeIndex >= _types[_curExType].resTable.resources) { _curExType++; _curExTypeIndex = 0; - + if (_curExType >= _typeTable.resource_types) // No more! return output; } - + uint16 fileTableIndex = _types[_curExType].resTable.entries[_curExTypeIndex].index - 1; - + // For some unknown reason, all tMOV resources have incorrect sizes. We correct this by getting the differences between offsets. uint32 dataSize = 0; if (_types[_curExType].tag == ID_TMOV) dataSize = _fileTable[fileTableIndex + 1].offset - _fileTable[fileTableIndex].offset; else dataSize = _fileTable[fileTableIndex].dataSize; - + output.stream = new Common::SeekableSubReadStream(_mhk, _fileTable[fileTableIndex].offset, _fileTable[fileTableIndex].offset + dataSize, false); output.tag = _types[_curExType].tag; output.id = _types[_curExType].resTable.entries[_curExTypeIndex].id; - + if (_types[_curExType].nameTable.num > 0) output.name = _types[_curExType].nameTable.entries[_curExTypeIndex].name; - + _curExTypeIndex++; return output; } @@ -244,48 +244,48 @@ MohawkOutputStream MohawkFile::getNextFile() { void OldMohawkFile::open(Common::SeekableReadStream *stream) { close(); _mhk = stream; - + // This is for the "old" Mohawk resource format used in some older // Living Books. It is very similar, just missing the MHWK tag and // some other minor differences, especially with the file table // being merged into the resource table. - + uint32 headerSize = _mhk->readUint32BE(); - + // NOTE: There are differences besides endianness! (Subtle changes, // but different). - + if (headerSize == 6) { // We're in Big Endian mode (Macintosh) _mhk->readUint16BE(); // Resource Table Size _typeTable.resource_types = _mhk->readUint16BE(); _types = new OldType[_typeTable.resource_types]; - + debug (0, "Old Mohawk File (Macintosh): Number of Resource Types = %04x", _typeTable.resource_types); - + for (uint16 i = 0; i < _typeTable.resource_types; i++) { _types[i].tag = _mhk->readUint32BE(); _types[i].resource_table_offset = (uint16)_mhk->readUint32BE() + 6; _mhk->readUint32BE(); // Unknown (always 0?) - + debug (3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset); uint32 oldPos = _mhk->pos(); - + // Resource Table/File Table _mhk->seek(_types[i].resource_table_offset); _types[i].resTable.resources = _mhk->readUint16BE(); _types[i].resTable.entries = new OldType::ResourceTable::Entries[_types[i].resTable.resources]; - + for (uint16 j = 0; j < _types[i].resTable.resources; j++) { _types[i].resTable.entries[j].id = _mhk->readUint16BE(); _types[i].resTable.entries[j].offset = _mhk->readUint32BE(); _types[i].resTable.entries[j].size = _mhk->readByte() << 16; _types[i].resTable.entries[j].size += _mhk->readUint16BE(); _mhk->skip(5); // Unknown (always 0?) - + debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size); } - + _mhk->seek(oldPos); debug (3, "\n"); } @@ -293,32 +293,32 @@ void OldMohawkFile::open(Common::SeekableReadStream *stream) { _mhk->readUint16LE(); // Resource Table Size _typeTable.resource_types = _mhk->readUint16LE(); _types = new OldType[_typeTable.resource_types]; - + debug (0, "Old Mohawk File (Windows): Number of Resource Types = %04x", _typeTable.resource_types); - + for (uint16 i = 0; i < _typeTable.resource_types; i++) { _types[i].tag = _mhk->readUint32LE(); _types[i].resource_table_offset = _mhk->readUint16LE() + 6; _mhk->readUint16LE(); // Unknown (always 0?) - + debug (3, "Type[%02d]: Tag = \'%s\' ResTable Offset = %04x", i, tag2str(_types[i].tag), _types[i].resource_table_offset); - + uint32 oldPos = _mhk->pos(); - + // Resource Table/File Table _mhk->seek(_types[i].resource_table_offset); _types[i].resTable.resources = _mhk->readUint16LE(); _types[i].resTable.entries = new OldType::ResourceTable::Entries[_types[i].resTable.resources]; - + for (uint16 j = 0; j < _types[i].resTable.resources; j++) { _types[i].resTable.entries[j].id = _mhk->readUint16LE(); _types[i].resTable.entries[j].offset = _mhk->readUint32LE(); _types[i].resTable.entries[j].size = _mhk->readUint16LE(); _mhk->readUint32LE(); // Unknown (always 0?) - - debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size); + + debug (4, "Entry[%02x]: ID = %04x (%d)\tOffset = %08x, Size = %08x", j, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].id, _types[i].resTable.entries[j].offset, _types[i].resTable.entries[j].size); } - + _mhk->seek(oldPos); debug (3, "\n"); } @@ -352,22 +352,22 @@ MohawkOutputStream OldMohawkFile::getRawData(uint32 tag, uint16 id) { MohawkOutputStream OldMohawkFile::getNextFile() { MohawkOutputStream output = { 0, 0, 0, "" }; - + if (_curExType >= _typeTable.resource_types) // No more! return output; - + if (_curExTypeIndex >= _types[_curExType].resTable.resources) { _curExType++; _curExTypeIndex = 0; - + if (_curExType >= _typeTable.resource_types) // No more! return output; } - + output.stream = new Common::SeekableSubReadStream(_mhk, _types[_curExType].resTable.entries[_curExTypeIndex].offset, _types[_curExType].resTable.entries[_curExTypeIndex].offset + _types[_curExType].resTable.entries[_curExTypeIndex].size); output.tag = _types[_curExType].tag; output.id = _types[_curExType].resTable.entries[_curExTypeIndex].id; - + _curExTypeIndex++; return output; } diff --git a/engines/mohawk/mohawk_file.h b/engines/mohawk/mohawk_file.h index d4294e93..14b11f0a 100644 --- a/engines/mohawk/mohawk_file.h +++ b/engines/mohawk/mohawk_file.h @@ -138,7 +138,7 @@ struct Type { uint32 tag; uint16 resource_table_offset; uint16 name_table_offset; - + struct ResourceTable { uint16 resources; struct Entries { @@ -146,7 +146,7 @@ struct Type { uint16 index; } *entries; } resTable; - + struct NameTable { uint16 num; struct Entries { @@ -175,10 +175,10 @@ class MohawkFile { public: MohawkFile(); virtual ~MohawkFile() { close(); } - + virtual void open(Common::SeekableReadStream *stream); void close(); - + bool hasResource(uint32 tag, uint16 id); virtual MohawkOutputStream getRawData(uint32 tag, uint16 id); virtual MohawkOutputStream getNextFile(); @@ -187,13 +187,13 @@ protected: Common::SeekableReadStream *_mhk; TypeTable _typeTable; Common::String _curFile; - + // Extraction Variables uint32 _curExType; uint32 _curExTypeIndex; - + FileTable *_fileTable; - + private: bool _hasData; uint32 _fileSize; @@ -222,11 +222,11 @@ class OldMohawkFile : public MohawkFile { public: OldMohawkFile() : MohawkFile() {} ~OldMohawkFile() {} - + void open(Common::SeekableReadStream *stream); MohawkOutputStream getRawData(uint32 tag, uint16 id); MohawkOutputStream getNextFile(); - + private: struct OldType { uint32 tag; @@ -240,14 +240,14 @@ private: } *entries; } resTable; } *_types; - + int16 getTypeIndex(uint32 tag) { for (uint16 i = 0; i < _typeTable.resource_types; i++) if (_types[i].tag == tag) return i; return -1; // not found } - + int16 getIdIndex(int16 typeIndex, uint16 id) { for (uint16 i = 0; i < _types[typeIndex].resTable.resources; i++) if (_types[typeIndex].resTable.entries[i].id == id) diff --git a/engines/parallaction/extract_parallaction.cpp b/engines/parallaction/extract_parallaction.cpp index b0418cbe..d5540f52 100644 --- a/engines/parallaction/extract_parallaction.cpp +++ b/engines/parallaction/extract_parallaction.cpp @@ -300,7 +300,7 @@ void ppdepack(byte *packed, byte *depacked, uint32 plen, uint32 unplen) { } ExtractParallaction::ExtractParallaction(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); diff --git a/engines/parallaction/extract_parallaction.h b/engines/parallaction/extract_parallaction.h index abb97070..93a10b19 100644 --- a/engines/parallaction/extract_parallaction.h +++ b/engines/parallaction/extract_parallaction.h @@ -48,15 +48,15 @@ struct Archive { uint32 _fileSize; uint32 _filePos; - char _names[MAX_ARCHIVE_ENTRIES+1][ARCHIVE_FILENAME_LEN]; - uint32 _sizes[MAX_ARCHIVE_ENTRIES]; - uint32 _offsets[MAX_ARCHIVE_ENTRIES]; + char _names[MAX_ARCHIVE_ENTRIES+1][ARCHIVE_FILENAME_LEN]; + uint32 _sizes[MAX_ARCHIVE_ENTRIES]; + uint32 _offsets[MAX_ARCHIVE_ENTRIES]; - void open(const char* filename, bool smallArchive); + void open(const char* filename, bool smallArchive); - void openSubfile(uint32 index); - void openSubfile(const char* filename); - void readSubfile(byte* buf, uint32 size); + void openSubfile(uint32 index); + void openSubfile(const char* filename); + void readSubfile(byte* buf, uint32 size); uint32 getSizeOfSubfile(); Archive(Tool &tool); diff --git a/engines/queen/compress_queen.cpp b/engines/queen/compress_queen.cpp index 4b46ce15..c29d56a6 100644 --- a/engines/queen/compress_queen.cpp +++ b/engines/queen/compress_queen.cpp @@ -93,7 +93,7 @@ const struct PatchFile patchFiles[] = { CompressQueen::CompressQueen(const std::string &name) : CompressionTool(name, TOOLTYPE_COMPRESSION) { _supportsProgressBar = true; - + ToolInput input; input.format = "queen.1"; _inputPaths.push_back(input); @@ -111,7 +111,7 @@ const CompressQueen::GameVersion *CompressQueen::detectGameVersion(uint32 size) if (pgv->dataFileSize == size) { return pgv; } - } + } error("Unknown/unsupported FOTAQ version"); diff --git a/engines/saga/compress_saga.cpp b/engines/saga/compress_saga.cpp index 0d923cce..90846b7f 100644 --- a/engines/saga/compress_saga.cpp +++ b/engines/saga/compress_saga.cpp @@ -77,13 +77,13 @@ static CompressSaga::GameFileDescription IHNM_GameFiles[] = { // 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}, - {"voices1.res", false, "-1", kSoundWAV, -1, false}, - {"voices2.res", false, "-1", kSoundWAV, -1, false}, - {"voices3.res", false, "-1", kSoundWAV, -1, false}, - {"voices4.res", false, "-1", kSoundWAV, -1, false}, - {"voices5.res", false, "-1", kSoundWAV, -1, false}, - {"voices6.res", false, "-1", kSoundWAV, -1, false}, + {"voicess.res", false, "-1", kSoundWAV, -1, false}, + {"voices1.res", false, "-1", kSoundWAV, -1, false}, + {"voices2.res", false, "-1", kSoundWAV, -1, false}, + {"voices3.res", false, "-1", kSoundWAV, -1, false}, + {"voices4.res", false, "-1", kSoundWAV, -1, false}, + {"voices5.res", false, "-1", kSoundWAV, -1, false}, + {"voices6.res", false, "-1", kSoundWAV, -1, false}, // Demo {"voicesd.res", false, "-1", kSoundWAV, -1, false}, }; @@ -117,7 +117,7 @@ CompressSaga::CompressSaga(const std::string &name) : CompressionTool(name, TOOL _currentGameDescription = NULL; _currentFileDescription = NULL; _supportsProgressBar = true; - + ToolInput input; // We accept many extensions, and the fact that "inherit the earth voices" does not have an extension // makes it pretty much unsupported by the standard dialogs to open diff --git a/engines/saga/compress_saga.h b/engines/saga/compress_saga.h index 43b87add..d610e027 100644 --- a/engines/saga/compress_saga.h +++ b/engines/saga/compress_saga.h @@ -45,7 +45,7 @@ public: CompressSaga(const std::string &name = "compress_saga"); virtual void execute(); - + virtual InspectionMatch inspectInput(const Common::Filename &filename); // Declarations should be inside the class to prevent linker errors diff --git a/engines/scumm/compress_scumm_bun.cpp b/engines/scumm/compress_scumm_bun.cpp index 7c48e6c6..7fa1a6f6 100644 --- a/engines/scumm/compress_scumm_bun.cpp +++ b/engines/scumm/compress_scumm_bun.cpp @@ -1073,7 +1073,7 @@ CompressScummBun::CompressScummBun(const std::string &name) : CompressionTool(na _cbundleCurIndex = 0; _supportsProgressBar = true; - + ToolInput input; input.format = "*.bun"; _inputPaths.push_back(input); diff --git a/engines/scumm/compress_scumm_san.cpp b/engines/scumm/compress_scumm_san.cpp index 3de33fe9..26b62d69 100644 --- a/engines/scumm/compress_scumm_san.cpp +++ b/engines/scumm/compress_scumm_san.cpp @@ -165,7 +165,7 @@ void CompressScummSan::prepareForMixing(const std::string &outputDir, const std: for (int l = 0; l < COMPRESS_SCUMM_SAN_MAX_TRACKS; l++) { if (_audioTracks[l].used) { _audioTracks[l].file.close(); - + sprintf(filename, "%s%s_%04d_%03d.tmp", outputDir.c_str(), inputFilename.c_str(), _audioTracks[l].animFrame, _audioTracks[l].trackId); _audioTracks[l].file.open(filename, "rb"); _audioTracks[l].file.seek(0, SEEK_END); @@ -578,7 +578,7 @@ void CompressScummSan::execute() { flupath.setExtension(".flu"); Common::File flu_in; - + try { flu_in.open(flupath, "rb"); } catch (...) { @@ -657,7 +657,7 @@ void CompressScummSan::execute() { } catch (...) { break; } - + if (input.eos()) break; if (tag == 'FRME') { diff --git a/engines/scumm/descumm-tool.cpp b/engines/scumm/descumm-tool.cpp index 411dc491..4f23838d 100644 --- a/engines/scumm/descumm-tool.cpp +++ b/engines/scumm/descumm-tool.cpp @@ -297,7 +297,7 @@ void parseHeader() { } else { if (g_scriptSize <= 9) { printf("File too small to be a local script\n"); - } + } printf("Script# %d\n", (byte)g_scriptStart[8]); g_scriptStart += 9; } diff --git a/engines/scumm/descumm.cpp b/engines/scumm/descumm.cpp index 860875e1..87ee7e05 100644 --- a/engines/scumm/descumm.cpp +++ b/engines/scumm/descumm.cpp @@ -802,7 +802,7 @@ void do_actorops(char *buf, byte opcode) { case 0x0E: buf = do_tok(buf, "InitAnimNr", ((opcode & 0x80) ? A1V : A1B)); break; -// case 0x0F: buf=do_tok(buf, "PaletteList", A1LIST); break; +// case 0x0F: buf=do_tok(buf, "PaletteList", A1LIST); break; case 0x10: buf = do_tok(buf, "Width", ((opcode & 0x80) ? A1V : A1B)); break; diff --git a/engines/scumm/descumm6.cpp b/engines/scumm/descumm6.cpp index 538e3733..c8c507f6 100644 --- a/engines/scumm/descumm6.cpp +++ b/engines/scumm/descumm6.cpp @@ -37,8 +37,8 @@ push SOMETHING - the value we are switching on dup - duplicate it push caseA - push the first case value eq - compare -jump if false - if not equal, jump to next case - kill - we entered this case - kill the switch value from the stack +jump if false - if not equal, jump to next case + kill - we entered this case - kill the switch value from the stack ... jump AFTER - leave this switch dup @@ -1082,7 +1082,7 @@ StackEnt *pop() { if (!g_options.haltOnError) return se_complex("**** INVALID DATA ****"); - exit(1); + exit(1); } return stack[--num_stack]; } @@ -4257,7 +4257,7 @@ void next_line_V8(char *output) { "\xE6p|makeCursorColorTransparent," "\xE7p|initCharset," "\xE8l|charsetColors," - "\xE9pp|setCursorPosition"); + "\xE9pp|setCursorPosition"); break; case 0x9D: ext(output, "p|loadRoom"); diff --git a/engines/scumm/extract_mm_apple.cpp b/engines/scumm/extract_mm_apple.cpp index 23197d2a..488ecf84 100644 --- a/engines/scumm/extract_mm_apple.cpp +++ b/engines/scumm/extract_mm_apple.cpp @@ -43,7 +43,7 @@ static const int ResourcesPerFile[NUM_ROOMS] = { }; ExtractMMApple::ExtractMMApple(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input1; input1.format = "*.dsk"; _inputPaths.push_back(input1); diff --git a/engines/scumm/extract_mm_c64.cpp b/engines/scumm/extract_mm_c64.cpp index 5dacf8e8..3a91af94 100644 --- a/engines/scumm/extract_mm_c64.cpp +++ b/engines/scumm/extract_mm_c64.cpp @@ -44,7 +44,7 @@ static const int ResourcesPerFile[NUM_ROOMS] = { }; ExtractMMC64::ExtractMMC64(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input1; input1.format = "*.d64"; _inputPaths.push_back(input1); @@ -61,7 +61,7 @@ void ExtractMMC64::execute() { int i, j; unsigned short signature; char fname[256]; - + Common::Filename inpath1(_inputPaths[0].path); Common::Filename inpath2(_inputPaths[1].path); Common::Filename &outpath = _outputPath; @@ -69,7 +69,7 @@ void ExtractMMC64::execute() { if (outpath.empty()) // Standard output path outpath.setFullPath("out/"); - + Common::File input1(inpath1, "rb"); Common::File input2(inpath2, "rb"); diff --git a/engines/scumm/extract_mm_nes.cpp b/engines/scumm/extract_mm_nes.cpp index 089f968d..9b704712 100644 --- a/engines/scumm/extract_mm_nes.cpp +++ b/engines/scumm/extract_mm_nes.cpp @@ -1228,13 +1228,13 @@ static uint32 CheckROM(Common::File &file) { } ExtractMMNes::ExtractMMNes(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input; input.format = "*.prg"; _inputPaths.push_back(input); _shorthelp = "Extract data files from the NES version of Maniac Mansion."; - _helptext = + _helptext = "\nUsage: " + _name + " [-o = out/] \n" + "\t" + _shorthelp + "\n" + "\tSupported versions: USA, Europe, Sweden, France, Germany, Spain, Italy\n" @@ -1311,7 +1311,7 @@ void ExtractMMNes::execute() { output.setXorMode(0xFF); #endif print("Creating %s...\n", fname); - + for (j = 0; lfl->entries[j].type != NULL; j++) { const struct t_lflentry *entry = &lfl->entries[j]; switch (entry->type->type) { diff --git a/engines/scumm/extract_scumm_mac.cpp b/engines/scumm/extract_scumm_mac.cpp index be4f8c0e..d641cb85 100644 --- a/engines/scumm/extract_scumm_mac.cpp +++ b/engines/scumm/extract_scumm_mac.cpp @@ -29,7 +29,7 @@ #define CHANGECASE ExtractScummMac::ExtractScummMac(const std::string &name) : Tool(name, TOOLTYPE_EXTRACTION) { - + ToolInput input; input.format = "*.*"; _inputPaths.push_back(input); @@ -94,7 +94,7 @@ void ExtractScummMac::execute() { if (!file_name[0]) error("\'%s\'. file has no name.", inpath.getFullPath().c_str()); - + print("extracting \'%s\'", file_name); /* For convenience compatibility with scummvm (and case sensitive diff --git a/engines/scumm/extract_scumm_mac.h b/engines/scumm/extract_scumm_mac.h index 81f09a2e..f80b24a8 100644 --- a/engines/scumm/extract_scumm_mac.h +++ b/engines/scumm/extract_scumm_mac.h @@ -31,7 +31,7 @@ public: ExtractScummMac(const std::string &name = "extract_scumm_mac"); virtual void execute(); - + virtual InspectionMatch inspectInput(const Common::Filename &filename); }; diff --git a/engines/scumm/extract_zak_c64.cpp b/engines/scumm/extract_zak_c64.cpp index 288b7e61..41506bb1 100644 --- a/engines/scumm/extract_zak_c64.cpp +++ b/engines/scumm/extract_zak_c64.cpp @@ -69,7 +69,7 @@ void ExtractZakC64::execute() { if (outpath.empty()) // Standard output path outpath.setFullPath("out/"); - + Common::File input1(inpath1, "rb"); Common::File input2(inpath2, "rb"); diff --git a/engines/sword1/compress_sword1.cpp b/engines/sword1/compress_sword1.cpp index dee5c8f6..6a53ec1c 100644 --- a/engines/sword1/compress_sword1.cpp +++ b/engines/sword1/compress_sword1.cpp @@ -574,7 +574,7 @@ CompressSword1::CompressSword1(const std::string &name) : CompressionTool(name, _compMusic = true; _supportsProgressBar = true; - + ToolInput input; input.format = "*.clu"; _inputPaths.push_back(input); diff --git a/engines/sword2/compress_sword2.cpp b/engines/sword2/compress_sword2.cpp index 78edc002..5d47cc82 100644 --- a/engines/sword2/compress_sword2.cpp +++ b/engines/sword2/compress_sword2.cpp @@ -65,7 +65,7 @@ void CompressSword2::execute() { uint32 indexSize; uint32 totalSize; uint32 length; - + Common::Filename inpath(_inputPaths[0].path); Common::Filename &outpath = _outputPath; diff --git a/engines/sword2/compress_sword2.h b/engines/sword2/compress_sword2.h index 871bfa9a..a908c580 100644 --- a/engines/sword2/compress_sword2.h +++ b/engines/sword2/compress_sword2.h @@ -35,7 +35,7 @@ protected: Common::File _input, _output_snd, _output_idx; std::string _audioOutputFilename; - + uint32 append_to_file(Common::File &f1, const char *filename); }; diff --git a/engines/tinsel/compress_tinsel.cpp b/engines/tinsel/compress_tinsel.cpp index 03d4d0f6..fe5b1324 100644 --- a/engines/tinsel/compress_tinsel.cpp +++ b/engines/tinsel/compress_tinsel.cpp @@ -55,7 +55,7 @@ CompressTinsel::CompressTinsel(const std::string &name) : CompressionTool(name, ToolInput input1; input1.format = "*.smp"; _inputPaths.push_back(input1); - + ToolInput input2; input2.format = "*.idx"; _inputPaths.push_back(input2); diff --git a/engines/tucker/compress_tucker.cpp b/engines/tucker/compress_tucker.cpp index 524a8890..90ab0466 100644 --- a/engines/tucker/compress_tucker.cpp +++ b/engines/tucker/compress_tucker.cpp @@ -293,14 +293,14 @@ static const char *audio_files_list[] = { }; static const int audio_formats_table[] = { - 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, - 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 2, 3, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, + 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 2, 3, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1 }; @@ -322,10 +322,10 @@ uint32 CompressTucker::compress_audio_directory(const Common::Filename *inpath, for (i = 0; i < count; ++i) { temp_table[i].offset = current_offset; sprintf(filepath, "%s/audio/%s", inpath->getPath().c_str(), audio_files_list[i]); - + try { Common::File input(filepath, "rb"); - + switch (audio_formats_table[i]) { case 1: case 2: diff --git a/example_tool.cpp b/example_tool.cpp index bd21d612..08cdbe3e 100644 --- a/example_tool.cpp +++ b/example_tool.cpp @@ -131,7 +131,7 @@ void CompressionExample::execute() { // Start the 'extraction' size_t total_files = in1.size() + in2.size(); - + // There has to be some roof on this if (total_files > 1000) throw ToolException("Input files are too large!"); diff --git a/gui/configuration.cpp b/gui/configuration.cpp index 3a944edd..7b76b60f 100644 --- a/gui/configuration.cpp +++ b/gui/configuration.cpp @@ -35,7 +35,7 @@ Configuration::Configuration() { selectedAudioFormat = AUDIO_VORBIS; advancedAudioSettings = false; - + // mp3 params mp3CompressionType = wxT("VBR"); mp3MpegQuality = wxT("2"); @@ -92,7 +92,7 @@ void Configuration::save(bool all) { wxFileName op(outputPath); filecnf->Write(wxT("outputpath"), op.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR)); - + if (all) { // mp3 params filecnf->Write(wxT("mp3CompressionType"), mp3CompressionType); @@ -112,7 +112,7 @@ void Configuration::save(bool all) { filecnf->Write(wxT("oggAvgBitrate"), oggAvgBitrate); filecnf->Write(wxT("oggMaxBitrate"), oggMaxBitrate); } - + delete filecnf; } diff --git a/gui/configuration.h b/gui/configuration.h index 289bbf5d..b62f0ef8 100644 --- a/gui/configuration.h +++ b/gui/configuration.h @@ -35,7 +35,7 @@ class ToolGUI; struct Configuration { Configuration(); ~Configuration(); - + /** * Fills this config object with values loaded from the permanent storage method */ @@ -94,7 +94,7 @@ struct Configuration { // flac wxString flacCompressionLevel; wxString flacBlockSize; - + // flac wxString oggQuality; wxString oggMinBitrate; diff --git a/gui/gui_tools.cpp b/gui/gui_tools.cpp index 7b1f76a8..d3eeb11a 100644 --- a/gui/gui_tools.cpp +++ b/gui/gui_tools.cpp @@ -157,7 +157,7 @@ void ToolGUI::run(const Configuration &conf) const { // flac compression->_flacCompressionLevel = (const char *)conf.flacCompressionLevel.mb_str(); compression->_flacBlockSize = (const char *)conf.flacBlockSize.mb_str(); - + // vorbis compression->_oggQuality = (const char *)conf.oggQuality.mb_str(); compression->_oggMinBitrate = (const char *)conf.oggMinBitrate.mb_str(); diff --git a/gui/gui_tools.h b/gui/gui_tools.h index 23fdbe50..f13c3921 100644 --- a/gui/gui_tools.h +++ b/gui/gui_tools.h @@ -65,7 +65,7 @@ public: void addGame(const wxString &game_name); /** - * Returns the list of valid inputs of this tool, along with the + * Returns the list of valid inputs of this tool, along with the * paths already set (if applicable) */ ToolInputs getInputList() const; @@ -91,14 +91,14 @@ public: ToolType getType() const; // Helper functions to get info about the tool - + /** * Returns true if the audio format(s) is supported by this tool - * + * * @param format The audio format(s) to test for */ bool supportsAudioFormat(AudioFormat format) const; - + /** * Returns true if the tool supports a load bar for displaying progress */ diff --git a/gui/main.cpp b/gui/main.cpp index 72491447..165bde75 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -62,7 +62,7 @@ IMPLEMENT_APP(ScummVMToolsApp) bool ScummVMToolsApp::OnInit() { // Init tools g_tools.init(); - + SetAppName(wxT("ScummVM Tools")); // Create window & display @@ -73,7 +73,7 @@ bool ScummVMToolsApp::OnInit() { #endif frame->SetMinSize(wxSize(600, 420)); SetTopWindow(frame); - + // Create and load configuration Configuration &configuration = frame->_configuration; @@ -88,9 +88,9 @@ bool ScummVMToolsApp::OnInit() { } else { frame->switchPage(new IntroPage(configuration)); } - + frame->Show(true); - + return true; } @@ -108,26 +108,26 @@ void ScummVMToolsApp::OnAbout() { wxStaticText *titletext = new wxStaticText(dialog, wxID_ANY, wxT("ScummTools GUI")); titletext->SetFont(wxFont(22, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Arial"))); sizer->Add(titletext, wxSizerFlags()); - + wxStaticText *versiontext = new wxStaticText(dialog, wxID_ANY, wxT("Development Version")); versiontext->SetForegroundColour(wxColor(128, 128, 128)); versiontext->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial"))); sizer->Add(versiontext, wxSizerFlags()); - + wxHyperlinkCtrl *websitetext = new wxHyperlinkCtrl(dialog, wxID_ANY, wxT("http://www.scummvm.org"), wxT("http://www.scummvm.org")); sizer->Add(websitetext, wxSizerFlags().Border(wxTOP, 5)); wxStaticText *copyrighttext = new wxStaticText(dialog, wxID_ANY, wxT("Copyright ScummVM Team 2009")); copyrighttext->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial"))); sizer->Add(copyrighttext, wxSizerFlags()); - + wxStaticText *descriptiontext = new wxStaticText(dialog, wxID_ANY, wxT("This tool allows you to extract data files from several different games \n") wxT("to be used by ScummVM, it can also compress audio data files into a more \n") wxT("compact format than the original.")); descriptiontext->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial"))); sizer->Add(descriptiontext, wxSizerFlags().Border(wxTOP, 6)); - + wxStaticText *licensetext = new wxStaticText(dialog, wxID_ANY, wxT("Published under the GNU General Public License\n") wxT("This program comes with ABSOLUTELY NO WARRANTY\n") @@ -182,7 +182,7 @@ ScummToolsFrame::ScummToolsFrame(const wxString &title, const wxPoint &pos, cons wxPanel *main = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxT("Wizard Main Panel")); wxSizer *sizer = new wxBoxSizer(wxVERTICAL); - + // Add the top header, it's sweet! sizer->Add( new Header(main, wxT("logo.jpg"), wxT("tile.gif"), wxT("Extraction & Compression Wizard")), @@ -197,21 +197,21 @@ ScummToolsFrame::ScummToolsFrame(const wxString &title, const wxPoint &pos, cons // We split it in two parts over a panel to have a small text there wxPanel *linepanel = new wxPanel(main, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE, wxT("Wizard Line Panel")); wxSizer *linesizer = new wxBoxSizer(wxHORIZONTAL); - + wxStaticText *linetext = new wxStaticText(linepanel, wxID_ANY, wxGetApp().GetAppName()); linesizer->Add(linetext, wxSizerFlags()); linetext->Disable(); wxStaticLine *line = new wxStaticLine( - linepanel, wxID_ANY, - wxDefaultPosition, wxSize(300, 1), + linepanel, wxID_ANY, + wxDefaultPosition, wxSize(300, 1), wxBORDER_SIMPLE | wxLI_HORIZONTAL, wxT("Line Spacer") ); line->Disable(); linesizer->Add(line, wxSizerFlags(1).Center()); linepanel->SetSizer(linesizer); - + // Add the line to the main panel sizer->Add(linepanel, wxSizerFlags().Expand().Center().Border()); @@ -236,7 +236,7 @@ void ScummToolsFrame::CreateMenuBar() { #ifdef __WXMAC__ wxApp::s_macHelpMenuTitleName = wxT("Help"); -#endif +#endif // Name of this seems really inappropriate wxMenu *helpmenu = new wxMenu(); @@ -409,7 +409,7 @@ WizardButtons::WizardButtons(wxWindow *parent, wxStaticText *linetext, Configura _cancel = new wxButton(this, ID_CANCEL, wxT("Cancel")); _cancel->SetSize(80, -1); sizer->Add(_cancel, wxSizerFlags().Right().ReserveSpaceEvenIfHidden()); - + topsizer->Add(sizer, wxSizerFlags().Right().Border()); SetSizerAndFit(topsizer); @@ -533,7 +533,7 @@ Header::Header(wxWindow *parent, const wxString &logo, const wxString &tile, con // Load font _font = wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false); - + // Set the text title _title = title; } @@ -543,7 +543,7 @@ void Header::onPaint(wxPaintEvent &evt) { int w, h; this->GetSize(&w, &h); - + if (_logo.IsOk() == false || _tile.IsOk() == false) { // If we couldn't load the images, use orange instead! dc.SetBackground(wxBrush(wxColor(213, 114, 0))); @@ -564,7 +564,7 @@ void Header::onPaint(wxPaintEvent &evt) { x += _tile.GetWidth(); } } - + dc.SetFont(_font); dc.DrawText(_title, 290, 70); } @@ -574,7 +574,7 @@ AdvancedSettingsDialog::AdvancedSettingsDialog(wxWindow *parent, Configuration & _defaults(defaults) { wxNotebook *notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP); - + _mp3 = new ChooseAudioOptionsMp3Page(defaults); _flac = new ChooseAudioOptionsFlacPage(defaults); _vorbis = new ChooseAudioOptionsVorbisPage(defaults); @@ -582,7 +582,7 @@ AdvancedSettingsDialog::AdvancedSettingsDialog(wxWindow *parent, Configuration & notebook->AddPage(_mp3panel = _mp3->CreatePanel(notebook), wxT("MP3")); notebook->AddPage(_flacpanel = _flac->CreatePanel(notebook), wxT("Flac")); notebook->AddPage(_vorbispanel = _vorbis->CreatePanel(notebook), wxT("Vorbis")); - + wxSizer *topsizer = new wxBoxSizer(wxVERTICAL); topsizer->Add(notebook, wxSizerFlags(1).Expand().Border()); diff --git a/gui/main.h b/gui/main.h index af66d630..1a32bbc1 100644 --- a/gui/main.h +++ b/gui/main.h @@ -73,7 +73,7 @@ public: * Switches page, old page is stored on a stack for going backwards * Buttons are reset, and state is saved * - * @param nextPage The page to switch too, the old page window will be destroyed + * @param nextPage The page to switch too, the old page window will be destroyed * and this page displayed in it's stead. */ void switchPage(WizardPage *nextPage) { @@ -119,7 +119,7 @@ private: void switchPage(WizardPage *nextPage, bool moveback); wxPanel *_wizardpane; - + std::vector _pages; DECLARE_EVENT_TABLE() @@ -173,13 +173,13 @@ public: /** * Display the previous/next button. - */ + */ void showNavigation(bool show); /** * Display the previous button. * If the showNavigation has been used, this overrides that (for the previous button). - */ + */ void showPrevious(bool show); /** diff --git a/gui/pages.cpp b/gui/pages.cpp index e886737b..adcdd19f 100644 --- a/gui/pages.cpp +++ b/gui/pages.cpp @@ -126,9 +126,9 @@ wxWindow *IntroPage::CreatePanel(wxWindow *parent) { sizer->AddSpacer(15); - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Welcome to the ScummVM extraction and compression utility.\nWhat do you want to do?"))); - + sizer->AddSpacer(15); wxSizer *sidesizer = new wxBoxSizer(wxHORIZONTAL); @@ -142,7 +142,7 @@ wxWindow *IntroPage::CreatePanel(wxWindow *parent) { buttonpanel = new wxPanel(panel, wxID_ANY); buttonsizer = new wxBoxSizer(wxVERTICAL); buttonsizer->Add(new wxButton(buttonpanel, ID_COMPRESS, wxT("Compress")), wxSizerFlags().Expand()); - buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, + buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, wxT("Compress game audio files into archives."), wxDefaultPosition, wxSize(110, 60), wxALIGN_CENTER)); buttonpanel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IntroPage::onClickCompress), NULL, this); @@ -154,7 +154,7 @@ wxWindow *IntroPage::CreatePanel(wxWindow *parent) { buttonpanel = new wxPanel(panel, wxID_ANY); buttonsizer = new wxBoxSizer(wxVERTICAL); buttonsizer->Add(new wxButton(buttonpanel, ID_EXTRACT, wxT("Extract")), wxSizerFlags().Expand()); - buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, + buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, wxT("Extract the contents of archive files."), wxDefaultPosition, wxSize(110, 60), wxALIGN_CENTER)); buttonpanel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IntroPage::onClickExtract), NULL, this); @@ -166,7 +166,7 @@ wxWindow *IntroPage::CreatePanel(wxWindow *parent) { buttonpanel = new wxPanel(panel, wxID_ANY); buttonsizer = new wxBoxSizer(wxVERTICAL); buttonsizer->Add(new wxButton(buttonpanel, ID_ADVANCED, wxT("Advanced")), wxSizerFlags().Expand()); - buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, + buttonsizer->Add(new wxStaticText(buttonpanel, wxID_ANY, wxT("Choose the precise tool you want to use."), wxDefaultPosition, wxSize(110, 60), wxALIGN_CENTER)); buttonpanel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IntroPage::onClickAdvanced), NULL, this); @@ -186,7 +186,7 @@ wxString IntroPage::getHelp() { void IntroPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { buttons->setLineLabel(wxT("ScummVM Tools")); - + buttons->showNavigation(false); WizardPage::updateButtons(panel, buttons); @@ -230,21 +230,21 @@ wxWindow *ChooseToolPage::CreatePanel(wxWindow *parent) { wxArrayString choices; if (!_options.empty()) { - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("There are multiple possible tools for this input, please select the correct one.\n\n") wxT("If none of the tools appear to match, you probably supplied the wrong file."))); choices = _options; } else { - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Select what tool you'd like to use."))); choices = g_tools.getToolList(TOOLTYPE_ALL); } wxString toolname = choices.front(); - + sizer->AddSpacer(20); - wxChoice *tool = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxChoice *tool = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices, 0, wxDefaultValidator, wxT("ToolSelection")); tool->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(ChooseToolPage::onChangeTool), NULL, this); @@ -277,7 +277,7 @@ wxWindow *ChooseToolPage::CreatePanel(wxWindow *parent) { } void ChooseToolPage::save(wxWindow *panel) { - _configuration.selectedTool = + _configuration.selectedTool = g_tools.get(static_cast(panel->FindWindowByName(wxT("ToolSelection")))->GetStringSelection()); } @@ -299,13 +299,13 @@ void ChooseToolPage::onNext(wxWindow *panel) { void ChooseToolPage::onChangeTool(wxCommandEvent &evt) { wxChoice *tool = dynamic_cast(evt.GetEventObject()); wxStaticText *text = dynamic_cast(tool->GetParent()->FindWindowByName(wxT("ToolText"))); - + text->SetLabel(g_tools[tool->GetStringSelection()].getShortHelp()); } void ChooseToolPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { buttons->setLineLabel(wxT("ScummVM Tools")); - + WizardPage::updateButtons(panel, buttons); } @@ -321,7 +321,7 @@ void ChooseIOPage::onSelectFile(wxFileDirPickerEvent &evt) { wxWindow *win = dynamic_cast(evt.GetEventObject()); wxPanel *panel = dynamic_cast(win->GetParent()); - + updateButtons(panel, _topframe->_buttons); } @@ -329,7 +329,7 @@ void ChooseIOPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { wxWindow *picker = NULL; if (!picker) picker = panel->FindWindowByName(wxT("InputPicker")); - + const ToolGUI *tool = _configuration.selectedTool; if (tool && !picker) { for (size_t i = 1; i < tool->getInputList().size(); ++i) { @@ -349,9 +349,9 @@ void ChooseIOPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { wxFilePickerCtrl *inFileWindow = dynamic_cast(picker); buttons->enableNext( - (inDirWindow && inDirWindow->GetPath().size() > 0) || + (inDirWindow && inDirWindow->GetPath().size() > 0) || (inFileWindow && inFileWindow->GetPath().size() > 0)); - + WizardPage::updateButtons(panel, buttons); } @@ -368,9 +368,9 @@ wxWindow *ChooseInPage::CreatePanel(wxWindow *parent) { wxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->AddSpacer(15); - + // some help perhaps? - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Select an input file, if you have two input files (CD1 and CD2), ") wxT("you will be queried for the other file later.") wxT("You can also drag & drop a file on this window.") @@ -384,10 +384,10 @@ wxWindow *ChooseInPage::CreatePanel(wxWindow *parent) { wxSizer *pickersizer = new wxBoxSizer(wxHORIZONTAL); wxFilePickerCtrl *picker = new wxFilePickerCtrl( - panel, wxID_ANY, wxEmptyString, wxT("Select a file"), - wxT("*.*"), + panel, wxID_ANY, wxEmptyString, wxT("Select a file"), + wxT("*.*"), wxDefaultPosition, wxSize(300, -1), - wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, + wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, wxT("InputPicker")); panel->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(ChooseIOPage::onSelectFile), NULL, this); if (_configuration.inputFilePaths.size() > 0) @@ -398,21 +398,21 @@ wxWindow *ChooseInPage::CreatePanel(wxWindow *parent) { sizer->Add(pickersizer, wxSizerFlags().Expand()); sizer->AddSpacer(30); - /* + /* // TODO: There is no way to select directory input, yet } else { inputbox->Add(new wxDirPickerCtrl( - panel, wxID_ANY, wxEmptyString, wxT("Select a folder"), - wxDefaultPosition, wxDefaultSize, - wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, + panel, wxID_ANY, wxEmptyString, wxT("Select a folder"), + wxDefaultPosition, wxDefaultSize, + wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, wxT("InputPicker")), wxSizerFlags().Expand()); - + } */ - + SetAlignedSizer(panel, sizer); - + return panel; } @@ -486,7 +486,7 @@ wxWindow *ChooseExtraInPage::CreatePanel(wxWindow *parent) { wxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->AddSpacer(15); - + const ToolGUI &tool = *_configuration.selectedTool; // some help perhaps? @@ -514,18 +514,18 @@ wxWindow *ChooseExtraInPage::CreatePanel(wxWindow *parent) { if (input.file) { inputsizer->Add(new wxFilePickerCtrl( - panel, wxID_ANY, inputFile, wxT("Select a file"), - wxString(input.format.c_str(), wxConvUTF8), - wxDefaultPosition, wxDefaultSize, - wxFLP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST, wxDefaultValidator, + panel, wxID_ANY, inputFile, wxT("Select a file"), + wxString(input.format.c_str(), wxConvUTF8), + wxDefaultPosition, wxDefaultSize, + wxFLP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST, wxDefaultValidator, windowName), wxSizerFlags().Expand()); panel->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(ChooseIOPage::onSelectFile), NULL, this); } else { inputsizer->Add(new wxDirPickerCtrl( - panel, wxID_ANY, inputFile, wxT("Select a folder"), - wxDefaultPosition, wxDefaultSize, - wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, + panel, wxID_ANY, inputFile, wxT("Select a folder"), + wxDefaultPosition, wxDefaultSize, + wxFLP_USE_TEXTCTRL | wxFLP_OPEN, wxDefaultValidator, windowName), wxSizerFlags().Expand()); panel->Connect(wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler(ChooseIOPage::onSelectFile), NULL, this); @@ -598,18 +598,18 @@ wxWindow *ChooseOutPage::CreatePanel(wxWindow *parent) { wxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->AddSpacer(15); - + const ToolGUI &tool = *_configuration.selectedTool; // some help perhaps? - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Select an output directory (using tool ") + _configuration.selectedTool->getName() + wxT(").\n\n") + wxT("Note: Some tools display file picker here, this should perhaps be changed to always ") + wxT("be directory output, since often don't want to name the output file.)") ), wxSizerFlags(1).Expand()); - // Create input selection + // Create input selection sizer->AddSpacer(10); @@ -618,11 +618,11 @@ wxWindow *ChooseOutPage::CreatePanel(wxWindow *parent) { if (tool.outputToDirectory()) { wxStaticBoxSizer *box = new wxStaticBoxSizer(wxHORIZONTAL, panel, wxT("Destination folder")); - + wxDirPickerCtrl *picker = new wxDirPickerCtrl( - panel, wxID_ANY, _configuration.outputPath, wxT("Select a folder"), + panel, wxID_ANY, _configuration.outputPath, wxT("Select a folder"), wxDefaultPosition, wxSize(300, -1), - wxFLP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST, wxDefaultValidator, + wxFLP_USE_TEXTCTRL | wxDIRP_DIR_MUST_EXIST, wxDefaultValidator, wxT("OutputPicker")); box->Add(picker, wxSizerFlags(1).Expand()); @@ -634,16 +634,16 @@ wxWindow *ChooseOutPage::CreatePanel(wxWindow *parent) { wxStaticBoxSizer *box = new wxStaticBoxSizer(wxHORIZONTAL, panel, wxT("Destination file")); wxFilePickerCtrl *picker = new wxFilePickerCtrl( - panel, wxID_ANY, _configuration.outputPath, wxT("Select a file"), + panel, wxID_ANY, _configuration.outputPath, wxT("Select a file"), wxT("*.*"), wxDefaultPosition, wxSize(300, -1), - wxFLP_USE_TEXTCTRL | wxFLP_OVERWRITE_PROMPT | wxFLP_SAVE, wxDefaultValidator, + wxFLP_USE_TEXTCTRL | wxFLP_OVERWRITE_PROMPT | wxFLP_SAVE, wxDefaultValidator, wxT("OutputPicker")); box->Add(picker, wxSizerFlags(1).Expand()); panel->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(ChooseIOPage::onSelectFile), NULL, this); picker->SetPath(_configuration.outputPath); - + colsizer->Add(box, wxSizerFlags(2).Expand()); } @@ -694,14 +694,14 @@ wxWindow *ChooseTargetPlatformPage::CreatePanel(wxWindow *parent) { sizer->AddSpacer(15); - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Select target platform (The platform ScummVM will run on)"))); sizer->AddSpacer(20); - + wxArrayString choices = _configuration.getTargetPlatforms(); - wxChoice *platform = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(80, -1), + wxChoice *platform = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(80, -1), choices, 0, wxDefaultValidator, wxT("PlatformSelection")); sizer->Add(platform, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -746,11 +746,11 @@ wxWindow *ChooseAudioFormatPage::CreatePanel(wxWindow *parent) { sizer->AddSpacer(15); - sizer->Add(new wxStaticText(panel, wxID_ANY, + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Select audio format you want to compress to."))); sizer->AddSpacer(20); - + wxArrayString choices; const ToolGUI *tool = _configuration.selectedTool; @@ -762,13 +762,13 @@ wxWindow *ChooseAudioFormatPage::CreatePanel(wxWindow *parent) { if (tool->supportsAudioFormat(AUDIO_MP3)) choices.Add(wxT("MP3")); - wxChoice *format = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(80, -1), + wxChoice *format = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxSize(80, -1), choices, 0, wxDefaultValidator, wxT("AudioSelection")); sizer->Add(format); - + sizer->AddSpacer(10); - wxCheckBox *advanced = new wxCheckBox(panel, wxID_ANY, wxT("Select advanced audio settings"), + wxCheckBox *advanced = new wxCheckBox(panel, wxID_ANY, wxT("Select advanced audio settings"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("AdvancedAudio")); sizer->Add(advanced); @@ -834,7 +834,7 @@ ChooseAudioOptionsMp3Page::ChooseAudioOptionsMp3Page(Configuration &config) wxWindow *ChooseAudioOptionsMp3Page::CreatePanel(wxWindow *parent) { wxWindow *panel = WizardPage::CreatePanel(parent); - + /* "\nMP3 mode params:\n" " -b is the target bitrate(ABR)/minimal bitrate(VBR) (default:" minBitrDef_str "%d)\n" @@ -853,13 +853,13 @@ wxWindow *ChooseAudioOptionsMp3Page::CreatePanel(wxWindow *parent) { // Type of compression sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Compression Type:"))); - wxRadioButton *abrButton = new wxRadioButton(panel, wxID_ANY, wxT("ABR"), + wxRadioButton *abrButton = new wxRadioButton(panel, wxID_ANY, wxT("ABR"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("ABR")); wxSizer *radioSizer = new wxBoxSizer(wxHORIZONTAL); radioSizer->Add(abrButton); - - wxRadioButton *vbrButton = new wxRadioButton(panel, wxID_ANY, wxT("VBR"), + + wxRadioButton *vbrButton = new wxRadioButton(panel, wxID_ANY, wxT("VBR"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("VBR")); radioSizer->Add(vbrButton); @@ -875,23 +875,23 @@ wxWindow *ChooseAudioOptionsMp3Page::CreatePanel(wxWindow *parent) { sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Minimum Bitrate:"))); wxChoice *vbrMinBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("MinimumBitrate")); sizer->Add(vbrMinBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Maximum Bitrate:"))); - + wxChoice *vbrMaxBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("MaximumBitrate")); sizer->Add(vbrMaxBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Average Bitrate:"))); - + wxChoice *abrAvgBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("AverageBitrate")); sizer->Add(abrAvgBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -906,17 +906,17 @@ wxWindow *ChooseAudioOptionsMp3Page::CreatePanel(wxWindow *parent) { } sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("VBR Quality:"))); - + wxChoice *vbrQuality = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleQualityCount, possibleQualities, 0, wxDefaultValidator, wxT("VBRQuality")); sizer->Add(vbrQuality, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("MPEG Quality:"))); - + wxChoice *mpegQuality = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleQualityCount, possibleQualities, 0, wxDefaultValidator, wxT("MpegQuality")); sizer->Add(mpegQuality, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -973,7 +973,7 @@ void ChooseAudioOptionsMp3Page::updateFields(wxWindow *panel) { vbrMinBitrate->Enable(!abr->GetValue()); vbrMaxBitrate->Enable(!abr->GetValue()); vbrQuality->Enable(!abr->GetValue()); - + abrAvgBitrate->Enable(abr->GetValue()); } @@ -996,14 +996,14 @@ ChooseAudioOptionsFlacPage::ChooseAudioOptionsFlacPage(Configuration &config) wxWindow *ChooseAudioOptionsFlacPage::CreatePanel(wxWindow *parent) { wxWindow *panel = WizardPage::CreatePanel(parent); - + wxSizer *topsizer = new wxBoxSizer(wxVERTICAL); topsizer->AddSpacer(15); - topsizer->Add(new wxStaticText(panel, wxID_ANY, + topsizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Choose advanced audio options, high compression levels means better quality,\nlower faster runtime."))); topsizer->AddSpacer(10); - + /* "\nFlac mode params:\n" \ " --fast FLAC uses compression level 0\n" \ @@ -1016,9 +1016,9 @@ wxWindow *ChooseAudioOptionsFlacPage::CreatePanel(wxWindow *parent) { wxFlexGridSizer *sizer = new wxFlexGridSizer(2, 2, 10, 25); sizer->AddGrowableCol(1); - - // + + // // Compression Level const int possibleLevelCount = 9; @@ -1028,9 +1028,9 @@ wxWindow *ChooseAudioOptionsFlacPage::CreatePanel(wxWindow *parent) { } sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Compression Level:"))); - + wxChoice *compressionLevel = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleLevelCount, possibleLevels, 0, wxDefaultValidator, wxT("CompressionLevel")); sizer->Add(compressionLevel, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -1047,10 +1047,10 @@ wxWindow *ChooseAudioOptionsFlacPage::CreatePanel(wxWindow *parent) { sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Block Size:"))); wxChoice *blockSize = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, sizeof blockSizes / sizeof *blockSizes, blockSizes, 0, wxDefaultValidator, wxT("BlockSize")); sizer->Add(blockSize, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + // Finish the window topsizer->Add(sizer); SetAlignedSizer(panel, topsizer); @@ -1085,7 +1085,7 @@ ChooseAudioOptionsVorbisPage::ChooseAudioOptionsVorbisPage(Configuration &config wxWindow *ChooseAudioOptionsVorbisPage::CreatePanel(wxWindow *parent) { wxWindow *panel = WizardPage::CreatePanel(parent); - + /* Vorbis mode params " -b is the nominal bitrate (default:unset)\n" \ " -m is the minimum bitrate (default:unset)\n" \ @@ -1107,23 +1107,23 @@ wxWindow *ChooseAudioOptionsVorbisPage::CreatePanel(wxWindow *parent) { sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Minimum Bitrate:"))); wxChoice *MinBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("MinimumBitrate")); sizer->Add(MinBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Nominal Bitrate:"))); - + wxChoice *AvgBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("NominalBitrate")); sizer->Add(AvgBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); - + sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Maximum Bitrate:"))); - + wxChoice *MaxBitrate = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleBitrateCount, possibleBitrates, 0, wxDefaultValidator, wxT("MaximumBitrate")); sizer->Add(MaxBitrate, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -1135,9 +1135,9 @@ wxWindow *ChooseAudioOptionsVorbisPage::CreatePanel(wxWindow *parent) { } sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Quality:"))); - + wxChoice *quality = new wxChoice( - panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, possibleQualityCount, possibleQualities, 0, wxDefaultValidator, wxT("Quality")); sizer->Add(quality, wxSizerFlags().Expand().Border(wxRIGHT, 100)); @@ -1197,12 +1197,12 @@ wxWindow *ProcessPage::CreatePanel(wxWindow *parent) { sizer->AddSpacer(15); sizer->Add(new wxStaticText(panel, wxID_ANY, wxT("Processing data...")), wxSizerFlags().Expand().Border(wxLEFT, 20)); - - _outwin = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, + + _outwin = new wxTextCtrl(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY, wxDefaultValidator, wxT("OutputWindow")); sizer->Add(_outwin, wxSizerFlags(1).Expand().Border(wxTOP | wxLEFT | wxRIGHT, 10)); - _gauge = new wxGauge(panel, wxID_ANY, _output.total, wxDefaultPosition, wxDefaultSize, + _gauge = new wxGauge(panel, wxID_ANY, _output.total, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL, wxDefaultValidator, wxT("ProgressBar")); sizer->Add(_gauge, wxSizerFlags(0).Expand().Border(wxBOTTOM | wxLEFT | wxRIGHT, 10)); @@ -1236,10 +1236,10 @@ wxString ProcessPage::getHelp() { bool ProcessPage::onIdle(wxPanel *panel) { const ToolGUI *tool = _configuration.selectedTool; - + if (!_thread) return false; - + // This function can be called recursively, by checking if lock is available, we avoid it if (_output.mutex.TryLock() == wxMUTEX_BUSY) return false; @@ -1263,7 +1263,7 @@ bool ProcessPage::onIdle(wxPanel *panel) { if (_output.cmd) { // We have a waiting subprocess to run, the other thread is sleeping since we could lock the mutex - + #ifdef __WINDOWS__ // Only windows needs this // It hides the process window, on unix it doesn't appear to work very well @@ -1282,7 +1282,7 @@ bool ProcessPage::onIdle(wxPanel *panel) { // Check if thread finished if (_thread && _thread->_finished) { - // Tool has finished + // Tool has finished _success = _thread->_success; // Wait deallocates thread resources _thread->Wait(); @@ -1347,15 +1347,15 @@ void ProcessPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { // The thread a tool is run in -ProcessToolThread::ProcessToolThread(const ToolGUI *tool, Configuration &configuration, ThreadCommunicationBuffer &output) : - wxThread(wxTHREAD_JOINABLE), +ProcessToolThread::ProcessToolThread(const ToolGUI *tool, Configuration &configuration, ThreadCommunicationBuffer &output) : + wxThread(wxTHREAD_JOINABLE), _configuration(configuration), - _output(output) + _output(output) { _tool = tool; _finished = false; _success = false; - + _tool->_backend->setPrintFunction(writeToOutput, reinterpret_cast(this)); _tool->_backend->setProgressFunction(gaugeProgress, reinterpret_cast(this)); _tool->_backend->setSubprocessFunction(spawnSubprocess, reinterpret_cast(this)); @@ -1381,14 +1381,14 @@ void ProcessToolThread::abort() { void ProcessToolThread::writeToOutput(void *udata, const char *text) { ProcessToolThread *self = reinterpret_cast(udata); - + wxMutexLocker lock(self->_output.mutex); self->_output.buffer += text; } void ProcessToolThread::gaugeProgress(void *udata, int done, int total) { ProcessToolThread *self = reinterpret_cast(udata); - + wxMutexLocker lock(self->_output.mutex); self->_output.done = done; self->_output.total = total; @@ -1396,7 +1396,7 @@ void ProcessToolThread::gaugeProgress(void *udata, int done, int total) { int ProcessToolThread::spawnSubprocess(void *udata, const char *cmd) { ProcessToolThread *self = reinterpret_cast(udata); - + wxASSERT_MSG(self->_output.subprocessFinished == NULL, wxT("You can only spawn one subprocess.")); wxMutexLocker mutex(self->_output.mutex); @@ -1437,7 +1437,7 @@ wxWindow *FinishPage::CreatePanel(wxWindow *parent) { sizer->AddSpacer(10); - wxCheckBox *displayOut = new wxCheckBox(panel, wxID_ANY, wxT("Open output folder"), wxDefaultPosition, wxDefaultSize, + wxCheckBox *displayOut = new wxCheckBox(panel, wxID_ANY, wxT("Open output folder"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("DisplayOutput")); displayOut->SetValue(true); sizer->Add(displayOut); @@ -1469,7 +1469,7 @@ wxString FinishPage::getHelp() { void FinishPage::updateButtons(wxWindow *panel, WizardButtons *buttons) { buttons->enablePrevious(false); buttons->showFinish(true); - + WizardPage::updateButtons(panel, buttons); } @@ -1504,7 +1504,7 @@ void FailurePage::onNext(wxWindow *panel) { void FailurePage::updateButtons(wxWindow *panel, WizardButtons *buttons) { buttons->enablePrevious(false); buttons->showFinish(true); - + WizardPage::updateButtons(panel, buttons); } diff --git a/gui/pages.h b/gui/pages.h index 8a02c429..46716ca6 100644 --- a/gui/pages.h +++ b/gui/pages.h @@ -29,9 +29,9 @@ class Tool; class wxFileDirPickerEvent; /** - * A backend of a page in the wizard + * A backend of a page in the wizard * This class is decoupled from the UI, and you can spawn as many pages as you like from this template - * + * * @todo Add the ability to not have to have a ScummToolsFrame as parent, to be able to put the pages * in a default config window, for example. */ @@ -53,7 +53,7 @@ public: /** * Creates a visual representation of this page as a child problem of the supplied parent * Values will be loaded from the configuration object stored by the ScummToolsFrame - * + * * @param parent The parent window, the page will be a direct child window of this window. * @return The created window. */ @@ -71,9 +71,9 @@ public: * the ScummToolsFrame that was passed to the constructor * * @param panel Panel to read data from, should be a window created by CreatePanel - */ + */ virtual void save(wxWindow *panel); - + /** * Returns the associated help text with this page * @@ -82,7 +82,7 @@ public: virtual wxString getHelp(); // Event handlers - + /** * This handler is called when the user clicks the Next button, if you overload this * you should generally just call switchPage with the next page in the wizard @@ -127,8 +127,8 @@ public: virtual bool onIdle(wxPanel *panel); protected: - /** - * This adds an offset (about 100px) to the left of the sizer to center the text somewhat, before adding it + /** + * This adds an offset (about 100px) to the left of the sizer to center the text somewhat, before adding it * to the panel using wxWindow::SetSizer. * * @param panel The panel associated with this page, should have bene created by CreatePanel previously. @@ -144,18 +144,18 @@ protected: /** * Introduction page. Introduces the option to extract, compress or the advanced route (choose tool manually) - * + * * @todo Add the ability to drag & drop files onto this window, to automatically detect whether to compress or extract */ class IntroPage : public WizardPage { public: IntroPage(Configuration &configuration); - + wxWindow *CreatePanel(wxWindow *parent); wxString getHelp(); - + void updateButtons(wxWindow *panel, WizardButtons *buttons); void onClickCompress(wxCommandEvent &e); @@ -181,11 +181,11 @@ public: void onNext(wxWindow *panel); void save(wxWindow *panel); - + wxString getHelp(); void onChangeTool(wxCommandEvent &evt); - + void updateButtons(wxWindow *panel, WizardButtons *buttons); protected: @@ -201,7 +201,7 @@ public: ChooseIOPage(Configuration &configuration); void onSelectFile(wxFileDirPickerEvent &evt); - + void updateButtons(wxWindow *panel, WizardButtons *buttons); }; @@ -216,11 +216,11 @@ public: wxWindow *CreatePanel(wxWindow *parent); void onNext(wxWindow *panel); - + wxString getHelp(); void save(wxWindow *panel); - + void updateButtons(wxWindow *panel, WizardButtons *buttons); }; @@ -235,7 +235,7 @@ public: wxWindow *CreatePanel(wxWindow *parent); void onNext(wxWindow *panel); - + wxString getHelp(); void save(wxWindow *panel); @@ -255,7 +255,7 @@ public: wxWindow *CreatePanel(wxWindow *parent); void onNext(wxWindow *panel); - + wxString getHelp(); void save(wxWindow *panel); @@ -274,7 +274,7 @@ public: wxWindow *CreatePanel(wxWindow *parent); void onNext(wxWindow *panel); - + wxString getHelp(); void save(wxWindow *panel); @@ -291,7 +291,7 @@ public: wxWindow *CreatePanel(wxWindow *parent); void onNext(wxWindow *panel); - + wxString getHelp(); void save(wxWindow *panel); @@ -401,8 +401,8 @@ public: void abort(); /** - * Write to the output window pointed to by udata, this adds - * the message to a locked queue, and prints it to the GUI from + * Write to the output window pointed to by udata, this adds + * the message to a locked queue, and prints it to the GUI from * the main thread, as doing it from another thread can cause weird bugs. */ static void writeToOutput(void *udata, const char *text); @@ -465,7 +465,7 @@ public: * @param outwin Text control to redirect output to */ void runTool(); - + wxString getHelp(); bool onIdle(wxPanel *panel); @@ -486,7 +486,7 @@ public: FinishPage(Configuration &configuration); wxWindow *CreatePanel(wxWindow *parent); - + wxString getHelp(); void onNext(wxWindow *panel); diff --git a/scummvm-tools-cli.cpp b/scummvm-tools-cli.cpp index 9fb84bae..7f8225fd 100644 --- a/scummvm-tools-cli.cpp +++ b/scummvm-tools-cli.cpp @@ -34,7 +34,7 @@ ToolsCLI::~ToolsCLI() { int ToolsCLI::run(int argc, char *argv[]) { // No matter what we ouput, we should begin with a newline - std::cout << std::endl; + std::cout << std::endl; if (argc == 1) { // Run without any arguments @@ -90,7 +90,7 @@ int ToolsCLI::run(int argc, char *argv[]) { std::deque::reverse_iterator reader = arguments.rbegin(); std::deque::iterator hint_arg; std::string infile; - + hint_arg = std::find(arguments.begin(), arguments.end(), "compress"); if (hint_arg != arguments.end()) { type = TOOLTYPE_COMPRESSION; @@ -113,7 +113,7 @@ int ToolsCLI::run(int argc, char *argv[]) { // It must be a filename now choices = inspectInput(*reader, type); - + // If anything matched, we stop if (choices.size() > 0) { infile = *reader; @@ -167,7 +167,7 @@ int ToolsCLI::run(int argc, char *argv[]) { if (!std::cin) { // Clear any error flags std::cin.clear(); - + std::string q; std::cin >> q; if (q == "q" || q == "exit" || q == "quit" || q == "abort") @@ -184,7 +184,7 @@ int ToolsCLI::run(int argc, char *argv[]) { } std::cout << "\tRunning using " << tool->getName() << std::endl; - + // Run the tool, with the remaining arguments arguments.push_front(tool->getName()); return tool->run(arguments); @@ -194,7 +194,7 @@ int ToolsCLI::run(int argc, char *argv[]) { } void ToolsCLI::printHelp(const char *exeName) { - std::cout << + std::cout << "\tScummVM Tools master interface" << std::endl << std::endl << "\tCommon use:" << std::endl << diff --git a/tool.cpp b/tool.cpp index 3f952e30..a6f9a216 100644 --- a/tool.cpp +++ b/tool.cpp @@ -133,7 +133,7 @@ int Tool::run(const std::deque &args) { void Tool::run() { // Reset abort state _abort = false; - + setTempFileName(); @@ -157,7 +157,7 @@ InspectionMatch Tool::inspectInput(const Common::Filename &filename) { // Directory, we don't handle this yet, don't display at all return IMATCH_AWFUL; } - + Common::Filename cmp_filename = p; if (cmp_filename.getName() == "*") { diff --git a/tool.h b/tool.h index 88da4786..835608ae 100644 --- a/tool.h +++ b/tool.h @@ -29,8 +29,8 @@ #include "common/file.h" -/** - * Different types of tools, used to differentiate them when +/** + * Different types of tools, used to differentiate them when * fetching lists of games & tools. */ enum ToolType { @@ -44,7 +44,7 @@ enum ToolType { * Return type of the inspectInput function, perfect match means we know we can * parse this file, possible means we might be able to, Awful means we most likely * can't read this file. - * If there are perfect results, those are displayed first, if there are none, + * If there are perfect results, those are displayed first, if there are none, * possible results are displayed and finally awful results are dispalyed. */ enum InspectionMatch { @@ -54,7 +54,7 @@ enum InspectionMatch { }; /** - * Describes a possible input to the tool (since some take two seperate files, + * Describes a possible input to the tool (since some take two seperate files, * some a dir and some a single file. */ struct ToolInput { @@ -162,15 +162,15 @@ public: /** * This function sets the function which will be called needs to * output something. - * + * * @param f the function to be called, it takes a userdata argument in addition to text to print * @param udata The userdata to call to the print function each time it is called */ void setPrintFunction(void f(void *, const char *), void *udata); - + /** * Set the function that is called on status updates. - * Parameters to the function are 'done' and 'total', if total is 0, + * Parameters to the function are 'done' and 'total', if total is 0, * it's a simple status notification (print a dot or something). * * @param f this function will be called with udata arguments and 'done' / 'total' @@ -227,7 +227,7 @@ protected: /** Status of internal abort flag, if set, next call to *Progress will throw. */ bool _abort; - + private: typedef void (*PrintFunction)(void *, const char *); PrintFunction _internalPrint; @@ -243,7 +243,7 @@ private: // Standard print function static void standardPrint(void *udata, const char *message); - + // Standard progress function static void standardProgress(void *udata, int done, int total); diff --git a/tool_exception.h b/tool_exception.h index 24b708f4..37f964fe 100644 --- a/tool_exception.h +++ b/tool_exception.h @@ -50,7 +50,7 @@ public: * Usually premature end, or that it could not be opened (write / read protected) */ class AbortException : public ToolException { -public: +public: AbortException() : ToolException("Operation was aborted", -2) {} }; diff --git a/tools.cpp b/tools.cpp index 38408288..7fc80f29 100644 --- a/tools.cpp +++ b/tools.cpp @@ -105,7 +105,7 @@ Tools::ToolList Tools::inspectInput(const Common::Filename &filename, ToolType t for (ToolList::const_iterator tool = _tools.begin(); tool != _tools.end(); ++tool) { if (type == TOOLTYPE_ALL || (*tool)->getType() == type) { InspectionMatch m = (*tool)->inspectInput(filename); - + if (m == IMATCH_PERFECT) perfect_choices.push_back(*tool); else if (m == IMATCH_POSSIBLE) diff --git a/tools.h b/tools.h index e90d4591..925459a4 100644 --- a/tools.h +++ b/tools.h @@ -36,7 +36,7 @@ public: ~Tools(); typedef std::vector ToolList; - + /** * Returns a list of the tools that supports opening the input file * specified in the input list.