- Remove lots of inclusions of windows.h (and move inclusion of frame.h up)

- Remove "-%token <sval> TEXT" from audp_parser.y since it clashed with declarations in MinGW's Windows headers. It does still compile and run, but this may have harmed something anyway. Please check!
- Hack around DATADIR being defined by objbase.h in MinGW by undefining it before the inclusion of shlobj.h (incl. in main.c) This only works since the case that DATADIR is actually used on Windows is extremely rare.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1437 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2007-04-11 14:21:45 +00:00
parent 79b8983220
commit 25aa853f29
18 changed files with 45 additions and 95 deletions

View File

@ -1,4 +1,4 @@
SUBDIRS = po win32 lib src data nsis
SUBDIRS = win32 lib src po data nsis
dist_doc_DATA = AUTHORS ChangeLog README COPYING COPYING.README

View File

@ -31,7 +31,7 @@ case $host_os in
mingw32)
host_os_mingw32=yes
AC_CHECK_TOOL([WINDRES], [windres], AC_MSG_ERROR([windres not found]))
WIN32_LIBS="-L\$(srcdir) -ldbghelp -lshfolder -lwinmm -lwsock32"
WIN32_LIBS="-lintl -lshfolder -lwinmm -lwsock32 -L\$(srcdir) -ldbghelp"
;;
darwin*)
host_os_darwin=yes

View File

@ -24,16 +24,11 @@
*
*/
#include "frame.h"
#include <string.h>
#include <stdio.h>
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#include <windows.h>
#endif
#include "frame.h"
#include "frameint.h"
#define MAX_FILENAME_SIZE 200

View File

@ -43,6 +43,7 @@
# endif /* WZ_CC_MSVC */
# define WIN32_LEAN_AND_MEAN
# define WIN32_EXTRA_LEAN
# include <windows.h>
# if defined(WZ_CC_MSVC)
@ -59,8 +60,6 @@
#if defined(WZ_OS_UNIX)
# include <stdio.h>
# define MAX_PATH 260
#endif /* WZ_OS_UNIX */

View File

@ -19,12 +19,11 @@
*/
%{
#include <stdio.h>
#include <physfs.h>
/* include framework */
#include "lib/framework/frame.h"
#include <physfs.h>
#include "lib/gamelib/parser.h"
/* Get the Yacc definitions */

View File

@ -45,10 +45,9 @@ void audp_error(char *pMessage,...);
/* value tokens */
%token <fval> FLOAT_T
%token <ival> INTEGER
%token <sval> QTEXT /* Text with double quotes surrounding it */
%token <sval> QTEXT /* Text with double quotes surrounding it */
%token <ival> LOOP
%token <ival> ONESHOT
%token <sval> TEXT
/* keywords */
%token AUDIO

View File

@ -26,13 +26,11 @@
*/
/***************************************************************************/
#include "lib/framework/frame.h"
#include <time.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include <SDL/SDL_opengl.h>
#include "lib/framework/frame.h"
#include "lib/ivis_common/pieblitfunc.h"
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/piemode.h"

View File

@ -26,13 +26,10 @@
*/
/***************************************************************************/
#include <string.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include "lib/framework/frame.h"
#include <SDL/SDL_opengl.h>
#include "lib/framework/frame.h"
#include "lib/gamelib/gtime.h"
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/rendmode.h"
@ -156,10 +153,10 @@ void pie_DrawSkybox(float scale, int u, int v, int w, int h)
glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_FOG_BIT);
// no use in updating the depth buffer
glDepthMask(GL_FALSE);
// fog should not affect the sky
glDisable(GL_FOG);
// So we have realistic colors
glColor4ub(0xFF,0xFF,0xFF,0xFF);
@ -169,7 +166,7 @@ void pie_DrawSkybox(float scale, int u, int v, int w, int h)
// for the nice blend of the sky with the fog
glDisable(GL_ALPHA_TEST);
// Apply scale matrix
glScalef(scale,scale / 2.0,scale);
@ -203,7 +200,7 @@ void pie_DrawFogBox(float left, float right, float front, float back, float heig
fog_colour.argb = pie_GetFogColour();
glColor4ub(fog_colour.byte.r,fog_colour.byte.g,fog_colour.byte.b,0xFF);
pie_SetRendMode(REND_FLAT);
glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_ENABLE_BIT | GL_FOG_BIT);

View File

@ -26,10 +26,8 @@
*/
/***************************************************************************/
#include <stdio.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include "lib/framework/frame.h"
#include <SDL/SDL_opengl.h>
#include "lib/ivis_common/ivi.h"

View File

