Commit graph

69 commits

Author SHA1 Message Date
dhewg
f000947d4e Fixes issues with MacOSX.
- Fixes compiler errors with mismatching types in DoomController.mm
- Adds PPC_INTRINSICS fix to Simd_Altivec.h
2012-06-28 14:08:39 +02:00
dhewg
902a9cee8a s/ReadDeltaLong/ReadDeltaInt/
to match the argument type
2012-06-28 13:52:25 +02:00
dhewg
f767af9d72 s/WriteDeltaLong/WriteDeltaInt/
to match the return type
2012-06-28 13:52:25 +02:00
dhewg
822b0b84af s/ReadDeltaLongCounter/ReadDeltaIntCounter/
to match the return type
2012-06-28 13:52:24 +02:00
dhewg
c51f59cb15 s/WriteDeltaLongCounter/WriteDeltaIntCounter/
to match the argument type.
2012-06-28 13:52:24 +02:00
dhewg
9034da11d0 s/ReadLong/ReadInt/ to match the return type 2012-06-28 13:52:24 +02:00
dhewg
94df46637a s/WriteLong/WriteInt/ to match the argument type 2012-06-28 13:52:23 +02:00
dhewg
5f5a6e7043 s/BigLong/BigInt/ to match the return type 2012-06-28 13:52:22 +02:00
dhewg
49c4d028a5 s/LittleLong/LittleInt/ to match the return type 2012-06-28 13:02:47 +02:00
Daniel Gibson
0d27bfe7b9 Remove usage of long type from idlib/
Apart from some minor stuff, this changes the signature of some methods
of Parser and Token classes and of the (unused) Random2 class.
That no problem though, because the calling code uses normal ints
anyway.
2012-06-28 13:02:45 +02:00
Daniel Gibson
1e087d9bf6 Fix idMatX::IsOrthonormal()
The original implementation was pretty broken (but not used anyway),
it is now fixed and improved a bit (got rid of one inner loop).
This (at least part of the problem) was detected by PVS-Studio,
see http://www.viva64.com/en/b/0120/ Fragment 3
2012-05-13 03:04:34 +02:00
dhewg
6d6c5c8ce7 Fix "unreachable code" warnings 2012-01-15 14:13:44 +01:00
dhewg
b83868090c Use SDL GLimp and input implementations on Windows
The DirectX SDK is not required anymore.
2012-01-02 15:44:40 -05:00
spiral
13bab7a7e5 Remove MWERKS stuff 2011-12-23 13:04:21 +01:00
dhewg
826dfb0e5b Fix alignment issue with idBlockAlloc::Free()
Bug introduced with e97d3288. This doesn't work with MinGW, since
the struct members might not be aligned to the native pointer
size (in this case idSampleDecoderLocal was aligned to a 8 byte
boundary on win32).
Just switch the two members to avoid ugly code.
2011-12-22 18:51:17 +01:00
dhewg
2c1186dc1b Fix -Woverloaded-virtual warnings
We want to use the SIMD functions of the base class if the
deriving class does not implement every overloaded variant.

Added missing idLight::SetColor(idVec3) which is declared in
idEntity.
2011-12-22 12:33:27 +01:00
dhewg
d37fe69f85 Change another _WIN32 to _MSC_VER for MinGW
Older MinGW versions do not know about __assume().
Change _WIN32 in comments too to match their opening #if.

Reported by serpentine.
2011-12-22 12:32:39 +01:00
dhewg
cdf6fa3702 New define IDSTR_NO_REDIRECT
The defines in idlib/Str.h won't be set to redirect the low
level c string functions to idStr when IDSTR_NO_REDIRECT is
set.

Fixes compilation for MSVC:
error C2761: 'Cmp' : member function redeclaration not allowed

