summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-23 23:15:07 +0000
committerdarkvater <darkvater@openttd.org>2004-12-23 23:15:07 +0000
commit0fcc58b8ebb80879a90ecd963cab3c3f2d4bc5f8 (patch)
treed06140858079766ee57561cfa11935ab02bd272e
parent194ecb51933948ee005718bbd9837f11d152f5ef (diff)
downloadopenttd-0fcc58b8ebb80879a90ecd963cab3c3f2d4bc5f8.tar.xz
(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
-rw-r--r--Makefile8
-rw-r--r--gfx.c5
-rw-r--r--sdl.c4
3 files changed, 11 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e63ee0526..40053510b 100644
--- a/Makefile
+++ b/Makefile
@@ -333,15 +333,17 @@ LDFLAGS += -static
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 MINGW
ifdef CYGWIN
+BASECFLAGS += -mwin32
+LDFLAGS += -mwin32
+endif
+ifdef MINGW
BASECFLAGS += -mno-cygwin
LDFLAGS += -mno-cygwin
endif
endif
-endif
CFLAGS += $(BASECFLAGS)
diff --git a/gfx.c b/gfx.c
index 127a22199..2c5691f25 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1463,7 +1463,7 @@ static void GfxMainBlitter(byte *sprite, int x, int y, int mode)
}
}
-
+#if 0
static void GfxScalePalette(int pal, byte scaling)
{
byte *dst, *src;
@@ -1482,6 +1482,7 @@ static void GfxScalePalette(int pal, byte scaling)
src += 3;
} while (--count);
}
+#endif
void DoPaletteAnimations();
@@ -1701,6 +1702,7 @@ void DrawMouseCursor()
_cursor.dirty = false;
}
+#if defined(_DEBUG)
static void DbgScreenRect(int left, int top, int right, int bottom)
{
DrawPixelInfo dp,*old;
@@ -1711,6 +1713,7 @@ static void DbgScreenRect(int left, int top, int right, int bottom)
GfxFillRect(left, top, right-1, bottom-1, rand() & 255);
_cur_dpi = old;
}
+#endif
extern bool _dbg_screen_rect;
diff --git a/sdl.c b/sdl.c
index 88940d091..1fabe2666 100644
--- a/sdl.c
+++ b/sdl.c
@@ -325,7 +325,7 @@ static bool CreateMainSurface(int w, int h)
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 @@ static const char *SdlVideoStart(char **parm)
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]);