@ -26,13 +26,11 @@
*/
/***************************************************************************/
#include "lib/framework/frame.h"
#include <SDL/SDL.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include <SDL/SDL_opengl.h>
#include "lib/framework/frame.h"
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/piemode.h"
@ -93,7 +91,7 @@ BOOL pie_Initialise(void)
}
/* Find texture compression extension */
if (check_extension("GL_ARB_texture_compression"))
if (check_extension("GL_ARB_texture_compression"))
{
debug(LOG_TEXTURE, "Texture compression: Yes");
wz_texture_compression = GL_COMPRESSED_RGBA_ARB;

View File

@ -26,14 +26,11 @@
*/
/***************************************************************************/
#include <string.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include "lib/framework/frame.h"
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include "lib/framework/frame.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/piedef.h"
#include "lib/ivis_common/tex.h"

View File

@ -24,18 +24,18 @@
*
*/
#include "lib/framework/frame.h"
#ifdef WIN32
/* We need this kludge to avoid a redefinition of INT32 in a jpeglib header */
# define XMD_H
#endif
#include <stdio.h>
#include <string.h>
#include <SDL/SDL.h>
#ifdef _MSC_VER
#include <windows.h> //needed for gl.h! --Qamly
#endif
#include <SDL/SDL_opengl.h>
#include <setjmp.h>
#include <physfs.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -48,10 +48,7 @@ extern "C" {
#ifdef __cplusplus
}
#endif
#include <physfs.h>
#include <setjmp.h>
#include "lib/framework/frame.h"
#include "lib/framework/frameint.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/pieblitfunc.h"

View File

@ -17,14 +17,8 @@
along with Warzone 2100; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifdef _MSC_VER //we need windows.h for below inculde. --Qamly
#include <windows.h>
#endif
#include "lib/framework/frame.h"
#include <SDL/SDL_opengl.h>
#ifdef __APPLE__
#include <opengl/glu.h>
@ -32,7 +26,6 @@
#include <GL/glu.h>
#endif
#include "lib/framework/frame.h"
#include "lib/ivis_common/ivisdef.h"
#include "lib/ivis_common/piestate.h"
#include "lib/ivis_common/tex.h"
@ -63,7 +56,7 @@ int pie_AddBMPtoTexPages(iTexture* s, const char* filename, int type, BOOL bReso
{
int i = 0;
debug(LOG_TEXTURE, "pie_AddBMPtoTexPages: %s type=%d resource=%s page=%d", filename,
debug(LOG_TEXTURE, "pie_AddBMPtoTexPages: %s type=%d resource=%s page=%d", filename,
type, bResource ? "true" : "false", _TEX_INDEX);
assert(s != NULL);

View File

@ -17,15 +17,10 @@
along with Warzone 2100; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <ctype.h>
#include <stdlib.h>
#ifdef WIN32
#include <windows.h>
#endif //looks like we need this. --Qamly
#include "adpcm.h"
#include "lib/framework/frame.h"
#include "adpcm.h"
#include "rpl_reader.h"
#include <physfs.h>
unsigned int rpl_decode_sound_none(RPL* rpl, short* buffer, unsigned int buffer_size);
unsigned int rpl_decode_sound_unknown(RPL* rpl, short* buffer, unsigned int buffer_size);

View File

@ -17,13 +17,9 @@
along with Warzone 2100; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//*
//
#include <string.h>
#ifdef WIN32
#include <windows.h>
#endif
#include "lib/framework/frame.h"
#include "lib/framework/frameresource.h"
#include "tracklib.h"

View File

@ -57,15 +57,8 @@ extern void screenBlit(SDWORD destX, SDWORD destY, // The location
UDWORD width, UDWORD height); // The source rectangle from the surface
*/
#include <windows.h>
#include <string.h>
#include <stdio.h>
/* blitTile printfs */
//#define DEBUG_GROUP1
/* Surf recreate bitmap */
//#define DEBUG_GROUP2
#include "frame.h"
#include "frameint.h"
#include "map.h"
#include "disp2d.h"

View File

@ -22,16 +22,17 @@
*
*/
#include <SDL/SDL_main.h>
#include <physfs.h>
#include <string.h>
#include <locale.h>
// Get platform defines before checking for them!
#include "lib/framework/frame.h"
#include <SDL/SDL_main.h>
#include <physfs.h>
/* For SHGetFolderPath */
#ifdef WZ_OS_WIN
// FIXME HACK Workaround DATADIR definition in objbase.h
// This works since DATADIR is never used on Windows.
# undef DATADIR
# include <shlobj.h>
#endif // WZ_OS_WIN

View File

@ -25,15 +25,10 @@
* Arena and Campaign styles, along with connection and game options.
*/
#include <stdio.h> // get rid of a couple of warnings.
#include <string.h>
#ifdef WIN32
#include <windows.h>
#endif
#include <SDL/SDL_opengl.h>
#include <physfs.h>
#include "lib/framework/frame.h"
#include <SDL/SDL_opengl.h>
#include "lib/framework/frameresource.h"
#include "lib/framework/strres.h"
#include "lib/framework/frameint.h"