Daniel Gibson
04266eee5e
Make console history persistent
...
The console history is saved to a file on quit and restored after
starting the game.
So the commands entered in the console the last times the game was run
are still available in the console-history, just like commands that
were just entered.
2012-11-13 23:21:38 +01:00
Daniel Gibson
8c6e4eb38a
Add support for norwegian keyboard layout
...
via "in_kbd norwegian". It's the '|' and '§' chars (124, 167)
Fixes #33
2012-11-13 23:18:45 +01:00
Daniel Gibson
6d9a43cb23
On Linux/Unix, return EXE-path as base-path if BUILD_DATADIR fails
...
Using this path was the old behavior and is expected by many users.
2012-11-13 23:16:03 +01:00
Daniel Gibson
768fdb5707
Load base game's gamelib if mod has no own gamelib
...
Some mods/mappacks have their own game dir (fs_game) but no own gamelib.
Doom3 defaulted to the base game dll (I think), so we should do the same.
Fixes #44
2012-11-13 23:14:57 +01:00
Daniel Gibson
c193e0b98e
Win32: Statically link libgcc and libstdc++
...
Else one needs to copy those files from mingw32.. and I see no reason
not to statically link them.
2012-11-13 23:12:42 +01:00
Daniel Gibson
5936422d9d
Fix freezing of dedicated server window on Windows
...
The code was donated by motorsep, thanks!
2012-11-12 20:18:00 +01:00
Daniel Gibson
105fdb0624
Fix dedicated server for Windows
...
* the OpenAL function definitions mustn't include __declspec(dllimport)
=> fixed by pretending to compile OpenAL statically
* glimp.cpp shouldn't be used in dedicated-only mode (as it was already
the case on Linux and OSX)
=> No special handling for ID_DEDICATED needed in glimp.cpp, as it's not
used anyway
* add APIENTRY to every gl function in stub_gl.cpp for compatibility
with windows headers and MSVC
* remove GL/gl.h #include from win_local.h as it's not needed
* in qgl.h, when building dedicated server for windows, redefine WINGDIAPI
to nothing for SDL_opengl.h #include to get rid off __declspec(dllimport)
by using #pragma push_macro and pop_macro, because our stub is no dll.
Fixes https://github.com/dhewm/dhewm3/issues/39
2012-11-12 20:18:00 +01:00
Daniel Gibson
1f25568762
Remove duplicate functions from openal_stub.cpp + extern C
...
Some functions were duplicated, the only difference was a const in one
parameter. The definitions in the header were with const, so I kept
those versions.
Also, the functions in the header are pure C, so add extern "C",
this fixes issues with MSVC and the formerly duplicated functions.
2012-11-12 20:15:08 +01:00
Daniel Gibson
fa8f092e67
Unset key modifiers when regaining focus to unset ALT
...
There used to be a bug (discussed in #40 ), that ALT was still set after
using ALT-Tab. Thus when next pressing enter fullscreen was toggled.
This should now be fixed by unsetting the modifiers when focus is
regained (SDL_ACTIVEEVENT or SDL_WINDOWEVENT_FOCUS_GAINED).
2012-09-08 16:45:07 +02:00
Daniel Gibson
844cd2d8a8
Don't un-grab mouse when taking screenshots ( fixes #18 )
...
On windows un-grabbing (or possibly re-grabbing) the mouse seems to
mess up the view angly (view is centered afterwards), see
https://github.com/dhewm/dhewm3/issues/18
That's fixed by not releasing the mouse (there is no reason to do that
anyway).
2012-08-27 21:27:05 +02:00
dhewg
1b1787bb50
Disable the warning if the mouse grab request fails
...
This fails on some SDL drivers and just spams the console.
2012-07-28 12:54:25 +02:00
dhewg
9e15847083
Don't use alpha bits for the GL config
...
Wayland actually uses this.
2012-07-28 12:51:02 +02:00
Daniel Gibson
df81835de0
Fix several bugs from iodoom3 bugtracker
...
Apply 94cd0ee5
to d3xp as well.
2012-07-20 21:08:04 +02:00
dhewg
89071f1f57
Provide a stub for GLimp_GrabInput()
...
Fixes compilation of the dedicated server.
2012-07-20 21:04:04 +02:00
dhewg
227e8ee5c9
Add SDL2 support to framework/Common.cpp
2012-07-20 21:02:59 +02:00
dhewg
918e06cf00
Add SDL2 support to sys/osx/DOOMController.mm
2012-07-20 17:41:40 +02:00
dhewg
ed121102f4
Add SDL2 support to sys/win32/SDL_win32_main.c
2012-07-20 17:34:38 +02:00
dhewg
f120900000
SDL2's SDL_TimerID is not a pointer anymore
2012-07-20 17:34:38 +02:00
dhewg
454bebf99f
Add SDL2 support in sys/glimp.cpp
2012-07-20 17:34:37 +02:00
dhewg
4f2f855105
Add SDL2 support in sys/events.cpp
2012-07-20 17:34:36 +02:00
dhewg
b8765ccf22
Move GrabInput() and rename to GLimp_GrabInput()
...
SDL2 supports multiple windows, and the grabbing is set per
window, so move it to sys/glimp.cpp.
2012-07-20 17:34:34 +02:00
dhewg
6dcf07974d
Cleanup GrabInput()
...
Convert to bitflags to ease moving it.
2012-07-20 17:34:34 +02:00
dhewg
a75387c55e
Add SDL2 support in sys/threads.cpp
2012-07-20 17:34:33 +02:00
dhewg
368bf2819c
Log the SDL version
2012-07-20 17:34:32 +02:00
dhewg
264fdfa10e
Add SDL2 support for the build system
...
Defaults to off, tree doesn't yet compile with SDL2.
2012-07-20 17:34:32 +02:00
dhewg
5639720c1c
Add FindSDL2.cmake for SDL2
...
This is just a modified version of FindSDL.cmake
2012-07-20 16:43:39 +02:00
dhewg
826d0f7b7b
cmake: set SDL_BUILDING_LIBRARY for win32 and osx
...
While that's a lie it makes FindSDL skip SDLmain, which we have
in tree and compile ourselves.
2012-07-20 16:43:38 +02:00
dhewg
e62e3870a3
Don't link against OpenGL
...
Dynamically load all symbols at runtime.
This in in preparation for SDL2/OpenGLES.
2012-07-20 16:43:37 +02:00
dhewg
63fdea82b4
Get rid of wglext.h
...
Good riddance.
2012-07-20 16:43:37 +02:00
dhewg
ac921bc99f
Get rid of editor specific win32 vars
...
We don't compile any mfc crap for our own good, so get rid of these.
2012-07-20 16:43:36 +02:00
dhewg
227fac443d
Fix description of r_swapInterval
...
This isn't specific to wgl.
2012-07-20 00:13:07 +02:00
dhewg
bf922dfc59
Get rid of glConfig.wgl_extensions_string
...
Unused and nobody cares.
2012-07-20 00:13:05 +02:00
dhewg
30d5cb16d0
Disable editor related rendering
...
These use OpenGL calls, which are useless on all platforms without
editor support.
2012-07-20 00:13:05 +02:00
dhewg
7f3fc825ed
Get rid of GetCardCaps()
...
Useless now.
2012-07-20 00:13:04 +02:00
dhewg
3cdc5cec5c
Get rid of unused var allowNV30Path
2012-07-20 00:13:03 +02:00
dhewg
de1b7b9adb
Remove spurious call to SetBackEndRenderer()
...
Like the comment above said, this is invalid and can't work.
The backend is properly set via R_InitOpenGL().
2012-07-20 00:13:03 +02:00
dhewg
f4de0ed8c1
Remove the deprecated arb renderer
2012-07-20 00:13:02 +02:00
dhewg
a5678d2368
Remove the monochrome hack
...
This was only used for the nv20 renderer.
2012-07-20 00:13:02 +02:00
dhewg
6aa9b3602e
Remove the deprecated nv20 renderer
2012-07-20 00:13:01 +02:00
dhewg
3f67a28abe
Remove the deprecated nv10 renderer
2012-07-20 00:13:00 +02:00
dhewg
138b7b1def
Remove the ATI fragment shader emulation
...
This was only used by the r200 renderer on OSX.
2012-07-20 00:12:59 +02:00
dhewg
4b67aae8fe
Remove the deprecated r200 renderer
2012-07-20 00:12:59 +02:00
dhewg
4675ecb6d3
Get rid of precompiled.[h|.cpp]
...
Both unused, except for the mfc editors, which don't compile anyway.
2012-07-20 00:12:58 +02:00
dhewg
2cad07c38e
Delete util_stub.cpp
...
Unused.
2012-07-20 00:12:57 +02:00
dhewg
e0fd437ba9
Don't warn about uppercase chars in filenames
...
Only print those in developer mode.
2012-07-20 00:12:56 +02:00
dhewg
d9bc9c6484
Silence warnings for removed cvars in ChoiceWindow
...
Disables these warnings:
WARNING: idChoiceWindow::InitVars: gui 'guis/mainmenu.gui' window
'ADVNet5Primary' references undefined cvar 'net_serverAllowServerMod'
WARNING: idChoiceWindow::InitVars: gui 'guis/mainmenu.gui' window
'SNDBPrimary' references undefined cvar 's_driver'
Both cvars have been removed from this tree.
2012-07-20 00:12:56 +02:00
dhewg
2a3d07e174
More logging cleanup
2012-07-20 00:12:55 +02:00
dhewg
373fccbd59
Cleanup OpenGL logging
2012-07-20 00:12:54 +02:00
dhewg
626de63ff5
Cleanup OpenAL logging
2012-07-20 00:12:53 +02:00
dhewg
5e05c5b031
Get rid of s_libOpenAL and s_useOpenAL
...
Both unused.
2012-07-20 00:12:52 +02:00
dhewg
8aa0a4a9c9
Fix "black box" effect on ase meshes
...
In 09ea2ca8
we fixed a memset(), but it turns out wiping memory at that
position is wrong in the first place:
If an ase mesh has a GEOMOBJECT/NODE_TM transform matrix before the
GEOMOBJECT/MESH entry, the prior parsed TM will be wiped.
Since a GEOMOBJECT aseObject_t is already calling memset() upon
initialisation, we can just drop the spurios call.
Fixes #13 .
2012-07-18 19:53:08 +02:00
dhewg
a96635219c
Fix pointer check/access in Sys_InitNetworking()
...
Reported by scaronni.
Fixes #25 .
2012-07-17 18:25:06 +02:00
dhewg
020d1daf92
cmake: indent whitespace fixes
2012-07-10 10:10:35 +02:00
dhewg
f3ce725f8e
cmake: Whitespace fixes for consistency
2012-07-09 23:31:35 +02:00
dhewg
28d127b230
cmake: default to build d3xp
2012-07-09 23:12:07 +02:00
dhewg
0b22c8e297
cmake: Remove fugly hack to compile 32bit binaries
...
This doesn't work on multiarch systems. A proper cmake toolchain file
has to be used instead.
2012-07-09 23:03:12 +02:00
dhewg
600a07e134
cmake: Fix error when curl is not found
...
Set the library name to an empty string to prevent this error:
CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
CURL_LIBRARY (ADVANCED)
2012-07-09 22:57:13 +02:00
dhewg
96e8b7b904
cmake: Use GNUInstallDirs
...
Provides configure style overwritable path settings.
Include a fallback for cmake versions without GNUInstallDirs.
2012-07-09 22:52:05 +02:00
dhewg
390b6a493d
Try to find a steam install for the base path
2012-07-06 19:47:34 +02:00
dhewg
2052928433
Fall back to fs_basedir for cd keys
...
The windows cd installer and steam write it to that location.
2012-07-06 19:38:32 +02:00
dhewg
90bd14564f
Remove redundant setenv() call
...
The version which overwrites existing envvars is just below.
2012-07-06 01:41:12 +02:00
dhewg
5a9c2006ff
Get rid of Posix_EarlyInit() and Posix_LateInit()
...
Since we don't have our own signal handler anymore, those two
init functions can be merged into the existing Sys_Init(), which
is already called by common->Init().
2012-07-06 01:39:01 +02:00
dhewg
0bc457063f
Get rid of the signal handler
...
SDL covers this via e.g. SDL_QUIT event on ctrl+c.
2012-07-06 01:31:27 +02:00
dhewg
d2b7eac843
Get rid of Sys_SetFatalError()
...
Unnecessary.
2012-07-06 01:24:25 +02:00
dhewg
33c841ef4c
Get rid of socks proxy code in win_net.cpp
...
That was never active.
2012-07-06 01:07:02 +02:00
dhewg
7c06aa16b8
Fix warnings in win_net.cpp
...
warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
warning: unused variable ‘len’ [-Wunused-variable]
warning: format ‘%d’ expects argument of type ‘int’, but argument 3
has type ‘long long unsigned int’ [-Wformat]
2012-07-06 01:07:01 +02:00
dhewg
1f9c88fc22
Correct the cpu type for 64bit msvc
2012-07-06 01:07:00 +02:00
dhewg
78822ac932
Disable warning 4267 for msvc
...
Spams the console due to 32bit data types on 64bit.
2012-07-06 01:07:00 +02:00
dhewg
d6dd8c636b
Fix sys/cpu.cpp for msvc 64bit
2012-07-06 01:06:59 +02:00
dhewg
d22865b8a1
Use _exit() in AssertFailed()
...
Ensure application exit.
2012-07-06 01:06:59 +02:00
dhewg
5fee87be2a
Replace "__asm int 0x03" with __debugbreak()
...
Fixes compilation with msvc 64bit.
2012-07-06 01:06:58 +02:00
dhewg
30c66d5ef8
Only compile msvc style asm with 32bit msvc
...
The 64bit compiler doesn't support __asm.
2012-07-06 01:06:57 +02:00
dhewg
84717833e1
Get rid of sysMemoryStats_t
...
Unused.
2012-07-06 01:06:56 +02:00
dhewg
68284f9a09
Get rid of empty sys/linux/dedicated.cpp
2012-07-06 01:06:56 +02:00
dhewg
d53c91b023
Get rid of useless files in sys/linux
2012-07-06 01:06:55 +02:00
dhewg
b073f281ad
Get rid of the SIGFPE handler
...
If shit happens, let it crash.
2012-07-06 01:06:55 +02:00
dhewg
9cbc9ff6db
Get rid of win_cpu.cpp
...
All unused now.
2012-07-06 01:06:54 +02:00
dhewg
b58f51dbfa
Get rid of Sys_FPU_StackIsEmpty()
...
Same as with Sys_FPU_GetState().
2012-07-06 01:06:53 +02:00
dhewg
0ccef1eba8
Get rid of Sys_FPU_GetState()
...
This was only implemented with MSVC style asm.
Comments suggest that it was used to help catch invalid FOV calculations,
which were probably only happening with ancient compiler bugs.
2012-07-06 01:06:53 +02:00
dhewg
93fdc96e60
Get rid of Sys_FPU_EnableExceptions()
...
No exceptions were ever enabled.
2012-07-06 01:06:51 +02:00
dhewg
65b13cb73e
Use a more modern way to set the fpu precision
2012-07-06 01:06:51 +02:00
dhewg
a4558bb080
Get rid of Sys_FPU_SetRounding()
...
Unused.
2012-07-05 21:31:49 +02:00
dhewg
0ef470de6c
Use common->Warning() in linux/main.cpp
2012-07-05 19:15:12 +02:00
dhewg
8f157e63db
Convert backslashes in the windows EXE path
2012-07-05 19:15:11 +02:00
dhewg
571f6b3d3b
Overhaul the windows BASE path
...
Look for "base" next to the binary first, then the vanilla
doom3 path (written to the registry by the original installer).
2012-07-05 19:14:13 +02:00
dhewg
f6c0e2a174
Split GetHomeDir()
...
Makes the WCHAR to char path code reusable.
2012-07-05 18:18:01 +02:00
dhewg
57e964f369
Use FILENAME_MAX for MAX_OSPATH
...
Fixes compilation with fucking MSVC.
2012-07-05 17:25:11 +02:00
Andre d
7a5b8b1ec0
Remove (faulty/outdated) video ram detection
2012-07-04 22:47:38 +02:00
dhewg
6179e855a9
Use system zlib
2012-07-04 18:56:29 +02:00
dhewg
764799c14f
Initial make install
target for *nix
...
cmake fails it, so *nix only.
2012-07-04 02:18:51 +02:00
dhewg
1da44eb856
Fix Sys_IsLANAddress() on *nix
...
Don't just convert the first char of the IP.
LAN clients now get properly detected and don't need to auth
against the master server.
2012-07-04 02:18:51 +02:00
dhewg
20aaba2c65
Bump ASYNC_PROTOCOL_MINOR
...
Due to changed protocol we're not compatible anymore.
2012-07-04 02:18:50 +02:00
dhewg
7620131b8f
Remove net_serverAllowServerMod cvar
...
Unused.
2012-07-04 02:18:50 +02:00
dhewg
b5fd5b0c9b
Remove remaining binary pak FileSystem code
2012-07-04 02:18:49 +02:00
dhewg
0b08240e02
Remove all OS specific gamepak code
...
Useless since there are no gamepaks.
2012-07-04 02:18:48 +02:00
dhewg
cac32559e7
Remove all gamepak FileSystem<->Async[Client|Server] code
2012-07-04 02:18:48 +02:00
dhewg
b049ea78e9
Don't try to extract libraries from gamepaks.
2012-07-04 02:18:47 +02:00
dhewg
a86cbb1bff
Remove UpdateGamePakChecksums()
...
Not required anymore.
2012-07-04 02:18:46 +02:00
dhewg
72156cb1b4
Remove all client/server gamepak checks
...
We don't use any gamepaks anymore, remove the related checks.
2012-07-04 02:18:46 +02:00
dhewg
3d4be95474
Ignore binary pk4's
...
We only load local game libraries, do not ever load binary pk4's.
2012-07-04 02:18:45 +02:00
dhewg
3e9545fb71
Overhaul the *nix based BASE path
...
Try BUILD_DATADIR first (build time setting), then the vanilla
doom3 path.
2012-07-04 02:18:44 +02:00
dhewg
b242041319
Make Sys_DLL_Load() on *nix non verbose on errors
...
Just like the windows port.
2012-07-04 02:18:44 +02:00
dhewg
be37221024
Rename game libraries to the game name
...
Never use "game" as library name, use the game name instead. This
allows d3xp/mods to coexist in a single (installation-)directory.
This paves the way for future `make install` or binary installers.
Additionally, the "mods" menu entry works from within the game gui.
2012-07-04 02:18:43 +02:00
dhewg
822f9d30b5
Always load the game library from known places
...
Never use the virtual filesystem, and never use binaries from
pk4 files. Instead, try the build folder and fall back to the
known installation folder.
2012-07-04 02:18:43 +02:00
dhewg
1a5ddc01d0
Add TODO for OSX .dylib's for the bundle
2012-07-04 02:18:42 +02:00
dhewg
fecf720c75
Introduce CMAKE_INSTALL_PREFIX relative paths
...
configure style install dirs.
2012-07-04 02:18:42 +02:00
dhewg
3dad2151c5
Get the shared library suffix from the build system
2012-07-03 21:13:00 +02:00
dhewg
262df52cdd
Drop the CPU suffix from libraries on all platforms
2012-07-03 21:13:00 +02:00
dhewg
ff00686218
Provide a fallback for PATH_EXE on *nix
...
Less pain on BSD.
2012-07-03 21:12:59 +02:00
dhewg
14ba5b82c6
Use XDG Base Directories on *nix
...
See
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
2012-07-03 21:12:59 +02:00
dhewg
e55753e626
Introduce fs_configpath
...
Split fs_savepath for config files. This is in preparation for
moving the writable paths on *nix to $XDG_DATA_HOME and
$XDG_CONFIG_HOME.
Affected files: config.spec, *.cfg, doomkey, xpkey.
2012-07-03 21:12:58 +02:00
dhewg
8f6f1883ff
Use Library/Application Support/dhewm3 on OSX
2012-07-03 21:12:57 +02:00
Daniel Gibson
2375dd1588
Use My Documents/My Games/dhewm3 on windows
...
Includes savegames, configs, screenshots and so on.
And "My Documents" is actually CSIDL_PERSONAL, see
http://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx
This somehow matches the behaviour on Linux and OSX where this stuff is
saved in some kind of home-dir (e.g. ~/.doom3)
Taken (with kind permission) from Yamagi Quake II's Sys_GetHomeDir()
2012-07-03 21:12:57 +02:00
dhewg
478fa783f6
Unify Sys_*Path() into Sys_GetPath()
2012-07-03 21:12:56 +02:00
dhewg
3256783af1
Get rid of ID_DEMO_BUILD
...
There are no demo pk4s compatible to this 1.3.1 codebase.
2012-07-03 21:12:55 +02:00
dhewg
e2ca3d1f84
Get rid of sys_stub.cpp
...
Unused.
2012-07-03 21:12:54 +02:00
dhewg
2d69979be2
Use the portable getifaddrs() on *nix
...
Cleanup the OSX specific code in Sys_InitNetworking() and use it
for all *nix platforms.
Fixes nic detection on BSD.
2012-07-03 21:11:05 +02:00
dhewg
99864667a7
Use PATH_MAX for MAX_OSPATH on all platforms
...
The hardcoded 256 doesn't cut it.
2012-07-03 21:10:45 +02:00
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
112c00d409
Rename PVS vars to match their type
2012-06-28 13:52:26 +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
0eb604c436
Use int instead of long in FS_WriteFloatString()
...
The correct type for %d, %i, %u, ... is int, not long.
Even if FS_WriteFloatString() didn't care about that, sprintf() (which is called
with the same format strings and the corresponding values) does.
2012-06-28 13:02:46 +02:00
Daniel Gibson
a0fb3cd699
Don't use long in CollisionModel_local.h
2012-06-28 13:02:46 +02:00
Daniel Gibson
e8f047bcb6
Use int instead of long in idCompressor_Arithmetic methods
...
They return int anyway, so using long doesn't make sense (and originally on
win32 it didn't make a difference anyway)
2012-06-28 13:02:46 +02:00
Daniel Gibson
600531ec98
Don't use long for DDS magic number
...
It's a DWORD (i.e. 32bit int) according to spec, so using long is
actually wrong when sizeof(long) == 8.
2012-06-28 13:02:46 +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
b9247b67b4
Remove longs from game/ and d3xp/
...
(Except for handling of longs in TypeInfo and win32-only Maya import stuff).
sizeof(long) == sizeof(int) on x86 and win64,
but not on 64bit (x86_64) linux/unix/osx/.. so they should be avoided.
2012-06-22 18:20:09 +02:00
Daniel Gibson
4244436d7d
Fix PVS calculations on 64bit systems
...
Monsters got stuck in same places of d3xp because PVS calculations
returned that they were not in the players PVS.
This only happened on LP64 systems like Unix/Linux amd64 where
sizeof(long) == 8 - it did not happen on Win64 because it's LLP64, i.e.
sizeof(long) == 4 (like on x86 32bit).
Bit fiddling code in Pvs.cpp seemed to assume that sizeof(long) == 4
like on win32.
Fixes #7 .
2012-06-22 16:13:08 +02:00
dhewg
b9cc8548dc
Remove leftover X11 header
2012-06-15 18:25:48 +02:00
Daniel Gibson
94cd0ee559
Fix several bugs from iodoom3 bugtracker
...
rhyskidd@gmail.com found them (with PVS studio IIRC), reported them and posted
patches.
Some of the patches were incorrect so I rewrote them.
2012-06-02 10:12:22 +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
Daniel Gibson
5b2c78b9ff
Fix wrong length used in memset() in idMegaTexture::GenerateMegaMipMaps()
...
it should be tileSize, not sizeof( tileSize ), as it was also used for
allocating that block of memory
2012-05-13 02:52:12 +02:00
Daniel Gibson
56873e1fec
Fix memleak in snd_cache.cpp (from Harry Jeffery)
...
This fix is stolen from https://bugzilla.icculus.org/show_bug.cgi?id=5345
2012-05-13 02:31:37 +02:00
Daniel Gibson
6a23b17509
Work around broken libs that call setlocale(LC_ALL, "");
...
Because that can fuck up parsing floats if your locale uses ',' as a radix.
LADSPA plugins that may be used by ALSA do this. A PITA to debug.
2012-05-13 00:04:17 +02:00
dhewg
45a73e2dcd
Add the build target "Profile" suitable for profiling
2012-01-19 00:53:16 +01:00
dhewg
a18650b27e
Remove initial R_SetColorMappings() call
...
This happens before the SDL GL window is set up, which just
results in a warning. Another call will properly set the
gamma table after the window is initialized.
Make gammaTable a stack variable. This is sufficient, since SDL
already restores the gamma values for us on exit.
2012-01-19 00:53:13 +01:00
dhewg
0e3500b919
Accept both alt keys for alt-enter
...
Reported by Ensiform.
2012-01-19 00:22:47 +01:00
dhewg
3e066baf91
Map the right alt key
...
SDLK_RALT was missing, it is independent of SDLK_MODE.
Reported by Ensiform.
2012-01-19 00:19:51 +01:00
dhewg
6d6c5c8ce7
Fix "unreachable code" warnings
2012-01-15 14:13:44 +01:00
dhewg
668802f09a
Cleanup OpenAL includes
...
We use OpenAL Soft on all platforms.
2012-01-14 20:43:50 +01:00
dhewg
898f690fc4
This is dhewm 3
...
Rename project, now at https://github.com/dhewm
2012-01-14 20:06:05 +01:00
dhewg
d472149426
Get rid of unused defines in Licensee.h
2012-01-14 17:59:37 +01:00
dhewg
db4aca78d6
Get rid of CPU_EASYARGS
...
Never use the event callbacks with mismatching prototypes.
2012-01-14 15:19:38 +01:00
dhewg
b7ce0ef149
CMake: Use config.h for BUILD_OS and BUILD_CPU
...
This fixes, among others, FreeBSD 64bit builds where the build
system used a "amd64" suffix and runtime "x86_64".
2012-01-14 15:19:12 +01:00
dhewg
827124431e
CMake: Detect libcurl and use it when found
...
Move ID_ENABLE_CURL to config.h
2012-01-14 15:09:29 +01:00
dhewg
545d98fc08
CMake: Create config.h
...
Use config.h for configure time settings.
2012-01-14 15:09:27 +01:00
dhewg
9108c4ec9c
CMake: Use CMAKE_SOURCE_DIR
...
Instead of CMAKE_CURRENT_SOURCE_DIR.
2012-01-14 15:02:26 +01:00
dhewg
b5c66c088c
Get rid of ID_OPENAL
...
This is always required for clients.
2012-01-14 15:02:26 +01:00
dhewg
dca4721c8f
Get rid of the scons build system
...
This only works for linux and cmake works on all platforms.
Hopefully this prevents invalid reports.
2012-01-14 15:01:19 +01:00
dhewg
1a5499e6f5
Fix compilation of the dedicated server
...
Add missing OpenAL stubs.
2012-01-14 13:26:01 +01:00
dhewg
2b9e2e5193
More fixes regarding event saving and restoring
...
Fix silly issue from 3d692b58
(sizeof(E_EVENT_SIZEOF_VEC)).
Align entity values of events to the native pointer size, which
is noticeably faster on x86_64 and fixes another assert() in
debug builds.
Past savegames with entities in events are not compatible.
2012-01-13 01:45:19 +01:00
dhewg
3d692b58de
Prevent assert() while saving and restoring events
...
The argument size of each event is checked in debug builds
and this change was missing from the x86_64 commits.
Surprisingly this didn't trigger yet with the original game,
only with the mod 'Classic Doom 3'.
2012-01-12 19:05:52 +01:00
dhewg
91bca094c0
Fix out of bounds access for buggy UIs
...
Seen with the main menu on the mod 'Classic Doom 3'.
2012-01-12 19:05:51 +01:00
dhewg
3e07208cae
New CVar s_device to choose the audio device to use
2012-01-11 22:52:05 +01:00
dhewg
35bd70ea46
Improve environment suit sfx
...
Set AL_LOWPASS_GAIN like EAX did under the hood.
Set the same filter via AL_DIRECT_FILTER on sources.
This should bring the overall sfx closer to EAX:
<kaan_> it sounds awesome
All infos provided by KittyCat from #openal.
2012-01-11 19:29:35 +01:00
dhewg
ad48afdbd7
Fix compilation via scons
...
SConscript.core was missing jpeg_memory_src.cpp.
Reported by ameyp.
Fixes #2 .
2012-01-11 18:56:38 +01:00
dhewg
16958d070b
Fix [record|play|time]Demo for x86_64
...
These are still fragile due to restored stale pointers (!).
But at least the vanilla demos can now be used to check for
performance regressions.
2012-01-10 22:54:01 +01:00
dhewg
d8acc43aca
Port the D3XP environment suit effect to EFX
...
Use a AL_LOWPASS_GAINHF filter to muffle sfx.
2012-01-10 17:45:37 +01:00
dhewg
8ea0f8f0d5
Clamp EFX reverb effect values
...
The values might be slightly out of range due to the scale
conversion. Clamp them so OpenAL doesn't refuse them.
2012-01-10 17:45:37 +01:00
dhewg
bdbee3543c
Cleanup EFX code
...
Add error checking.
Add debug printf()s, enable via EFX_VERBOSE.
2012-01-10 17:45:37 +01:00
dhewg
b8f9829255
Use the correct unit when passing values for EFX
...
The gain values are expressed as millibels in the .efx files
and need to be converted to normalized floating points.
Get the EAX4 EAXREVERBFLAGS_DECAYHFLIMIT from the "flags" token
and set AL_EAXREVERB_DECAY_HFLIMIT accordingly.
All infos provided by KittyCat from #openal, many thanks!
2012-01-09 00:52:30 +01:00
dhewg
ece2adbdcd
Port EAX to EFX
...
First attempt at porting the EAX reverb code to EFX.
This only works when the ALC_EXT_EFX extension is supported by
the OpenAL vendor (which is not the case for the OSX supplied
framework, use OpenAL soft instead).
The current stable version of OpenAL Soft (v1.13 as of this
writing) can barely handle this additional workload, current
master is highly recommended when using this feature.
2012-01-08 22:04:56 +01:00
dhewg
1ce658e835
Get rid of memory status functions
...
Unused.
2012-01-08 12:24:58 +01:00
dhewg
fe7b32d47e
Get rid of dead prototype
2012-01-08 12:24:58 +01:00
dhewg
6a1d6cb842
Always allow multiple instances
2012-01-08 12:24:58 +01:00
dhewg
438685e6e6
Get rid of Sys_FlushCacheMemory()
...
Stub on all platforms.
2012-01-08 12:24:58 +01:00
dhewg
9542663097
Get rid of Sys_DefaultCDPath()
...
Stub on all platforms.
2012-01-08 12:24:58 +01:00
dhewg
79fa35d0ec
Get rid of ID_MCHECK
...
mcheck() is not thread safe, use MALLOC_CHECK_ or TCMalloc
instead.
2012-01-08 12:24:57 +01:00
dhewg
5f8712902c
Return at least 64MB VRAM in case the detection fails
2012-01-08 12:24:57 +01:00
dhewg
a35d8c08b6
Fix usage of wrong define in sys/cpu.cpp
2012-01-08 12:24:57 +01:00
spiral
468b266860
Remove hard-wired -framework OpenAL
...
We already link to OPENAL_LIBRARY further down.
Log some debug OpenAL info, mainly so OSX users can check they are not
using Apple's OpenAL. OpenAL Soft is recommended as it fixes many
issues.
I specify it as follows:
cmake -DOPENAL_LIBRARY=/usr/local/lib/libopenal.dylib -DOPENAL_INCLUDE_DIR=/usr/local/include -GXcode ../neo/
(because FindOpenAL.cmake prefers the /System frameworks)
2012-01-08 12:24:45 +01:00
dhewg
035dcbcd46
Move jpeg_memory_src()
...
Found another copy in renderer/Cinematic.cpp. Move the
newer implementation from renderer/Image_files.cpp in its
own file and use the libjpeg v8c license blob (which is where
this code comes from).
Adapt README too with the v8c license.
2012-01-07 20:57:07 +01:00
dhewg
fcc947433b
Disable a few MSVC warnings
...
These just spam the console. Some are useless, some need to be
looked at at some point.
2012-01-07 19:01:54 +01:00
dhewg
47e486b62a
Add SDL_win32_main.c
...
Don't link against SDLmain.[a|lib], always compile it.
We can use pure C MinGW cross compiled libraries with MSVC, and
this is the only static library used.
2012-01-07 19:01:53 +01:00
dhewg
eb2ecfa22a
Add support for the doom3-libs repo
...
Single CMake variable "DOOM3LIBS" to point to the repo of
binaries to make CMake find libraries from there.
2012-01-07 19:00:44 +01:00
dhewg
b3085e03b4
Fix sys/win32/* for x86_64
2012-01-07 19:00:43 +01:00
dhewg
4927299cb9
Include malloc.h for alloca for MinGW
...
Newer versions of MinGW do not seem to require this, but older
ones do.
2012-01-07 15:40:22 +01:00
dhewg
82a87863ff
Rename FILE_[EXEC|OPEN] due to conflict
...
Some MinGW versions already define it.
2012-01-07 15:40:18 +01:00
dhewg
989b812a6e
Cleanup DOOMController.mm
...
Cleanup headers and use MAXPATHLEN.
2012-01-05 00:24:16 +01:00
dhewg
6fa12c3a44
Get rid of the NSObject in DOOMController.mm
...
SDLmain.m does the bulk of the work for us, so get rid of
the DOOMController NSObject, move the quakeMain() contents to
main() and let SDL do its thing.
2012-01-05 00:24:16 +01:00
dhewg
532b642222
Get rid of checkOS() and checkDVD()
...
Former is already handled by cmake via -mmacosx-version-min=
and the latter is just a stub.
2012-01-05 00:24:15 +01:00
dhewg
8e5702ef36
Get rid of applicationShouldTerminate()
...
Redundant, already handled by SDL_QUIT event.
2012-01-05 00:24:15 +01:00
dhewg
23752a2cd2
Get rid of applicationDidFinishLaunching()
...
SDL already implements this for us and the assert()s are
already part of idlib.
2012-01-05 00:24:15 +01:00
spiral
ec0f836f41
Generate an .app bundle for OSX
...
Add missing SDLMain and icon/resource files to generated .xcodeproj
Now builds on Lion in XCode4 with the 10.6 SDK using LLVM-GCC4.2.
Also tested on WinXP in VS 9 2008 Professional, I don't appear to have
broken anything there, stuff like MACOSX_BUNDLE_INFO_PLIST is
effectively ignored.
2012-01-05 00:24:15 +01:00
spiral
6453bce10c
We don't need XOPEN_SOURCE deprecated content
...
Just what's in sys/ucontext.h specifically.
2012-01-05 00:24:15 +01:00
scottWakeling
c08249b9db
Fix semi-colons being inserted into ldflags
...
It is causing clang++ to error when linking game{cpu}.dylib
2012-01-05 00:24:14 +01:00
dhewg
d4ec9cc87f
OSX .dylib's do not get a CPU suffix
2012-01-05 00:24:14 +01:00
dhewg
bf1f05bd87
Rename game${cpu}-d3xp to d3xp${cpu}
2012-01-05 00:24:14 +01:00
dhewg
7f0b7b54ec
Drop the cpu suffix on binaries
2012-01-05 00:24:14 +01:00
dhewg
522c5bbccf
R_GetModeInfo() doesn't need to be public on OSX
...
Remove redundant special case.
2012-01-05 00:24:14 +01:00
dhewg
1fed72fbb4
Get rid of Sys_DoPreferences()
...
The OSX backend was the only one utilizing this to set CVars
for the video mode.
Not required anymore since its now based on SDL.
2012-01-05 00:24:13 +01:00
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
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
469031be21
Remove win32 special case in idSession::Frame()
...
Since 1a25b165
not required anymore, all platforms behave the
same.
2011-12-22 11:43:24 +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
540bbae490
CMake support for MSVC
...
Use the WIN32 flag for add_executable.
2011-12-22 11:21:54 +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
2e3653ce9f
Get rid of CPU speed check in SetMachineSpec()
...
This is a non portable x86 and x86_64 check.
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
45566d9727
Fix compilation via scons
...
Add the include path to the root directory, overlooked in
736ec20d
.
2011-12-21 13:53:36 +01:00
dhewg
1358d397e4
Link MinGW binaries with -mwindows
...
mingw-w64 requires this when linking gui applications.
2011-12-20 12:17:45 +01:00
dhewg
278dae9345
Get rid of -Wno-unknown-pragmas
...
Not required anymore.
2011-12-19 23:21:49 +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
18526bf4eb
Split Game_local.h
...
New header GameBase.h with all the defines from Game_local.h and
gameError() to reduce header dependencies.
2011-12-19 23:21:41 +01:00
dhewg
cfbed87fa8
Move constants from AsyncNetwork.h
...
Make those defines in BuildDefines.h instead to reduce header
dependencies.
2011-12-19 23:21:41 +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
73008b0691
Only compile idlib once
...
Build one static idlib and link the binaries against it.
2011-12-19 20:20:57 +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
8e34d86f8a
Get rid of ID_ALLOW_D3XP
...
There're no second class citizens.
2011-12-19 20:17:46 +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
8ca99602aa
TypeInfoGen is standalone, don't compile/link it
...
Neither the core or the game libraries need it.
2011-12-16 16:37:58 +01:00
dhewg
6017d8d7a1
Mark unused variable in a non-debug build as such
...
Forgot this one in be40e9d6
2011-12-16 16:01:52 +01:00
dhewg
d0e5555f72
Fix -Wuninitialized warnings in release builds
...
may be used uninitialized in this function
2011-12-16 16:00:28 +01:00
dhewg
506569529a
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.
2011-12-16 00:07:16 +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
b3999a264c
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.
2011-12-15 17:51:56 +01:00
dhewg
76939c6de7
Delete redundant files
2011-12-15 17:51:36 +01:00
dhewg
044f745e0c
Disable sound backend entry in the option menu
...
"Reverse channels", woooo
2011-12-14 19:04:19 +01:00
dhewg
b62b033b88
Get rid of all idAudioHardware implementations
2011-12-14 18:37:03 +01:00
dhewg
18f9793732
Get rid of the intenal useOpenAL
...
Useless now, there is only OpenAL.
2011-12-14 18:24:06 +01:00
dhewg
93e5345fbc
Don't use any idAudioHardware implementations
...
OpenAL for everyone.
2011-12-14 18:24:06 +01:00
dhewg
4e26e1ac6f
Don't use idAudioHardware to get the speaker count
...
Use the CVar s_numberOfSpeakers for that, its already stored
in there.
Add the same (!= 2 && !=6) check as in the audio backends since
the mixer is limited to these 2 values.
2011-12-14 18:24:05 +01:00
dhewg
66141935f5
Use OpenAL per default
...
Deprecate s_libOpenAL and s_useOpenAL for compability and don't
access them anymore.
2011-12-14 18:24:05 +01:00