diff --git a/quakespasm/Quake/common.h b/quakespasm/Quake/common.h index 988290d9..ded25a02 100644 --- a/quakespasm/Quake/common.h +++ b/quakespasm/Quake/common.h @@ -24,6 +24,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // comndef.h -- general definitions +#if defined(_WIN32) +#define q_snprintf _snprintf +#define q_vsnprintf _vsnprintf +#ifdef _MSC_VER +# pragma warning(disable:4244) + /* 'argument' : conversion from 'type1' to 'type2', + possible loss of data */ +# pragma warning(disable:4305) + /* 'identifier' : truncation from 'type1' to 'type2' */ + /* in our case, truncation from 'double' to 'float' */ +# pragma warning(disable:4267) + /* 'var' : conversion from 'size_t' to 'type', + possible loss of data (/Wp64 warning) */ +/* MSC doesn't have fmin() / fmax(), use the min/max macros: */ +#define fmax max +#define fmin min +#endif /* _MSC_VER */ + +#else /* _WIN32 */ + +#define q_snprintf snprintf +#define q_vsnprintf vsnprintf + +#endif /* _WIN32 */ typedef struct sizebuf_s { diff --git a/quakespasm/Quake/console.c b/quakespasm/Quake/console.c index 2d44eee9..f254e5fb 100644 --- a/quakespasm/Quake/console.c +++ b/quakespasm/Quake/console.c @@ -1256,7 +1256,7 @@ void LOG_Init (quakeparms_t *parms) inittime = time (NULL); strftime (session, sizeof(session), "%m/%d/%Y %H:%M:%S", localtime(&inittime)); - snprintf (logfilename, sizeof(logfilename), "%s/qconsole.log", parms->basedir); + q_snprintf (logfilename, sizeof(logfilename), "%s/qconsole.log", parms->basedir); unlink (logfilename); diff --git a/quakespasm/Quake/net_udp.c b/quakespasm/Quake/net_udp.c index e9d0c866..f23b3f53 100644 --- a/quakespasm/Quake/net_udp.c +++ b/quakespasm/Quake/net_udp.c @@ -334,9 +334,9 @@ char *UDP_AddrToString (struct qsockaddr *addr) int haddr; haddr = ntohl(((struct sockaddr_in *)addr)->sin_addr.s_addr); - snprintf (buffer, sizeof(buffer), "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff, - (haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff, - ntohs(((struct sockaddr_in *)addr)->sin_port)); + q_snprintf (buffer, sizeof(buffer), "%d.%d.%d.%d:%d", (haddr >> 24) & 0xff, + (haddr >> 16) & 0xff, (haddr >> 8) & 0xff, haddr & 0xff, + ntohs(((struct sockaddr_in *)addr)->sin_port)); return buffer; } diff --git a/quakespasm/Windows/SDL_x64.zip b/quakespasm/Windows/SDL_x64.zip new file mode 100644 index 00000000..005e8163 Binary files /dev/null and b/quakespasm/Windows/SDL_x64.zip differ diff --git a/quakespasm/Windows/quakespasm.sln b/quakespasm/Windows/quakespasm.sln new file mode 100644 index 00000000..bad70f95 --- /dev/null +++ b/quakespasm/Windows/quakespasm.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "quakespasm", "quakespasm.vcproj", "{C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Debug|Win32.Build.0 = Debug|Win32 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Debug|x64.ActiveCfg = Debug|x64 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Debug|x64.Build.0 = Debug|x64 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Release|Win32.ActiveCfg = Release|Win32 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Release|Win32.Build.0 = Release|Win32 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Release|x64.ActiveCfg = Release|x64 + {C0F747A3-D796-4EC0-BF2A-53722CAA3B6A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/quakespasm/Windows/quakespasm.vcproj b/quakespasm/Windows/quakespasm.vcproj new file mode 100644 index 00000000..ae94f0a3 --- /dev/null +++ b/quakespasm/Windows/quakespasm.vcproj @@ -0,0 +1,844 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +