diff --git a/common/lib_replace.h b/common/lib_replace.h index d25e556..8425aae 100644 --- a/common/lib_replace.h +++ b/common/lib_replace.h @@ -45,9 +45,13 @@ #define Q_strncmp(s1, s2, n) strncmp((s1), (s2), (n)) #ifdef _WIN32 - +#ifdef __BORLANDC__ +#define Q_strcasecmp(s1, s2) stricmp((s1), (s2)) +#define Q_strncasecmp(s1, s2, n) strnicmp((s1), (s2), (n)) +#else #define Q_strcasecmp(s1, s2) _stricmp((s1), (s2)) #define Q_strncasecmp(s1, s2, n) _strnicmp((s1), (s2), (n)) +#endif #else diff --git a/common/quakeio.c b/common/quakeio.c index 2b0591b..f5117c0 100644 --- a/common/quakeio.c +++ b/common/quakeio.c @@ -164,7 +164,11 @@ Qdopen(int fd, const char *mode) } } #ifdef WIN32 +#ifdef __BORLANDC__ + setmode(_fileno(file->file),O_BINARY); +#else _setmode(_fileno(file->file),_O_BINARY); +#endif #endif return file; } diff --git a/common/snd_win.c b/common/snd_win.c index 227a96c..7a4a41e 100644 --- a/common/snd_win.c +++ b/common/snd_win.c @@ -90,7 +90,10 @@ LPDIRECTSOUNDBUFFER pDSBuf, pDSPBuf; HINSTANCE hInstDS; -qboolean SNDDMA_InitDirect (void); +#ifdef HAVE_DSOUND +sndinitstat SNDDMA_InitDirect (void); +#endif + qboolean SNDDMA_InitWav (void); diff --git a/common/world.c b/common/world.c index 3ac3b24..cada587 100644 --- a/common/world.c +++ b/common/world.c @@ -861,7 +861,7 @@ void SV_ClipToLinks ( areanode_t *node, moveclip_t *clip ) || clip->boxmaxs[2] < touch->v.absmin[2] ) continue; - if (clip->passedict && clip->passedict->v.size[0] && !touch->v.size[0]) + if (clip->passedict!=0 && clip->passedict->v.size[0] && !touch->v.size[0]) continue; // points never interact // might intersect, so do an exact clip diff --git a/qw_server/sys_win.c b/qw_server/sys_win.c index 5559af9..4e55b13 100644 --- a/qw_server/sys_win.c +++ b/qw_server/sys_win.c @@ -69,7 +69,11 @@ char *Sys_ConsoleInput (void) int c; // read a line out +#ifdef __BORLANDC__ + while (kbhit()) +#else while (_kbhit()) +#endif { c = _getch(); putch (c); diff --git a/uquake/sv_phys.c b/uquake/sv_phys.c index 0d4b252..5b70088 100644 --- a/uquake/sv_phys.c +++ b/uquake/sv_phys.c @@ -389,7 +389,7 @@ void SV_AddGravity (edict_t *ent) eval_t *val; val = GetEdictFieldValue(ent, "gravity"); - if (val && val->_float) + if (val!=0 && val->_float) ent_gravity = val->_float; else ent_gravity = 1.0; diff --git a/uquake/sv_user.c b/uquake/sv_user.c index 81a2e95..8462bff 100644 --- a/uquake/sv_user.c +++ b/uquake/sv_user.c @@ -52,7 +52,7 @@ float *angles; float *origin; float *velocity; -int onground; +extern int onground; usercmd_t cmd; diff --git a/uquake/sys_win.c b/uquake/sys_win.c index 50633aa..bbd198d 100644 --- a/uquake/sys_win.c +++ b/uquake/sys_win.c @@ -50,7 +50,7 @@ static double pfreq; static double curtime = 0.0; static double lastcurtime = 0.0; static int lowshift; -qboolean isDedicated; +extern qboolean isDedicated; static qboolean sc_return_on_enter = false; HANDLE hinput, houtput; diff --git a/win32/borlandc/config.h b/win32/borlandc/config.h new file mode 100644 index 0000000..35bc82a --- /dev/null +++ b/win32/borlandc/config.h @@ -0,0 +1,222 @@ +/* common/config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define if your declares struct tm. */ +#undef TM_IN_SYS_TIME + +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define if the X Window System is missing or not being used. */ +#define X_DISPLAY_MISSING + +/* Version string */ +#define VERSION "2.40" +#define QF_VERSION "0.2.0-pre" + +/* Define if you want to use QF-style defaults instead of Id-style */ +#undef NEWSTYLE + +/* Define this to the subdirectory name of the default game */ +#ifdef NEWSTYLE +# define GAMENAME "base" +#else +# define GAMENAME "id1" +#endif + +/* Define if you have the XFree86 DGA extension */ +#undef HAS_DGA + +/* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY*/ +#define GLAPIENTRY APIENTRY + +/* Define this to something sane if you don't have stricmp */ +#undef stricmp + +/* Define this if you are using Mesa */ +#undef XMESA + +/* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */ +#undef HAVE_GL_COLOR_INDEX8_EXT + +/* Define this if C symbols are prefixed with an underscore */ +#define HAVE_SYM_PREFIX_UNDERSCORE + +/* Define this if you have a Linux-style CD-ROM API */ +#undef USE_LINUX_CD + +/* Define this if you have a BSD-style CD-ROM API */ +#undef USE_BSD_CD + +/* Define if you have the _ftime function. */ +#define HAVE__FTIME + +/* Define if you have the _snprintf function. */ +#undef HAVE__SNPRINTF + +/* Define if you have the _vsnprintf function. */ +#undef HAVE__VSNPRINTF + +/* Define if you have the connect function. */ +#define HAVE_CONNECT + +/* Define if you have the fcntl function. */ +#undef HAVE_FCNTL + +/* Define if you have the ftime function. */ +#define HAVE_FTIME + +/* Define if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME + +/* Define if you have the gethostname function. */ +#define HAVE_GETHOSTNAME + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the getwd function. */ +#undef HAVE_GETWD + +/* Define if you have the mkdir function. */ +#define HAVE_MKDIR + +/* Define if you have the putenv function. */ +#define HAVE_PUTENV + +/* Define if you have the select function. */ +#define HAVE_SELECT + +/* Define if you have the snprintf function. */ +#define HAVE_SNPRINTF + +/* Define if you have the socket function. */ +#define HAVE_SOCKET + +/* Define if you have the stat function. */ +#define HAVE_STAT + +/* Define if you have the strerror function. */ +#define HAVE_STRERROR + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR + +/* Define if you have the vsnprintf function. */ +#define HAVE_VSNPRINTF + +/* Define if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define if you have the header file. */ +#define HAVE_DSOUND_H + +/* Define if you have the header file. */ +#define HAVE_FCNTL_H +//#undef HAVE_FCNTL_H + +/* Define if you have the header file. */ +#define HAVE_INITGUID_H + +/* Define if you have the header file. */ +#undef HAVE_LINUX_SOUNDCARD_H + +/* Define if you have the header file. */ +#undef HAVE_MACHINE_SOUNDCARD_H + +/* Define if you have the header file. */ +#undef HAVE_MME_MME_PUBLIC_H + +/* Define if you have the header file. */ +#undef HAVE_MME_MMSYSTEM_H + +/* Define if you have the header file. */ +#define HAVE_MMSYSTEM_H + +/* Define if you have the header file. */ +#undef HAVE_NETDB_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IN_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_ASOUNDLIB_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_AUDIOIO_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_FILIO_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_SOUNDCARD_H + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define if you have the header file. */ +#define HAVE_SYS_TIMEB_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the header file. */ +#define HAVE_WINDOWS_H + +/* Define if you have the Xxf86dga library (-lXxf86dga). */ +#undef HAVE_LIBXXF86DGA + +/* Define if you have the Xxf86vm library (-lXxf86vm). */ +#undef HAVE_LIBXXF86VM + +/* Define if you have the db library (-ldb). */ +#undef HAVE_LIBDB + +/* Define if you have the m library (-lm). */ +#undef HAVE_LIBM + +/* Define if you want the QSG standards */ +#define QSG_STANDARD "1" + +/* Define what the base path should be */ +#define FS_BASEPATH "." + +/* Define the name of the global config file */ +#define GLOBAL_CFG_FILE ".\\qforge.conf" + +/* Posix, needed for limits.h and Unix stuffs */ +#define _POSIX_ +