[Scummvm-cvs-logs] SF.net SVN: scummvm: [28002] scummex/branches/gsoc2007-gameresbrowser/src

zbychs at users.sourceforge.net zbychs at users.sourceforge.net
Tue Jul 10 07:24:30 CEST 2007


Revision: 28002
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28002&view=rev
Author:   zbychs
Date:     2007-07-09 22:24:30 -0700 (Mon, 09 Jul 2007)

Log Message:
-----------
Fixing Linux build.

Modified Paths:
--------------
    scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h
    scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.h
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/scaler.cpp

Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h	2007-07-10 04:54:41 UTC (rev 28001)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/core_stdafx.h	2007-07-10 05:24:30 UTC (rev 28002)
@@ -25,8 +25,12 @@
 	#define strstreamout std::wostringstream
 	#define fstreamout std::wfstream
 	#ifndef stprintf
-	#define stprintf swprintf
+	#ifdef _MSC_VER
+		#define stprintf _snwprintf
+	#else
+		#define stprintf swprintf
 	#endif
+	#endif
 	#ifndef tstrcat
 	#define tstrcat wcscat
 	#endif
@@ -37,7 +41,7 @@
 	#define strstreamout std::ostringstream
 	#define fstreamout std::fstream
 	#ifndef stprintf
-	#define stprintf sprintf
+	#define stprintf snprintf
 	#endif
 	#ifndef tstrcat
 	#define tstrcat strcat

Modified: scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.h	2007-07-10 04:54:41 UTC (rev 28001)
+++ scummex/branches/gsoc2007-gameresbrowser/src/gui/ExplorationTree.h	2007-07-10 05:24:30 UTC (rev 28002)
@@ -48,7 +48,7 @@
 	~ExplorationTree();
 
 public:
-	static bool ExplorationTree::canGet();
+	static bool canGet();
 	static ExplorationTree* get();
 	static void release();
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp	2007-07-10 04:54:41 UTC (rev 28001)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/BMPParser.cpp	2007-07-10 05:24:30 UTC (rev 28002)
@@ -99,26 +99,26 @@
 	buf[0] = wxT('\0');
 	text[0] = wxT('\0');
 	while (len >= bytes_per_line) {
-		stprintf(buf, wxT("%06X: "), offset);
+		stprintf(buf, 255, wxT("%06X: "), offset);
 		tstrcat(text, buf);
 		for (i = 0; i < bytes_per_line; i++) {
-			stprintf(buf, wxT("%02X "), data[i]);
+			stprintf(buf, 255, wxT("%02X "), data[i]);
 			tstrcat(text, buf);
 			if (i % 4 == 3) {
-				stprintf(buf, wxT(" "));
+				stprintf(buf, 255, wxT(" "));
 				tstrcat(text, buf);
 			}
 		}
-		stprintf(buf, wxT(" |"));
+		stprintf(buf, 255, wxT(" |"));
 		tstrcat(text, buf);
 		for (i = 0; i < bytes_per_line; i++) {
 			wxChar c = data[i];
 			if (c < 32 || c >= 127)
 				c = wxT('.');
-			stprintf(buf, wxT("%c"), c);
+			stprintf(buf, 255, wxT("%c"), c);
 			tstrcat(text, buf);
 		}
-		stprintf(buf, wxT("|\n"));
+		stprintf(buf, 255, wxT("|\n"));
 		tstrcat(text, buf);
 		data += bytes_per_line;
 		len -= bytes_per_line;
@@ -126,44 +126,44 @@
 	}
 
 	if (len > 0) {
-		stprintf(buf, wxT("%06X: "), offset);
+		stprintf(buf, 255, wxT("%06X: "), offset);
 		tstrcat(text, buf);
 		for (i = 0; i < len; i++) {
-			stprintf(buf, wxT("%02X "), data[i]);
+			stprintf(buf, 255, wxT("%02X "), data[i]);
 			tstrcat(text, buf);
 			if (i % 4 == 3) {
-				stprintf(buf, wxT(" "));
+				stprintf(buf, 255, wxT(" "));
 				tstrcat(text, buf);
 			}
 		}
 
 		for (; i < bytes_per_line; i++) {
-			stprintf(buf, wxT("   "));
+			stprintf(buf, 255, wxT("   "));
 			tstrcat(text, buf);
 			if (i % 4 == 3) {
-				stprintf(buf, wxT(" "));
+				stprintf(buf, 255, wxT(" "));
 				tstrcat(text, buf);
 			}
 		}
-		stprintf(buf, wxT(" |"));
+		stprintf(buf, 255, wxT(" |"));
 		tstrcat(text, buf);
 		for (i = 0; i < len; i++) {
 			wxChar c = data[i];
 			if (c < 32 || c >= 127)
 				c = wxT('.');
-			stprintf(buf, wxT("%c"), c);
+			stprintf(buf, 255, wxT("%c"), c);
 			tstrcat(text, buf);
 		}
 		for (; i < bytes_per_line; i++) {
-			stprintf(buf, wxT(" "));
+			stprintf(buf, 255, wxT(" "));
 			tstrcat(text, buf);
 		}
-		stprintf(buf, wxT("|\n"));
+		stprintf(buf, 255, wxT("|\n"));
 		tstrcat(text, buf);
 	}
 
 	if (truncated) {
-		stprintf(buf, wxT("\nThe file has been truncated.\n"));
+		stprintf(buf, 255, wxT("\nThe file has been truncated.\n"));
 		tstrcat(text, buf);
 	}
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/scaler.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/scaler.cpp	2007-07-10 04:54:41 UTC (rev 28001)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/scaler.cpp	2007-07-10 05:24:30 UTC (rev 28002)
@@ -26,6 +26,8 @@
 
 #include "scumm/scaler.h"
 
+#include "debugmem.h"
+
 void AdvMame2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
 							 int width, int height) {
 	const uint32 nextlineSrc = srcPitch / sizeof(uint8);


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