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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jun 11 23:42:48 CEST 2009


Revision: 41455
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41455&view=rev
Author:   fingolfin
Date:     2009-06-11 21:42:48 +0000 (Thu, 11 Jun 2009)

Log Message:
-----------
Added util.o to deps of extract_agos; fixed some warnings/errors

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/Makefile
    tools/branches/gsoc2009-gui/compress.cpp
    tools/branches/gsoc2009-gui/compress.h
    tools/branches/gsoc2009-gui/compress_agos.cpp
    tools/branches/gsoc2009-gui/compress_gob.cpp
    tools/branches/gsoc2009-gui/util.cpp

Modified: tools/branches/gsoc2009-gui/Makefile
===================================================================
--- tools/branches/gsoc2009-gui/Makefile	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/Makefile	2009-06-11 21:42:48 UTC (rev 41455)
@@ -171,7 +171,7 @@
 extract_cine$(EXEEXT): extract_cine.o util.o
 	$(CXX) $(LDFLAGS) -o $@ $+
 
-extract_agos$(EXEEXT): extract_agos.o
+extract_agos$(EXEEXT): extract_agos.o util.o
 	$(CXX) $(LDFLAGS) -o $@ $+
 
 extract_gob_stk$(EXEEXT): extract_gob_stk.o util.o

Modified: tools/branches/gsoc2009-gui/compress.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress.cpp	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/compress.cpp	2009-06-11 21:42:48 UTC (rev 41455)
@@ -22,6 +22,14 @@
 
 #include "compress.h"
 
+// The order should match the CompressMode enum
+const char *audio_extensions[] = {
+	".unk",
+	".mp3",
+	".ogg",
+	".fla"
+};
+
 typedef struct  {
 	uint32 minBitr;
 	uint32 maxBitr;
@@ -913,6 +921,8 @@
 		if (!process_flac_parms(argc - 2, argv, i))
 			return kNoAudioMode;
 		break;
+	case kNoAudioMode:	// cannot occur but we check anyway to avoid compiler warnings
+		break;
 	}
 
 	return compMode;

Modified: tools/branches/gsoc2009-gui/compress.h
===================================================================
--- tools/branches/gsoc2009-gui/compress.h	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/compress.h	2009-06-11 21:42:48 UTC (rev 41455)
@@ -56,16 +56,16 @@
 #define TEMP_OGG	"tempfile.ogg"
 #define TEMP_FLAC	"tempfile.fla"
 
-typedef enum { kNoAudioMode, kMP3Mode, kVorbisMode, kFlacMode } CompressMode;
-
-// The order should match the enum above
-static const char *audio_extensions[] = {
-	".unk",
-	".mp3",
-	".ogg",
-	".fla"
+enum CompressMode {
+	kNoAudioMode,
+	kMP3Mode,
+	kVorbisMode,
+	kFlacMode
 };
 
+extern const char *audio_extensions[];
+
+
 /*
  * Stuff which is in compress.c
  */

Modified: tools/branches/gsoc2009-gui/compress_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_agos.cpp	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/compress_agos.cpp	2009-06-11 21:42:48 UTC (rev 41455)
@@ -248,7 +248,7 @@
 
 	Filename inpath;
 	int first_arg = 1;
-	int last_arg = argc - 1;
+//	int last_arg = argc - 1;
 
 	parseHelpArguments(argv, argc, helptext);
 

Modified: tools/branches/gsoc2009-gui/compress_gob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.cpp	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/compress_gob.cpp	2009-06-11 21:42:48 UTC (rev 41455)
@@ -47,7 +47,6 @@
 
 int main(int argc, char **argv) {
 	char *outFilename;
-	char *tmpStr;
 	Chunk *chunks;
 	FILE *stk;
 	FILE *gobConf;
@@ -253,7 +252,7 @@
 	uint16 dicoIndex;
 	uint32 unpackedIndex, size;
 	uint8 cmd;
-	uint8 buffIndex, cpt, i;
+	uint8 buffIndex, cpt;
 	uint16 resultcheckpos;
 	byte resultchecklength;
 
@@ -305,7 +304,7 @@
 			counter--;
 		} else {
 // Copy the string in the dictionary
-			for (i=0; i < resultchecklength; i++)
+			for (int i=0; i < resultchecklength; i++)
 				dico[((dicoIndex + i) % 4096)] = dico[((resultcheckpos + i) % 4096)];
 
 // Write the copy string command

Modified: tools/branches/gsoc2009-gui/util.cpp
===================================================================
--- tools/branches/gsoc2009-gui/util.cpp	2009-06-11 20:31:36 UTC (rev 41454)
+++ tools/branches/gsoc2009-gui/util.cpp	2009-06-11 21:42:48 UTC (rev 41455)
@@ -274,7 +274,7 @@
 }
 
 void parseHelpArguments(const char * const argv[], int argc, const char *msg) {
-	if (argc < 2 || strcmp(argv[1], "--help") == 0 || stricmp(argv[1], "-h") == 0) {
+	if (argc < 2 || strcmp(argv[1], "--help") == 0 || scumm_stricmp(argv[1], "-h") == 0) {
 		displayHelp(msg, argv[0]);
 	}
 }


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




More information about the Scummvm-git-logs mailing list