Commit graph

812 commits

Author SHA1 Message Date
Yamagi Burmeister
dc209c40f2 Implement Sys_GetCurrentDirectory() 2012-06-03 15:31:44 +02:00
Yamagi Burmeister
c5cdccb97f Move glob.c and glob.h to common
We need glob_match() for Windows
2012-06-03 15:26:31 +02:00
Yamagi Burmeister
a8e402705a Add linker flags for Windows 2012-06-03 15:20:59 +02:00
Yamagi Burmeister
43b10b0737 Comment Sys_AppActivate() since cl_hwnd will be ported later 2012-06-03 15:20:24 +02:00
Yamagi Burmeister
32fe9c7a4f Update TODO 2012-06-03 15:08:51 +02:00
Yamagi Burmeister
5133dad7a2 Add Windows network functions in network.c
This file was taken from ioQuake2 and refactored to match Yamagi Quake
II. It would be nice to have IPv6 support and to remove the old IPX
cruft, but that happen now.
2012-06-03 15:07:36 +02:00
Yamagi Burmeister
eebb775a95 Include ctype.h and silence some warnings 2012-06-03 14:39:46 +02:00
Yamagi Burmeister
1d77f68c22 Implement system depended file handling
Those functions were taken from ioQuake2 and refactored to match Yamagi
Quake II.
2012-06-03 14:33:33 +02:00
Yamagi Burmeister
2205d54a41 Remove FS_DeletePath() and Sys_Rmdir()
Thise functions where added with the filesystem rewrite but never used.
Removing them saves us from implementing Sys_Rmdir() for Windows.
2012-06-03 14:30:44 +02:00
Yamagi Burmeister
42db4d0cd2 Implement Sys_Milliseconds
This function was taken from ioQuakeII and refactored to match Yamagi
Quake II
2012-06-03 14:19:30 +02:00
Yamagi Burmeister
1d9df63078 Add a TODO to ensure that all new headers have header guards 2012-06-03 14:19:05 +02:00
Yamagi Burmeister
6e2bbf2f44 Add memory handling functions in mem.c
This code was taken from ioQuake2, refactored into an own file and
altered for the inclusion in Yamagi Quake II.
2012-06-03 14:08:31 +02:00
Yamagi Burmeister
77350e8a16 Use correct types and remove unused variables 2012-06-03 13:26:17 +02:00
Yamagi Burmeister
723b1cad47 Hide calls to CL_Shutdown() behind !DEDICATED_ONLY 2012-06-03 13:13:13 +02:00
Yamagi Burmeister
9e6df10550 Do not set the FPU state
This is a workaround for a MinGW bug and should be resolved before the
first CFT is released. A TODO item was added in a preceding commit.
2012-06-03 13:09:27 +02:00
Yamagi Burmeister
3286b037a8 Remove DirectX variables 2012-06-03 13:08:59 +02:00
Yamagi Burmeister
d43e10b1b0 Alter the Makefile again to bootstrap Windows
This version of the Makefile adds a horrible workaround for Windows
broken "mkdir". It'll be resolved before the first CFT is released.
2012-06-03 13:06:48 +02:00
Yamagi Burmeister
ef5cc65664 Add mkdir.exe
Having mkdir.exe in the root directory is a horrible workaround to
bootstrap Yamagi Quake II on Windows without rewriting bigger parts
of the Makefile. This is a temporary solution and will be changed
before the first CFT is released
2012-06-03 13:04:19 +02:00
Yamagi Burmeister
bd102bf0b8 Add TODO
A list of thinks to be done befor the first CFT is released
2012-06-03 13:03:38 +02:00
Yamagi Burmeister
fdf87559f1 Add winquake.h
This header containts Windows specific stuff. It was taken from ioQuake2
and cleaned up for inclusion in Yamagi Quake II.
2012-06-03 12:26:24 +02:00
Yamagi Burmeister
0a128d0837 Add resource.h
This is the "Windows resource file", required by every Windows
application
2012-06-03 12:19:13 +02:00
Yamagi Burmeister
75425ce987 Add conproc.c and the coresponding header
conproc.c implements support functions for the console windows used by
the dedicated server. It was taken from ioQuake2 and cleaned up for the
inclusion in Yamagi Quake II.
2012-06-03 12:14:05 +02:00
Yamagi Burmeister
f0bcc60f78 Add windows/system.c
This files contains most support functions for windows and the main
loop. It was taken from Icculus Quake II and cleaned up. This early
version may still have bugs.
2012-06-03 12:01:38 +02:00
Yamagi Burmeister
07f73762aa Remove unused Sys_CopyProtect stup 2012-06-03 11:36:25 +02:00
Yamagi Burmeister
5213578af9 Add a TODO list 2012-06-03 11:22:26 +02:00
Yamagi Burmeister
90c19b035c Add uncrustify.cfg 2012-06-03 11:22:09 +02:00
Yamagi Burmeister
72145227d7 Add preliminary support for Windows to the Makefile
This is incomplete but should be sufficent to build q2ded on Windows as
soon as the sourcefile are added.
2012-06-03 11:18:26 +02:00
Yamagi Burmeister
60dfaee439 Remove old setuid() magic 2012-06-02 16:46:25 +02:00
Yamagi Burmeister
f28e005e1e Back out if Quake II is run as root or if eUID != rUID
This is a sanity check to prevent stupid users from running Quake II as
root or as a setuid binary. Quake II is such a mess that running it as
root or setuid is just reckless.
2012-06-02 16:33:12 +02:00
Yamagi Burmeister
deaeac42b7 Abort if the clipplane is NULL. 2012-06-02 13:40:49 +02:00
Yamagi Burmeister
6cafb22a9c Use Com_Error instead of Sys_Error 2012-06-02 13:31:20 +02:00
Yamagi Burmeister
42da811355 Initialize sounds[] to avoid garbage branch conditions down below 2012-06-02 13:29:08 +02:00
Yamagi Burmeister
6befae2ffd Remove dead assignments 2012-06-02 13:21:22 +02:00
Yamagi Burmeister
bf02575b1e Return in case of possible overflow 2012-06-02 13:18:33 +02:00
Yamagi Burmeister
ef3c9bf620 Do not turn stack address into a global variable 2012-06-02 13:06:12 +02:00
Yamagi Burmeister
4ece3714aa Prevent a divion by zero 2012-06-02 12:56:07 +02:00
Yamagi Burmeister
12ce981d64 Convert random() to randk() and crandom() to crandk() 2012-06-02 12:30:20 +02:00
Yamagi Burmeister
fc2d67bac1 Ensure that pseudo random numbers are always >0 2012-06-02 12:11:14 +02:00
Yamagi Burmeister
40ff7a6b09 Convert rand(), crand() and frand() to randk(), crandk() and frandk() 2012-06-02 11:55:12 +02:00
Yamagi Burmeister
a0ccf86660 Implemented the new random generator in shared.h instead of common.h 2012-06-02 11:32:45 +02:00
Yamagi Burmeister
effc7b3c35 Implement crandk() and frandk() and remove old functions 2012-06-02 11:22:54 +02:00
Yamagi Burmeister
7bd1392a5a Seed the new PRNG at startup 2012-06-02 10:59:43 +02:00
Yamagi Burmeister
97f7ba0610 Add rand.c, an implementation of G. Marsaglia KISS PRNG 2012-06-02 10:56:40 +02:00
Yamagi Burmeister
881b935b65 Change atof() to strtod() 2012-06-02 10:33:28 +02:00
Yamagi Burmeister
67dbe816c9 Change atoi() to strtol() 2012-06-02 10:24:52 +02:00
Yamagi Burmeister
fc679896f5 Explicit cast 2012-06-02 09:07:20 +02:00
Yamagi Burmeister
32fe0ba21f Prevent a buffer overflow. 2012-06-01 18:13:30 +02:00
Yamagi Burmeister
f9837b9130 Initialize variables (they may be used uninitialzed further down below) 2012-06-01 17:59:00 +02:00
Yamagi Burmeister
0d8f990d14 Ensure that variables that point to data on the stack are cleared 2012-06-01 17:20:05 +02:00
Yamagi Burmeister
0e1520d29a Remove dead code and assignments 2012-06-01 17:05:40 +02:00