Yamagi Burmeister
65a7ac596d
Port the game.so to Windows
...
The game.so hasn't any platform depended code, therefore this
rudimentary port can be done with Makefile magic. There are
some TODOs left, they'll be resolved later on.
2012-06-04 09:32:35 +02:00
Yamagi Burmeister
7d3b9a5c00
Ignore errors of AllocConsole()
...
This errors are harmless and thrown when the process is already attached
to a console. Since the dedicated server is a console application the
console is created by Windows at startup...
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
4e37958b63
Stub Sys_Init() for Unix and call it while initializing
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
32dc525124
Stub NET_Init() for Unix and call it while initializing
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
d2177bb618
Open binary files in mode "rb" instead of "r"
...
This subtile bug didn't show on unixoid platforms, but led to problems
on Windows.
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
e85bf27473
We are now able to build q2ded.exe under windows
...
Of course this is completly untested. Without a game.dll the dedicated
server is useless.
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
991ff17f1b
Implement Sys_GetCurrentDirectory()
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
1a3b54b27e
Move glob.c and glob.h to common
...
We need glob_match() for Windows
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
9618483d48
Add linker flags for Windows
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
280a432161
Comment Sys_AppActivate() since cl_hwnd will be ported later
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
ba8b81068d
Update TODO
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
f3bead4f6b
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-04 09:13:30 +02:00
Yamagi Burmeister
0b226ce838
Include ctype.h and silence some warnings
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
263156bda7
Implement system depended file handling
...
Those functions were taken from ioQuake2 and refactored to match Yamagi
Quake II.
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
bd1070eff2
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-04 09:13:30 +02:00
Yamagi Burmeister
a6f22f0f5a
Implement Sys_Milliseconds
...
This function was taken from ioQuakeII and refactored to match Yamagi
Quake II
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
5908432bba
Add a TODO to ensure that all new headers have header guards
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
05f7e37c77
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-04 09:13:30 +02:00
Yamagi Burmeister
e8d44459a4
Use correct types and remove unused variables
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
d9560b4020
Hide calls to CL_Shutdown() behind !DEDICATED_ONLY
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
8ca30adf46
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-04 09:13:30 +02:00
Yamagi Burmeister
39ae083340
Remove DirectX variables
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
d80b8e7d37
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-04 09:13:30 +02:00
Yamagi Burmeister
b54c7efdc0
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-04 09:13:30 +02:00
Yamagi Burmeister
8bfb73ab27
Add TODO
...
A list of thinks to be done befor the first CFT is released
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
1782c5ab30
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-04 09:13:30 +02:00
Yamagi Burmeister
f0e23f199d
Add resource.h
...
This is the "Windows resource file", required by every Windows
application
2012-06-04 09:13:30 +02:00
Yamagi Burmeister
0eb042555b
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-04 09:13:30 +02:00
Yamagi Burmeister
4adc6a2ca2
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-04 09:13:30 +02:00
Yamagi Burmeister
ce3d61ef61
Remove unused Sys_CopyProtect stup
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
9b02f8f7fe
Add a TODO list
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
3397eb0f30
Add uncrustify.cfg
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
09fc72fb60
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-04 09:13:29 +02:00
Yamagi Burmeister
cac409b116
Remove old setuid() magic
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
66c6122bbb
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-04 09:13:29 +02:00
Yamagi Burmeister
83e069feb2
Abort if the clipplane is NULL.
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
e11a15308b
Use Com_Error instead of Sys_Error
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
9823a23a91
Initialize sounds[] to avoid garbage branch conditions down below
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
1deb069085
Remove dead assignments
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
afd2f4538c
Return in case of possible overflow
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
41a704a13e
Do not turn stack address into a global variable
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
36a41f9746
Prevent a divion by zero
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
b1dfcb7aff
Convert random() to randk() and crandom() to crandk()
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
9f45bd38f2
Ensure that pseudo random numbers are always >0
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
35e5bbb48b
Convert rand(), crand() and frand() to randk(), crandk() and frandk()
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
99520d1331
Implemented the new random generator in shared.h instead of common.h
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
28c200a2e8
Implement crandk() and frandk() and remove old functions
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
253373dbda
Seed the new PRNG at startup
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
056f4d287b
Add rand.c, an implementation of G. Marsaglia KISS PRNG
2012-06-04 09:13:29 +02:00
Yamagi Burmeister
edae2b0473
Change atof() to strtod()
2012-06-04 09:13:28 +02:00