Reworked mapc+no SDL+no i18n and neverball/neverputt+SDL+i18n distinction.
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 23 Dec 2007 23:56:08 +0000 (23:56 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sun, 23 Dec 2007 23:56:08 +0000 (23:56 +0000)
  * Removed unneeded headers from the "core" modules.

  Most importantly, moved lang.h  from base_config.h to config.h. Thus
  the core  modules (shared  across all apps)  and mapc  couldn't care
  less about whether they are built with  ENABLE_NLS set to 1 or 0. No
  hybrid builds should result.

  * Added back 'main' un-definition, this time in the Makefile.

  MinGW's 'sdl-config  --cflags' outputs  -Dmain=SDL_main in  order to
  allow  SDL  do  initialisation  and  other  Windows  magic  for  the
  so-called GUI apps, including  standard output redirection to files.
  We don't want  this for mapc, though. (And it  won't work anyway, if
  we do not link with 'sdl-config --libs'.)

git-svn-id: https://s.snth.net/svn/neverball/trunk@1285 78b8d119-cf0a-0410-b17c-f493084dd1d7

Makefile
share/base_config.c
share/base_config.h
share/base_image.c
share/base_image.h
share/binary.c
share/config.h
share/mapc.c
share/solid.c

index cd1fd5b..d916399 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -197,6 +197,12 @@ $(PUTT_TARG) : $(PUTT_OBJS)
 $(MAPC_TARG) : $(MAPC_OBJS)
        $(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(BASE_LIBS)
 
+# Work around some extremely helpful sdl-config scripts.
+
+ifdef MINGW
+$(MAPC_TARG) : ALL_CPPFLAGS := $(ALL_CPPFLAGS) -Umain
+endif
+
 sols : $(SOLS)
 
 locales :
index 721a2d5..7750fe3 100644 (file)
@@ -12,7 +12,6 @@
  * General Public License for more details.
  */
 
-#include <SDL.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
index c466330..540e9f7 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include <stdio.h>
-#include "lang.h"
 
 /*---------------------------------------------------------------------------*/
 
index 2d006ff..0179985 100644 (file)
  * General Public License for more details.
  */
 
-#include <SDL.h>
 #include <png.h>
 #include <jpeglib.h>
 
 #include "glext.h"
 #include "base_config.h"
+#include "base_image.h"
 
 /*---------------------------------------------------------------------------*/
 
index 73a73e0..0ae2deb 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef BASE_IMAGE_H
 #define BASE_IMAGE_H
 
-#include <SDL.h>
-
 /*---------------------------------------------------------------------------*/
 
 void  image_size(int *, int *, int, int);
index 19a15b6..9cb383f 100644 (file)
@@ -16,8 +16,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <SDL.h>
-#include <SDL_byteorder.h>
+#include <SDL_endian.h>
 
 /*---------------------------------------------------------------------------*/
 
index 47ff9b8..b0ce82c 100644 (file)
@@ -24,7 +24,9 @@
  */
 
 #include <SDL.h>
+
 #include "base_config.h"
+#include "lang.h"
 
 /*---------------------------------------------------------------------------*/
 
index 54c6f54..d532094 100644 (file)
 #include <string.h>
 #include <math.h>
 
-/* HACK ALERT! */
-
-#if ENABLE_NLS
-#undef ENABLE_NLS
-#define ENABLE_NLS 0
-#endif
-
 #include "vec3.h"
 #include "solid.h"
 #include "base_image.h"
index 7c4871e..c672baf 100644 (file)
@@ -12,9 +12,6 @@
  * General Public License for more details.
  */
 
-#include <SDL.h>
-#include <SDL_rwops.h>
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>