dhewg
e9c9835bdf
TypeInfoGen is standalone, don't compile/link it
...
Neither the core or the game libraries need it.
2018-08-20 01:46:27 +02:00
dhewg
c647c61d4a
Mark unused variable in a non-debug build as such
...
Forgot this one in be40e9d6
2018-08-20 01:46:27 +02:00
dhewg
260ddac543
Fix compilation of demo binaries
...
invalid conversion from ‘const char*’ to ‘char*’
There are no demo pk4 files available compatible to this 1.3.1
codebase. Add a note about it.
2018-08-20 01:46:27 +02:00
dhewg
4f90a1db12
Partly restore behaviour from c17b80e9
...
The subtraction was inverted, but change back the behaviour too:
Hardcode offsets and check via asserts() in Debug builds.
2018-08-20 01:46:27 +02:00
dhewg
a7b3b9fb0b
Overwrite CMake default C[XX]FLAGS
...
CMake sets default flags for the standard build types.
We want to replace them, not merge them.
Reported by azalyn.
2018-08-20 01:46:27 +02:00
dhewg
e3f2666f32
Delete redundant files
2018-08-20 01:46:27 +02:00
dhewg
e03c6fcb59
Disable sound backend entry in the option menu
...
"Reverse channels", woooo
2018-08-20 01:46:27 +02:00
dhewg
bc5f5c785a
Get rid of all idAudioHardware implementations
2018-08-20 01:46:27 +02:00
dhewg
bdc063379f
Don't use any idAudioHardware implementations
...
OpenAL for everyone.
2018-08-20 01:46:27 +02:00
dhewg
c1d67445c3
Remove Sys_LoadOpenAL() and Sys_FreeOpenAL()
...
This is not required anymore, all binaries on all platforms
either link against OpenAL or use the stub.
2018-08-20 01:46:27 +02:00
dhewg
f21bda7f2a
cmake: Get rid of "-m32" check
...
This doesn't work. Always add -m32 when X86 was set.
2018-08-20 01:46:27 +02:00
dhewg
12d8125498
Undef strcasecmp before redefining it
2018-08-20 01:46:26 +02:00
dhewg
f8193c2eef
Case corrections for includes on case sensitive fs'
2018-08-20 01:46:26 +02:00
dhewg
c39f4e9894
Only use MSVC style asm with MSVC
2018-08-20 01:46:26 +02:00
dhewg
2b446ddd28
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.
2018-08-20 01:46:26 +02:00
dhewg
01e9547049
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
2018-08-20 01:46:26 +02:00
dhewg
0b0db9ab41
Remove the unused and useless CallStack code
...
This was never enabled and only implemented for Windows.
2018-08-20 01:46:26 +02:00
dhewg
546323185b
Fix -Wsizeof-pointer-memaccess warnings
...
argument to 'sizeof' in 'memset' call is the same expression as the
destination; did you mean to dereference it?
2018-08-20 01:46:26 +02:00
dhewg
72b8adfd82
Fix -Wdelete-non-virtual-dtor warnings
...
delete called on 'idSIMDProcessor' that is abstract but has
non-virtual destructor
2018-08-20 01:46:26 +02:00
dhewg
25929447dc
Change return type of [Sys_]GetProcessorId to int
...
Fixes compile error: invalid conversion from 'int' to 'cpuid_t'
2018-08-20 01:46:26 +02:00
dhewg
055b80e859
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.
2018-08-20 01:46:26 +02:00
dhewg
951bd827d6
Fix SIMD pointer casts/offsets for x86_64
...
Get the idDrawVert member offsets directly instead of hardcoding
them and checking them via assert() at runtime.
Fixes compile error:
cast from pointer to smaller type 'int' loses information
2018-08-20 01:46:26 +02:00
dhewg
c7ac0d7e26
Only include ppc_intrinsics.h when required
2018-08-20 01:46:26 +02:00
dhewg
ee4520f07e
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?
2018-08-20 01:46:26 +02:00
dhewg
c0cba74fdc
Enable OpenAL for all platforms
...
New scons variable 'OPENAL' (defaults to '1') to toggle the
OpenAL sound backend.
Enable via "s_useOpenAL 1".
2018-08-20 01:46:26 +02:00
dhewg
02a42cea86
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.
2018-08-20 01:46:26 +02:00
dhewg
cf61014770
Add sanity checks for scripting
2018-08-20 01:46:25 +02:00
dhewg
127ea10758
Use __builtin_trap() for assertions on GCC and derivates
2018-08-20 01:46:25 +02:00
dhewg
613287e49e
Cleanup endian swap functions
...
There's no need to detect the endianess at runtime.
2018-08-20 01:46:25 +02:00
dhewg
cabae31075
Fix MD5 hashing for x86_64
2018-08-20 01:46:25 +02:00
dhewg
ed4ee5a9f3
Fix CRC32 hashing for x86_64
2018-08-20 01:46:25 +02:00
dhewg
dec4098879
Fix wrong usage of loop variables
2018-08-20 01:46:25 +02:00
dhewg
5c716c569f
Fix binary op fail in idTarget_WaitForButton::Think
2018-08-20 01:46:25 +02:00
dhewg
8585be83f9
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
2018-08-20 01:46:25 +02:00
dhewg
4cfc2d87a5
Fix compilation for *BSD
...
Change most __linux__ defines to __unix__ for all UNIX like systems.
2018-08-20 01:46:25 +02:00
dhewg
c011a0f72a
Fix and cleanup endianess defines
...
Use various defines set by the compiler to determine the
endianess of the target arch.
2018-08-20 01:46:25 +02:00
dhewg
18e8dc4dc6
Basic infrastructure to build on *BSD
2018-08-20 01:46:25 +02:00
dhewg
471f51ef9b
Fix -Wformat and -Wformat-extra-args warnings
...
Fix format specifiers and use the C99 %zd for types of size_t and
alike.
2018-08-20 01:46:25 +02:00
dhewg
2101e6d35d
Fix unqualified lookup into dependent bases of class templates
...
idlib/containers/VectorSet.h:151:2: error: use of undeclared
identifier 'Append'
note: must qualify identifier to find this declaration in dependent
base class
int Append( const type & obj);
int Append( const idList<type> &other );
2018-08-20 01:46:25 +02:00
dhewg
670f2f2be8
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.
2018-08-20 01:46:25 +02:00
dhewg
f8efcf5e90
Fix script interpreter stack for x86_64
...
Alot of stack and event variables are pointers. Align the size of
all script and event variable types to sizeof(intptr_t) so that
the CPU needs only one fetch insn on 64bit archs.
Tested on x86 and x86_64 and found no different script behaviours
compared to the binary from id.
Savegames on x86_64 do work, but are not compatible to x86 and vice
versa (among other issues, the stack is written to file as-is).
x86 builds can still load savegames from the official binary and
vice versa.
2018-08-20 01:46:24 +02:00
dhewg
dc86a8a02c
Fix ./idlib/math/ for x86_64
...
sizeof(float) != sizeof(long) on this ABI.
2018-08-20 01:46:24 +02:00
dhewg
bca35dec66
Fix MD4 hashing for x86_64
2018-08-20 01:46:24 +02:00
dhewg
17dd12384c
Fix shared library loading for x86_64
...
Library handles are "void *" on posix.
2018-08-20 01:46:24 +02:00
dhewg
9212bc9b67
Fix Heap class for x86_64
2018-08-20 01:46:24 +02:00
dhewg
30dd372efa
Fix event callbacks for x86_64
...
Fix remaining event related code for the new intptr_t value type.
Regenerated game/gamesys/Callbacks.cpp via CREATE_EVENT_CODE.
2018-08-20 01:46:24 +02:00
dhewg
379ab902bb
Fix idEventArg for x86_64
...
Pointers are passed through events; change the event value type to
intptr_t to provide enough bits.
2018-08-20 01:46:24 +02:00
dhewg
ba1adc839f
Trivial pointer cast fixes for x86_64
2018-08-20 01:46:24 +02:00
dhewg
66c740b405
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.
2018-08-20 01:46:24 +02:00
dhewg
fc5f9ed56b
Mark unused variables in a non-debug build as such
...
Variables which are only used in assert().
2018-08-20 01:46:24 +02:00