diff --git a/configure.in b/configure.in index 34582a9..ee90dcb 100644 --- a/configure.in +++ b/configure.in @@ -4,6 +4,12 @@ AC_INIT(source/sv_main.c) AC_REVISION($Revision$) dnl AM_CONFIG_HEADER(include/config.h) AC_CANONICAL_SYSTEM +AC_VALIDATE_CACHED_SYSTEM_TUPLE( + rm $cache_file + echo restart configure + exit 1 +) + dnl This is the only place where the package version appears AM_INIT_AUTOMAKE(quakeforge, 0.2.99beta6) @@ -26,6 +32,16 @@ AC_SUBST(ISODATE) AC_LANG_C +endian="" +case "$host_os" in + mingw32*) + CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32" + CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/include/win32/resources" + CC=i386-mingw32msvc-gcc + endian="little" + ;; +esac + dnl ================================================================== dnl Checks for programs. dnl ================================================================== @@ -94,11 +110,38 @@ AC_TYPE_SIZE_T AC_STRUCT_ST_BLKSIZE AC_HEADER_TIME AC_STRUCT_TM -AC_C_BIGENDIAN + +if test "x$cross_compiling" = xyes; then + AC_MSG_CHECKING(whether byte ordering is bigendian) + AC_ARG_WITH(endian, +[ --with-endian=TYPE set endian of target system for + cross-compiling. TYPE = little or big.], + endian="$withval", + ) + case "x$endian" in + xbig) + AC_DEFINE(WORDS_BIGENDIAN) + AC_MSG_RESULT(yes) + ;; + xlittle) + AC_MSG_RESULT(no) + ;; + x) + AC_MSG_RESULT(unspecified, use --with-endian={big,little}) + exit 1 + ;; + x*) + AC_MSG_RESULT(unregognized endianess) + exit 1 + ;; + esac +else + AC_C_BIGENDIAN +fi AC_MSG_CHECKING(that fnmatch is in fnmatch.h) AC_TRY_COMPILE( - [#include ], + [#include "fnmatch.h"], [int (*foo)() = fnmatch;], AC_DEFINE(HAVE_FNMATCH_PROTO) AC_MSG_RESULT(yes), @@ -1295,6 +1338,7 @@ AC_OUTPUT( quakeforge.lsm, chmod +x RPM/build_rpm ) + AC_MSG_RESULT([ QuakeForge has been configured successfully. diff --git a/include/sound.h b/include/sound.h index 2608664..9afee40 100644 --- a/include/sound.h +++ b/include/sound.h @@ -111,6 +111,7 @@ void S_StopAllSounds(qboolean clear); void S_ClearBuffer (void); void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up); void S_ExtraUpdate (void); +void S_BlockSound (void); sfx_t *S_PrecacheSound (char *sample); void S_TouchSound (char *sample); diff --git a/include/vid.h b/include/vid.h index 53d000b..f1c9353 100644 --- a/include/vid.h +++ b/include/vid.h @@ -64,6 +64,7 @@ extern viddef_t vid; // global video state extern unsigned short d_8to16table[256]; extern unsigned int d_8to24table[256]; extern int scr_width, scr_height; +extern qboolean DDActive; // called at startup and after any gamma correction void VID_SetPalette (unsigned char *palette); @@ -101,4 +102,7 @@ void VID_SetCaption (char *text); void VID_GetWindowSize (int def_w, int def_h); +int VID_ForceUnlockedAndReturnState (void); +void VID_ForceLockState (int lk); + #endif // __vid_h_ diff --git a/source/cl_sys_win.c b/source/cl_sys_win.c index b84f8cd..fc4ed0e 100644 --- a/source/cl_sys_win.c +++ b/source/cl_sys_win.c @@ -35,15 +35,17 @@ #include #include #include +#include -#include "host.h" -#include "winquake.h" -#include "resource.h" -#include "sys.h" -#include "screen.h" -#include "qargs.h" #include "client.h" #include "console.h" +#include "host.h" +#include "qargs.h" +#include "resource.h" +#include "screen.h" +#include "sound.h" +#include "sys.h" +#include "vid.h" qboolean is_server = false; @@ -318,7 +320,7 @@ Sys_ConsoleInput (void) break; default: - Con_Printf ("Stupid: %d\n", + Con_Printf ("Stupid: %ld\n", recs[0].Event.KeyEvent.dwControlKeyState); if ( ((ch == 'V' || ch == 'v') @@ -442,7 +444,9 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, MEMORYSTATUS lpBuffer; static char cwd[1024]; int t; +#ifdef SPLASH_SCREEN RECT rect; +#endif /* previous instances do not exist in Win32 */ if (hPrevInstance) diff --git a/source/dirent.c b/source/dirent.c index b8109a7..995ab76 100644 --- a/source/dirent.c +++ b/source/dirent.c @@ -25,7 +25,9 @@ #define SUFFIX "*" #define SLASH "\\" +#ifndef S_ISDIR #define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */ +#endif S_ISDIR /* * opendir diff --git a/source/joy_win.c b/source/joy_win.c index f195a5f..632e554 100644 --- a/source/joy_win.c +++ b/source/joy_win.c @@ -33,29 +33,25 @@ # include "config.h" #endif -#include "console.h" -#include "cvar.h" -#include "protocol.h" -#include "qtypes.h" - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif #ifdef __MINGW32__ # define INITGUID #endif -#include "winquake.h" +#define byte __byte #include -#include "client.h" -#include "keys.h" -#include "console.h" -#include "qargs.h" -#include "cmd.h" -#include "input.h" +#undef byte + #include "cl_input.h" -#include "view.h" +#include "client.h" +#include "cmd.h" +#include "console.h" +#include "cvar.h" #include "host.h" +#include "input.h" +#include "keys.h" +#include "protocol.h" +#include "qargs.h" +#include "view.h" // Joystick variables and structures cvar_t *joy_device; // Joystick device name diff --git a/source/net_udp.c b/source/net_udp.c index 0813d86..afbf451 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -74,7 +74,8 @@ #include "qargs.h" #ifdef _WIN32 -# include "winquake.h" +#include +//# include "winquake.h" # undef EWOULDBLOCK # define EWOULDBLOCK WSAEWOULDBLOCK #endif diff --git a/source/sys_win.c b/source/sys_win.c index 90194b7..3b3140c 100644 --- a/source/sys_win.c +++ b/source/sys_win.c @@ -30,9 +30,10 @@ # include "config.h" #endif -#include "winquake.h" #include #include +#include + #include "server.h" /* This is unused in the client, but we need the symbol there too. */