[Tux4kids-commits] r1658 - branches/commonification/t4kcommon/trunk/src

B. Luchen cheezmeister-guest at alioth.debian.org
Thu Nov 19 19:25:10 UTC 2009


Author: cheezmeister-guest
Date: 2009-11-19 19:25:10 +0000 (Thu, 19 Nov 2009)
New Revision: 1658

Modified:
   branches/commonification/t4kcommon/trunk/src/t4k-common.h
   branches/commonification/t4kcommon/trunk/src/t4k-menu.c
Log:
Workaround to avoid name clashing in Windows

Modified: branches/commonification/t4kcommon/trunk/src/t4k-common.h
===================================================================
--- branches/commonification/t4kcommon/trunk/src/t4k-common.h	2009-11-17 19:12:57 UTC (rev 1657)
+++ branches/commonification/t4kcommon/trunk/src/t4k-common.h	2009-11-19 19:25:10 UTC (rev 1658)
@@ -66,6 +66,17 @@
    running the menu. Returning STOP indicates that user pressed stop button. */
 enum { RUN_MAIN_MENU = -3, QUIT = -2, STOP = -1 };
 
+
+/* Windows is silly and defines some things to win32 calls. Perhaps we should
+** adopt some sort of prefix to get around this --BML
+*/
+#ifdef WIN32
+#undef LoadMenu
+#undef PlaySound
+#undef SetRect
+#undef LoadImage
+#endif
+
 extern SDL_Rect menu_rect, stop_rect, prev_rect, next_rect;
 extern SDL_Surface *stop_button, *prev_arrow, *next_arrow, *prev_gray, *next_gray;
 

Modified: branches/commonification/t4kcommon/trunk/src/t4k-menu.c
===================================================================
--- branches/commonification/t4kcommon/trunk/src/t4k-menu.c	2009-11-17 19:12:57 UTC (rev 1657)
+++ branches/commonification/t4kcommon/trunk/src/t4k-menu.c	2009-11-19 19:25:10 UTC (rev 1658)
@@ -11,14 +11,13 @@
   Copyright: See COPYING file that comes with this distribution.
 */
 
-#include "t4k-common.h"
-#include "t4k-globals.h"
-#include "t4k-compiler.h"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
+#include "t4k-globals.h"
+#include "t4k-common.h"
+
 /* TODO do we want t4k-common to use gettext directly, or should we     */
 /* rely on the game programs to pass t4k-common the translated strings? */
 /* The latter would seem to make sense, but I don't quite see how we    */




More information about the Tux4kids-commits mailing list