Commit graph

100 commits

Author SHA1 Message Date
dhewg
661e8f453b Stub out win32 CPU functions for MinGW
Most of these use MSVC style asm.
Binaries compiled with MinGW will not use any SIMD code for now.
2011-12-14 18:20:30 +01:00
dhewg
ed349d71cc Fix Sys_QueMouseEvents for MinGW
DIMOFS_[X|Y|Z] can't be used in a switch statement.
2011-12-14 18:20:30 +01:00
dhewg
b8dc464dc7 Replace one unnecessary afxwin.h
No MFC required in win_taskkeyhook.cpp.
2011-12-14 18:20:30 +01:00
dhewg
f54752c209 Case corrections for includes on case sensitive fs' 2011-12-14 18:20:29 +01:00
dhewg
5c3a28e027 Basic infrastructure to build with MinGW
Add WIN32 support to CMake (core and games, no dedicated for now).
Only use MFC when it is available.
2011-12-14 18:19:38 +01:00
dhewg
36c5b05f1f Remove the unused and ugly HackChkStk() 2011-12-14 02:40:55 +01:00
dhewg
5052f42c9e Add a CMake build system
Tested on FreeBSD, Linux, and a ghetto rigged OSX i686 cross
compiler.

Find[OGG|Vorbis|VorbisFile].cmake borrowed from osgAudio
2011-12-14 02:40:49 +01:00
dhewg
41a1122a82 Remove the unused and useless CallStack code
This was never enabled and only implemented for Windows.
2011-12-14 02:39:42 +01:00
dhewg
a3cd1cf54b Get rid of all #pragma mark
Fixes error: stray '\245' in program
2011-12-13 19:26:16 +01:00
dhewg
f81d32918f Implement Sys_GetProcessorId for x86 and x86_64
Detect CPU features at runtime via cpuid - code borrowed from
libavutil.
Availability of cpuid is not checked since pentium3 supports it
and that was the minimum requirement anyway.
Only features enabled at compile time will be available.

Forced MMX/SSE/SSE2/SSE3 and it passed all tests via:
./doom3.x86_64 +disconnect +set s_noSound 1 +testSIMD
2011-12-13 19:26:16 +01:00
dhewg
18762483e6 Change return type of [Sys_]GetProcessorId to int
Fixes compile error: invalid conversion from 'int' to 'cpuid_t'
2011-12-13 18:57:30 +01:00
dhewg
8023bc5d56 Always compile all SIMD code
Protect all SIMD implementations with the according defines and
let the compiler decide if it supports the intructions.

Linux will still use Simd_Generic because CPU feature runtime
detection is missing.
2011-12-13 18:56:38 +01:00
dhewg
c15e761bae Get rid of frustum code specialized for gcc
The functions are exactly the same ;)
Maybe splitted into two files because of an ICE on some ancient
gcc?
2011-12-13 16:26:16 +01:00
dhewg
4c38aaae78 Get rid of dmap code specialized for gcc
According to the file this existed because of a gcc 3.5.5
optimization bug, which we do not care anymore about.
2011-12-13 16:25:08 +01:00
dhewg
74acc03147 Enable OpenAL for all platforms
New scons variable 'OPENAL' (defaults to '1') to toggle the
OpenAL sound backend.