Reported by spiral.
2011-12-22 11:21:55 +01:00
spiral
7e5795dd56 Add missing includes for MSVC
- MSVC doesn't provide C99 headers
- Default to min. req. 64Mb video mem if no COM present
- Move misplaced __attribute__((packed)) from MSVC to MinGW
2011-12-22 11:07:01 +01:00
dhewg
4150029322 Unify CPUID_FTZ and CPUID_DAZ
Get rid of the 2 CPUID flags and combine them with SSE in one
implementation.
SSE flags can now be set on all x86 and x86_64 platforms -
independent of -ffast-math.
Helper defines borrowed from STREFLOP.
2011-12-22 10:38:40 +01:00
dhewg
280c95b52c Use idSys::GetMilliseconds() for idTimer
The class is only used for debugging and statistical purposes.
The precision is now reduced to milliseconds, but that's only
relevant for fine grained debug timings - where the old code
was inaccurate at anyway.
2011-12-22 10:38:39 +01:00
dhewg
0f3c2ebf52 Use SDL for everything endian 2011-12-21 17:40:38 +01:00
dhewg
736ec20d4d Untangle the epic precompiled.h mess
Don't include the lazy precompiled.h everywhere, only what's
required for the compilation unit.
platform.h needs to be included instead to provide all essential
defines and types.
All includes use the relative path to the neo or the game
specific root.
Move all idlib related includes from idlib/Lib.h to precompiled.h.
precompiled.h still exists for the MFC stuff in tools/.
Add some missing header guards.
2011-12-19 23:21:47 +01:00
dhewg
966a380793 Move BuildDefines.h include to platform.h 2011-12-19 20:33:09 +01:00
dhewg
90a53d0977 Move idlib typedefs to platform.h 2011-12-19 20:33:03 +01:00
dhewg
cf57db42e9 Move common includes from precompiled.h to platform.h 2011-12-19 20:31:32 +01:00
dhewg
96ef0754e2 Split platform specific code from precompiled.h
New header sys/platform.h.
2011-12-19 20:31:28 +01:00
dhewg
dbf3b43140 Move the virtual abstract idGame to framework/Game.h
This is game independent and code outside of game/ and d3xp/
doesn't need to know about anything game specific.
2011-12-19 20:19:14 +01:00
dhewg
e5ec63ce06 Move the game include directory to the build system
Don't include based on a preprocessor symbol, let the build
system make the correct decision.
2011-12-19 20:05:20 +01:00
dhewg
bc3b1c0883 Partly restore behaviour from c17b80e9
The subtraction was inverted, but change back the behaviour too:
Hardcode offsets and check via asserts() in Debug builds.
2011-12-15 18:52:34 +01:00
dhewg
b62b033b88 Get rid of all idAudioHardware implementations 2011-12-14 18:37:03 +01:00
dhewg
216c83b130 Undef strcasecmp before redefining it 2011-12-14 18:20:30 +01:00
dhewg
88d2dc6f33 Only use MSVC style asm with MSVC 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
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
09ea2ca819 Fix -Wsizeof-pointer-memaccess warnings
argument to 'sizeof' in 'memset' call is the same expression as the
destination; did you mean to dereference it?
2011-12-13 19:26:16 +01:00
dhewg
10e9ef2a52 Fix -Wdelete-non-virtual-dtor warnings
delete called on 'idSIMDProcessor' that is abstract but has
non-virtual destructor
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
c17b80e950 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
2011-12-13 17:26:33 +01:00
dhewg
798de99dfb Only include ppc_intrinsics.h when required 2011-12-13 16:26: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
26f7a392a8 Add sanity checks for scripting 2011-12-11 12:13:04 +01:00
dhewg
bc07d06307 Use __builtin_trap() for assertions on GCC and derivates 2011-12-11 11:48:51 +01:00
dhewg
1d7d57d1f5 Cleanup endian swap functions
There's no need to detect the endianess at runtime.
2011-12-11 11:41:41 +01:00
dhewg
a957b75bc3 Fix MD5 hashing for x86_64 2011-12-10 18:51:01 +01:00
dhewg
b9435a432d Fix CRC32 hashing for x86_64 2011-12-10 18:48:09 +01:00
dhewg
8d12d9af4f Fix wrong usage of loop variables 2011-12-10 15:36:17 +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
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