Commit graph

766 commits

Author SHA1 Message Date
dhewg
3c90c12605 Don't link against X11 libraries
Not required anymore. All backends use SDL based implementations
now.
2012-01-05 00:24:13 +01:00
dhewg
bf69f7ec76 Use SDL GLimp and input implementations on OSX 2012-01-05 00:24:13 +01:00
dhewg
03d4833aa9 Use memory mapped async mixing on OSX
The OSX specific preferences dialog sets com_asyncSound to "1"
when OpenAL is used, do the same.
2012-01-05 00:24:13 +01:00
dhewg
8df54ffad2 Move OSX ATI_fragment_shader functions
Move the software implementation to
sys/glimp_ati_fragment_shader.cpp in preparation to move to
the SDL based GLimp and events.
2012-01-05 00:24:12 +01:00
dhewg
36870b7e10 Get rid of stubs in the OSX backend 2012-01-05 00:24:12 +01:00
dhewg
b875b54b8b Get rid of Sys_FadeScreens() and Sys_UnfadeScreens()
Unused functions in the OSX backend.
2012-01-05 00:24:12 +01:00
dhewg
fdd6360712 Get rid of Sys_PauseGL() and Sys_ResumeGL()
Unused functions in the OSX backend.
2012-01-05 00:24:12 +01:00
dhewg
fa8e50a086 Get rid of unused Sys_Hide() and Sys_Unhide()
Unused functions in the OSX backend.
2012-01-05 00:24:12 +01:00
dhewg
cab89769b4 Get rid of dead code in the OSX backend
Not used by anything.
2012-01-05 00:24:11 +01:00
dhewg
42841c2435 Get rid of RegCodeHandler()
Unhooked ancient code in the OSX backend which isn't working
for D3XP.
2012-01-05 00:24:11 +01:00
dhewg
8fbc629be6 Add support for spanish keyboard layouts
There is no keyNum_t for º or ª; catch unmapped console keys.
2012-01-05 00:21:43 +01:00
dhewg
3c96e19610 Fix miscompilation with gcc 4.5
idAnimator::GetJointLocalTransform() miscompiles with gcc 4.5 and
-ftree-vrp (implied by -O2).

