On 64-bit arch these checks are incorrect. the 0xFFFFFFFF is effectively UINT32_MAX rather than the pointer size. Changing to the unsigned integral pointer maximum seems like a better idea.
Fixes the warning, and corrects the code.
Mostly necessary because SDL doesn't properly return mouse buttons X1/X2
on Linux/X11, see https://bugzilla.libsdl.org/show_bug.cgi?id=2310
Not sure if this is possible with Windows, DIMOFS_BUTTON7 seems to be
the highest constant there.
Also passing sdlevent.wheel.y directly as scroll delta
Sys_GetEvent()
* renamed res_none to no_more_events, because that's what the
caller assumes when getting that event
* don't return res_none on unhandled events, instead get the next event
until there is a handled event or no more events
(=> if -> while, return res_none -> continue)
* Mapping to Doom3 keynum handled differently for SDL1 vs SDL2, see below
For SDL2 we don't use SDL_KeyToDoom3Key on the keysym anymore, but map
the SDL2 scancode to Doom3/Direct-Input scancodes instead (the keynum_t
K_* constants are really used as scancodes!).
This mapping is done in sdl2_scancode_mappings.h scancodeToKeyNum[].
In sdl_events.cpp there are static SDLScanCodeToKeyNum() and
KeyNumToSDLScanCode() functions that use this scancodeToKeyNum[] array.
Sys_GetKeyName() now does something sensible for SDL2 by using
KeyNumToSDLScanCode()
This is also used to implement idKeyInput::LocalizedKeyName() for SDL-targets
(for SDL1.2 the behavior doesn't change much, though, as it doesn't have
consistent scancodes - Sys_GetKeyName() will just return NULL and
idKeyInput::LocalizedKeyName() will fall back to the old default)
* Tested in Linux with both XBox360 wireless and Logitech F710 gamepads.
Should work with any XBox gamepad clone wired/wireless.
* Works well using SDL 1.2 or SDL 2.0
* SDL scan values are currently hard-coded. Note sure how to implement
remapping at the moment (config file, GUI, ...).
Commit 7e21048 introduced a change in the save game files strutcure.
This makes the game crash whenever you load saved games created with a prior version of the code.
This commit tends to fix this issue.
However, save game files created between commit 7e21048 and the current one will not load correclty.
Unless the user change the saved game's saveVersion number in game.details.
While the game so far has no official release on Linux, we cannot
depend on any pre-installed path for the game. Even if it were, it
would likely be a steam exclusive and constrained to
$HOME/.local/share/Steam ...
Instead, this adopts a more typical Debian-style path used for game
data, that is putting it into /usr/share/games. This is already the
path I have chosen when making the doom3bfg-data package[1] for the
Arch Linux AUR, and currently both packages for RBDOOM-3-BFG patch
this file in order to use this path. The more generic path name can
facilitate the use of any other forks of BFG Edition that may come
along, and everyone will benefit by sharing the same data path.
[1] https://aur.archlinux.org/packages/doom3bfg-data/
This changes the filesystem to work a bit more like previous id tech
engines and allows to run mods and custom content like the Wulfen high
resolution textures in those mods with
+set fs_game <modname> +set fs_resourceLoadPriority 0
- Implemented soft shadows using PCF hardware shadow mapping
The implementation uses sampler2DArrayShadow and PCF which usually
requires Direct3D 10.1 however it is in the OpenGL 3.2 core so it should
be widely supported.
All 3 light types are supported which means parallel lights (sun) use
scene independent cascaded shadow mapping.
The implementation is very fast with single taps (400 fps average per
scene on a GTX 660 ti OC) however I defaulted it to 16 taps so the shadows look
really good which should you give stable 100 fps on todays hardware.
The shadow filtering algorithm is based on Carmack's research which was
released in the original Doom 3 GPL release draw_exp.cpp.
- Changed interaction shaders to use Half-Lambert lighting like in HL2 to
make the game less dark
- Fixed some of the renderer debugging/development tools like r_showTris