Enable via "s_useOpenAL 1".
2011-12-11 17:07:13 +01:00
dhewg
db65f7a61d Use system OpenAL 2011-12-11 17:07:13 +01:00
dhewg
690967c276 Split EAX usage off OpenAL
New define ID_OPENAL_EAX to enable the deprecated EAX on top
of OpenAL.
OpenAL Soft can now be used.
2011-12-11 16:56:11 +01:00
dhewg
b54bc73532 Move Windows only OpenAL files to sys/win32/ 2011-12-11 16:00:31 +01:00
dhewg
bd1fe41b0e Move the OpenAL stub to sys/stub/ 2011-12-11 14:44:30 +01:00
dhewg
a8b1d3a364 Fix POSIX net code for x86_64
Multiplayer working from 32bit dedicated server on FreeBSD with a
64bit Linux client.
2011-12-10 19:24:30 +01:00
dhewg
bdb21d20c8 Fix wrong usage of memset() 2011-12-10 15:36:17 +01:00
dhewg
82aaccc1ad Use the local OSS headers 2011-12-10 15:36:16 +01:00
dhewg
1b8777a008 Get rid of GL_HARDLINK, always link against libGL
This kills the funky GL logging stubs, which unnecessarily
complicates the build process (think future cmake).
As for logging GL calls: Use apitrace for that
https://github.com/apitrace/apitrace
2011-12-10 15:36:16 +01:00
dhewg
9678020677 Fix compilation for *BSD
Change most __linux__ defines to __unix__ for all UNIX like systems.
2011-12-10 15:36:16 +01:00
dhewg
56bd47ac43 Fix Sys_FileTimeStamp return type
Sync with its header.
2011-12-10 15:36:15 +01:00
dhewg
5ee2e5b564 Fix and cleanup endianess defines
Use various defines set by the compiler to determine the
endianess of the target arch.
2011-12-10 15:36:15 +01:00
dhewg
04832863e8 Basic infrastructure to build on *BSD 2011-12-10 15:36:15 +01:00
dhewg
98eed69848 Fix -Wreturn-type warnings in the GL stub
no return statement in function returning non-void
2011-12-10 15:36:15 +01:00
dhewg
5c9973773b Force exit on double segfault
All bets are off in this scenario, don't deinit anything.
2011-12-10 15:36:14 +01:00
dhewg
f9dd2f93eb Fix platform dependent thread function definitions
Thread return types are different between platforms, and its
probably not a good idea to return something of a different size,
cast the callback and expect it to not crash.
2011-12-10 15:36:13 +01:00
dhewg
0c84e4bff3 Fix shared library loading for x86_64
Library handles are "void *" on posix.
2011-12-10 15:36:10 +01:00
dhewg
ab201cfc06 Stub Sys_GetClockTicks for x86_64
This is only used for debugging/stats.
2011-12-10 15:36:09 +01:00
dhewg
6b1e27b157 Trivial pointer cast fixes for x86_64 2011-12-10 15:36:09 +01:00
dhewg
2995bcab30 Basic infrastructure for native x86_64 builds
Let scons link directly in the build folder.
Multiple archs can coexist next to each other.
New scons variable "X86" to cross compile x86 binaries on x86_64.
2011-12-10 15:36:08 +01:00
dhewg
49859d747e Comment XFlush() to prevent a crash on exit 2011-12-10 15:36:08 +01:00
dhewg
541f8f967a Fix typo in define
Gets rid of the warning:
XTRHEADS not defined -- this libXNVCtrl.a will not be thread safe!
2011-12-10 15:36:07 +01:00
dhewg
6e89dac99e Fix -Warray-bounds warning 2011-12-10 15:36:06 +01:00
dhewg
2556a3923f Fix -Wunused-result warnings
ignoring return value of

Implement some error checking.
Use [put|get]char in the posix tty code for ease of use.
2011-12-10 15:36:05 +01:00
dhewg
e4771f3a5f Fix -Wunused-variable warnings
unused variable
2011-12-10 15:36:03 +01:00
dhewg
7f4bcf94ca Fix -Wunused-function warnings
defined but not used
2011-12-10 15:36:02 +01:00
dhewg
fc447ec426 Fix -Waddress warning
the address of ‘hwparams’ will always evaluate as ‘true’

This was only in idAudioHardwareALSA::Initialize(), add the
missing return statement too while I'm at it.
2011-12-10 15:36:01 +01:00
dhewg
09f03c531a Fix -Wmissing-braces warnings
missing braces around initializer for ‘const char* [2]’
2011-12-10 15:36:01 +01:00
dhewg
79ad905e05 Fix all whitespace errors
Excluding 3rd party files.
2011-12-10 15:35:54 +01:00
dhewg
ff493f6847 Fix quoting in GPL headers 2011-12-10 15:34:48 +01:00
dhewg
adebc145e3 Delete foreign build systems
Eventually a cmake based build system will replace all these.
Also, interference with `git grep` can not be tolerated.
2011-12-10 15:34:41 +01:00
dhewg
afcd0a93ea Use system libvorbisfile 2011-12-10 15:34:41 +01:00
dhewg
e704911fed Use system libjpeg8
The unused WriteLossless() was using libjpeg internals found in
jpegint.h. This header is available with libjpeg8, but not shipped
by most distros. Disable the relevant code - no functional
changes.
2011-12-10 15:33:48 +01:00
dhewg
1b858a774f Use system libcurl 2011-12-10 11:00:03 +01:00
Timothee 'TTimo' Besset
15597777fc towards XCode 4 support - need those converted 2011-11-22 17:32:53 -06:00
Timothee 'TTimo' Besset
fb1609f554 hello world 2011-11-22 15:28:15 -06:00