Reorder code to avoid the compiler bug, no functional change.
2012-01-05 00:21:43 +01:00
dhewg
8ae3ab7641 Get rid of unhooked draw_exp.cpp
Unused experimental Windows-only renderer.
2012-01-05 00:21:43 +01:00
dhewg
13bf514a8f Get rid of Cg leftovers 2012-01-05 00:21:42 +01:00
dhewg
cf9f5a2623 Use SDL_opengl.h
That already contains an up to date glext.h.
2012-01-05 00:21:10 +01:00
dhewg
8370a7d213 Turn a Warning() in R_FlareDeform into a DPrintf()
The warning is printed on every frame in some areas and slows
down the whole game. Use DPrintf() instead to prevent the
slowdown.
2012-01-03 18:14:21 +01:00
dhewg
bf30c8216a Get rid of GetExceptionCodeInfo()
Unused function is the Windows backend.
2012-01-03 18:14:20 +01:00
dhewg
4740a55295 Don't use a console lock on Windows or OSX builds
Sync with Linux.
2012-01-02 20:00:11 +01:00
dhewg
f7915a5ffa Get rid of dead code in the Windows backend
Not used by anything.
2012-01-02 20:00:11 +01:00
dhewg
6f8bb2dfc3 Remove file logging feature from Common.cpp
SDL already redirects stdout and stderr into files, this is not
required anymore.
2012-01-02 15:44:46 -05:00
dhewg
1af6da6fdd Make the printf() family on Windows print to stdout
SDL logs this into stdout.txt for us.
2012-01-02 15:44:41 -05: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
dhewg
95233c470b Use BufferCommandText() in win_syscon.cpp
Get rid of the dependency of the local event queue.
2012-01-02 15:44:36 -05:00
dhewg
44b35ccf13 Make Sys_GetScanTable() only available on Windows
Sys_GetScanTable() and MapKey() are only used by the Windows backend
or the Windows-only tools.
Rename to Win_GetScanTable() and move MapKey() as Win_MapKey() to
win_input.cpp.
2012-01-02 15:44:35 -05:00
dhewg
29013ff57d Use SDL for r_swapInterval
Enables vsync support for more platforms than just Windows.
2012-01-02 15:44:28 -05:00
dhewg
c0d625685d Gracefully shut down SDL on exit 2012-01-02 15:44:25 -05:00
dhewg
cd1561ac57 Implement alt+tab for toggling fullscreen mode 2012-01-02 15:44:22 -05:00
dhewg
ba3ae581ab Implement SDL_QUIT event
Shut down gracefully upon WM quit event.
2012-01-02 15:44:19 -05:00
dhewg
79aea4082f Port Linux events to SDL
New CVar "in_kbd" to set the layout for the keyboard. SDL 1.2
doesn't offer any way to determine it, and we need this feature
to use the same key for toggling the console independent of the
keyboard layout.
The old "in_nograb" from the Linux backend is still supported.
2012-01-02 15:44:16 -05:00
dhewg
5d69699edf Rename Posix_ConsoleInput() to Sys_ConsoleInput()
Sync with Windows implementation and add it to sys_public.h in
preparation to move the event queue to SDL.
2012-01-02 15:44:16 -05:00
dhewg
502aaa6fe2 Port Linux GLimp to SDL
Use SDL to set video modes, get a GL context and detect the
amount of VRAM.
As with the Linux GLimp implementation, sys_videoRam can be used
in case the SDL detection fails.
2012-01-02 15:44:09 -05:00
dhewg
1ecf98416c Get rid of GLW_WM_CREATE
Another stub.
2012-01-02 15:44:05 -05:00
dhewg
73779eca39 Get rid of unused GLW_InitExtensions()
Unused forward declaration.
2012-01-02 15:44:02 -05:00
dhewg
32530bf7a2 Get rid of GLimp_EnableLogging
Only stubs left.
2012-01-02 15:44:00 -05:00
dhewg
3be7fae15c Always link the Windows binaries against OpenGL
Just as with every other platform.
2012-01-02 15:43:59 -05:00
dhewg
21f6eeaaeb Move wgl* function pointers
Most are only used in the unused draw_exp.cpp, move them there.
2012-01-02 15:43:56 -05:00
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
dhewg
475f49dad2 Get rid of the redundant com_shuttingDown
Not required anymore since 7865e432, the timer is stopped
gracefully when shutting down.
2012-01-02 15:43:47 -05:00
dhewg
57dc097fb0 Use correct idStr::Append() while saving event strings
Used the wrong Append() in fad99572, we want to stop at a
terminating null char.
2012-01-02 15:43:44 -05:00
dhewg
239b165798 Use com_ticNumber for the async timer
This yields much more precise updates and stable fps.

Reported by kaan.
2011-12-27 21:27:27 +01:00
dhewg
fad995722c Implement saving and restoring of event strings
Required for events with string arguments. On debug builds
an assert() is triggered when trying to save such an event,
while events could not be properly restored in any build.

This happens when going from map delta4 to hell1 and the
autosave feature kicks in. The trigger event 'selectWeapon'
with the string argument 'weapon_fists' is in the event queue.

With the binary from id a warning is issued:
WARNING: player1 is not carrying weapon ''
so the bug exists in there too, just that its a release build
and doesn't abort().

I also managed to trigger this while saving shortly after
activating an elevator switch.
2011-12-27 21:27:27 +01: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
d214a0f819 VS Pro doesn't choose the right default like Express, so be explicit 2011-12-23 13:06:05 +01: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
9e715ba7cc Check for jpeg_mem_src()
This function only exists starting with libjpeg8.
Check for existence and provide an implementation if necessary.
This allows libjpeg6 to be used.

Code borrowed from libjpeg8, adapt copyright in README
accordingly.
2011-12-22 14:10:29 +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
acdfb93552 Fix compiler checks for newer gcc versions
Use CXX instead of C checks - newer gcc versions refuse some
C++ flags when compiling C.
2011-12-22 12:33:27 +01:00
dhewg
6997848645 Use HUGE_VAL instead of HUGE
This is more portable, and older MinGW versions actually
don't know about HUGE.

Reported by serpentine.
2011-12-22 12:33:21 +01:00