dhewg
e6d8509752
Remove wglGetExtensionsStringARB from win_local.h
...
It's only used in win_glimp.cpp
2012-01-02 15:43:50 -05:00
dhewg
1afe61cc8d
Get rid of dead render thread code
...
The Windows backend had some preparing code for this feature,
but there is no support at all for this in renderer/.
2012-01-02 15:43:48 -05:00
spiral
1507a657d4
Add ID_GAME_API for dllexport/attribute(visibility)
...
Delete obsolete Game.def exports files
2011-12-23 13:24:47 +01:00
spiral
13bab7a7e5
Remove MWERKS stuff
2011-12-23 13:04:21 +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
ca04dd36d8
Get rid of the unused Sys_FPU_ClearStack
2011-12-22 11:07:01 +01:00
dhewg
6e0c766d14
Unify all Sys_GetProcessorId()
...
Use SDL functions whenever possible.
2011-12-22 11:07:00 +01:00
dhewg
d4281b56bf
Get rid of Sys_GetProcessorString()
...
This was only used for a printf() and not implemented for all
the platforms we can now run on.
We also don't want to force a CPU type on Windows.
2011-12-22 10:38:40 +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
acfe2489e4
Get rid of unused CPUID flags
2011-12-22 10:38:40 +01:00
dhewg
e2b46a5a34
Get rid of Sys_GetClockticks() and Sys_ClockTicksPerSecond()
...
Now unused.
2011-12-22 10:38:39 +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
a99971f44c
Add GetMilliseconds to idSys
...
To be used for the overhauled idTimer in idlib/.
2011-12-22 10:38:38 +01:00
dhewg
c994974ffc
Port Sys_Milliseconds() to SDL
...
Sync with SDL and use unsigned int as return type.
Code outside of sys/ still uses signed ints to store the result.
2011-12-22 10:38:38 +01:00
dhewg
317e63887c
Port Sys_Sleep() to SDL
2011-12-22 10:38:38 +01:00
dhewg
e7482b4957
Port all thread related functions to SDL
...
Setting thread priorities has been dropped (it is not portable).
The background download thread now exits gracefully.
g_threads is not public anymore.
2011-12-22 10:38:37 +01:00
dhewg
7865e432a7
Port the async thread to a SDL timer
...
SDL implements timers via threads and it lets us easily aim at
a 60Hz frequency.
2011-12-21 17:50:39 +01:00
dhewg
5a052e846f
Move MAX_THREADS as define to BuildDefines.h
2011-12-21 17:50:39 +01:00
dhewg
1a25b165b0
Port critical sections and events to SDL
...
Use SDL mutexes and conditions.
One new critical section CRITICAL_SECTION_SYS for events.
2011-12-21 17:50:35 +01:00
dhewg
0f3c2ebf52
Use SDL for everything endian
2011-12-21 17:40:38 +01:00
dhewg
005677494f
Initial SDL setup
...
Use SDL_main on all platforms.
Fix main() for non-const argv so it matches with the SDL
prototype.
Adapt win32 WinMain() to main() and get rid of the win32 special
case in Common::Init().
2011-12-21 17:40:05 +01:00
dhewg
efc71124b1
TypeInfoGen is standalone, don't compile/link it
...
Same change for scons as 8ca99602
for CMake.
2011-12-21 17:39:01 +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
da60a2a631
Adapt structs for easy forward declarations
...
Get rid of the tag namespace.
2011-12-19 23:18:15 +01:00
dhewg
966a380793
Move BuildDefines.h include to platform.h
2011-12-19 20:33:09 +01:00
dhewg
5d8d3b726e
Include cstddef for ptrdiff_t in 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
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
76939c6de7
Delete redundant files
2011-12-15 17:51:36 +01:00
dhewg
b62b033b88
Get rid of all idAudioHardware implementations
2011-12-14 18:37:03 +01:00
dhewg
9df3383b61
Remove Sys_LoadOpenAL() and Sys_FreeOpenAL()
...
This is not required anymore, all binaries on all platforms
either link against OpenAL or use the stub.
2011-12-14 18:23:49 +01:00
dhewg
dfdb6b6d4a
Remove the unused win32 exception handler
...
Especially don't send crash reports from this tree to id ;)
2011-12-14 18:20:31 +01:00
dhewg
b2ccf9240c
Fix Wwrite-strings warnings in sys/win32
...
deprecated conversion from string constant to ‘char*’
2011-12-14 18:20:31 +01:00
dhewg
3e25cc751a
Always link the win32 binary against OpenAL
...
Just as with OSX and Linux.
2011-12-14 18:20:31 +01:00
dhewg
b6bcd0a9cb
Fix compilation for MinGW
...
Just a few minor hiccups.
2011-12-14 18:20:30 +01:00
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