Commit graph

93 commits

Author SHA1 Message Date
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
dhewg
7601f12ba4 Fix warning: left shift count >= width of type 2018-08-20 01:46:24 +02:00
dhewg
a08e239e28 Fix -Winvalid-offsetof warnings 2018-08-20 01:46:24 +02:00
dhewg
f4f5d9c914 Fix -Wparentheses warnings
suggest explicit braces to avoid ambiguous ‘else’
suggest parentheses around ‘&&’ within ‘||’
suggest parentheses around ‘-’ in operand of ‘&’
suggest parentheses around arithmetic in operand of ‘|’
equality comparison with extraneous parentheses

Functional change:
Proper HELLTIME check in Playerview due to missing parentheses.
2018-08-20 01:46:24 +02:00
dhewg
1851070be5 Fix -Woverloaded-virtual warnings
hides overloaded virtual function

Fix member signatures of deriving classes to its super classes.
Removes the unused idGameBustOutWindow::Activate() and the
useless idMarkerWindow::GetWinVarByName().
2018-08-20 01:46:23 +02:00
dhewg
06a5468d4d Fix -Wuninitialized warnings
may be used uninitialized in this function
2018-08-20 01:46:23 +02:00
dhewg
6ff59d90bf Fix -Wunused-value warnings
value computed is not used
left operand of comma operator has no effect
right operand of comma operator has no effect
2018-08-20 01:46:23 +02:00
dhewg
74f7302c71 Fix -Wunused-but-set-variable warnings
variable set but not used

Removes some CollisionModel code under _DEBUG which was probably a
leftover, since it was completely useless (its done later anyways).
2018-08-20 01:46:23 +02:00
dhewg
6f0fc9fcc1 Fix -Wunused-variable warnings
unused variable
2018-08-20 01:46:23 +02:00
dhewg
d72b17f3a2 Fix -Wunused-function warnings
defined but not used
2018-08-20 01:46:23 +02:00
dhewg
98fbe07684 Fix -Wpointer-arith warnings
NULL used in arithmetic
2018-08-20 01:46:23 +02:00
dhewg
c155107ba9 Fix -Wconversion-null warnings
converting to non-pointer type ‘int’ from NULL
2018-08-20 01:46:23 +02:00
dhewg
64df913412 Fix -Wwrite-strings warnings
deprecated conversion from string constant to ‘char*’

Constify lots of "char *".
2018-08-20 01:46:22 +02:00
dhewg
d83cf21bde Fix -Wchar-subscripts warnings
array subscript has type ‘char’
2018-08-20 01:46:22 +02:00
dhewg
c7c187e4dc Fix all whitespace errors
Excluding 3rd party files.
2018-08-20 01:46:22 +02:00
dhewg
eac3112d2d Fix quoting in GPL headers 2018-08-20 01:46:21 +02:00
Daniel Gibson
d63172167b Add GPLv3 COPYING.txt 2018-08-20 01:46:20 +02:00
Timothee 'TTimo' Besset
aa3dbca015 hello world 2011-11-22 15:28:15 -06:00