(svn r1268) -Fix: some warnings in gfx.c fixed
authordarkvater
Thu, 23 Dec 2004 23:15:07 +0000
changeset 798 8331baea2dc9
parent 797 51b0823d0ca8
child 799 15f525805017
(svn r1268) -Fix: some warnings in gfx.c fixed
-Fix: Makefile now correctly works for cygwin/mingw; altough defining only cygwin does not compile the game
-Fix: moved SDL information message from severity 0 to 1. Only errors/severe warnings should be level 0
Makefile
gfx.c
sdl.c
--- a/Makefile	Thu Dec 23 22:45:24 2004 +0000
+++ b/Makefile	Thu Dec 23 23:15:07 2004 +0000
@@ -333,15 +333,17 @@
 endif
 endif
 
-# If building on Cygwin/MingW don't link with Cygwin libs
+# If building on MingW don't link with Cygwin libs
 ifdef WIN32
+ifdef CYGWIN
+BASECFLAGS += -mwin32
+LDFLAGS += -mwin32
+endif
 ifdef MINGW
-ifdef CYGWIN
 BASECFLAGS += -mno-cygwin
 LDFLAGS += -mno-cygwin
 endif
 endif
-endif
 
 CFLAGS += $(BASECFLAGS)
 
--- a/gfx.c	Thu Dec 23 22:45:24 2004 +0000
+++ b/gfx.c	Thu Dec 23 23:15:07 2004 +0000
@@ -1463,7 +1463,7 @@
 	}
 }
 
-
+#if 0
 static void GfxScalePalette(int pal, byte scaling)
 {
 	byte *dst, *src;
@@ -1482,6 +1482,7 @@
 		src += 3;
 	} while (--count);
 }
+#endif
 
 void DoPaletteAnimations();
 
@@ -1701,6 +1702,7 @@
 	_cursor.dirty = false;
 }
 
+#if defined(_DEBUG)
 static void DbgScreenRect(int left, int top, int right, int bottom)
 {
 	DrawPixelInfo dp,*old;
@@ -1711,6 +1713,7 @@
 	GfxFillRect(left, top, right-1, bottom-1, rand() & 255);
 	_cur_dpi = old;
 }
+#endif
 
 extern bool _dbg_screen_rect;
 
--- a/sdl.c	Thu Dec 23 22:45:24 2004 +0000
+++ b/sdl.c	Thu Dec 23 23:15:07 2004 +0000
@@ -325,7 +325,7 @@
 
 	GetAvailableVideoMode(&w, &h);
 
-	DEBUG(misc, 0) ("sdl: using mode %dx%d", w, h);
+	DEBUG(misc, 1) ("sdl: using mode %dx%d", w, h);
 
 	// DO NOT CHANGE TO HWSURFACE, IT DOES NOT WORK
 	newscreen = SDL_CALL SDL_SetVideoMode(w, h, 8, SDL_SWSURFACE | SDL_HWPALETTE | (_fullscreen ? SDL_FULLSCREEN : SDL_RESIZABLE));
@@ -542,7 +542,7 @@
 	if (s != NULL) return s;
 
 	SDL_CALL SDL_VideoDriverName(buf, 30);
-	DEBUG(misc, 0) ("sdl: using driver '%s'", buf);
+	DEBUG(misc, 1) ("sdl: using driver '%s'", buf);
 
 	GetVideoModes();
 	CreateMainSurface(_cur_resolution[0], _cur_resolution[1]);