Commit graph

434 commits

Author SHA1 Message Date
Robert Beckebans
319b659302 Tweaked shadowmap bias to fight Peter Pan effect 2015-03-19 00:31:08 +01:00
Robert Beckebans
720f8e8cdf Merge remote-tracking branch 'RBDOOM-3-BFG/master' 2015-03-15 10:20:56 +01:00
Robert Beckebans
06d0434f32 Improved modding support and loading of custom models/anims 2015-02-25 15:45:16 +01:00
Robert Beckebans
5fb44de8a9 Merge remote-tracking branch 'RBDOOM-3-BFG/master' 2015-02-15 11:17:42 +01:00
Daniel Gibson
90b1ff0b65 Format Code with AStyle 2.05.1 2015-02-09 00:29:57 +01:00
Daniel Gibson
5f5684386e Update astyle to 2.05.1, add astyle Linux binaries
Unfortunately, different versions of astyle produce slighty different
formatting, so it's important that everyone uses the same version.

Thus it makes sense to provide astyle binaries for Win32 and
Linux x86 and x86_64 (to prevent usage of outdated versions from package
managers etc)

Most probably it would be easy to add an OSX astyle binary as well and
call that from astyle-code.sh if applicable.
I don't have a Mac, though, so someone else will have to do it ;-)
2015-02-09 00:24:37 +01:00
Robert Beckebans
4c596dcf0d Fixed Gamepad LS and RS in PDA screen. refs #214 2015-02-05 20:11:09 +01:00
Daniel Gibson
015748f823 SDL backend: generate SE_MOUSE_LEAVE events
The SDL backend now creates SE_MOUSE_LEAVE events when the mouse leaves
the window (both SDL1.2 and SDL2). For some reason, both the SWF GUI
backend and CEGUI are interested in this.
2015-01-28 17:32:35 +01:00
Daniel Gibson
aa51d38b3c Support up to 16 mouse buttons (SDL-only)
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
2015-01-28 17:32:35 +01:00
Daniel Gibson
65d1428dd1 Make Unicode input work for SDL
The d3bfg internal SE_CHAR events were documented as "evValue is an
ascii char", but are actually at least UTF-16, as returned by
Windows WM_CHAR events.
We now assume it's UTF-32 (UTF-16 has the same values mostly)
and the SDL backend now puts UTF-32 chars into SE_CHAR events.

In the Windows backend I make sure that no surrogate UTF-16 chars are
emitted + I added support for WM_UNICODE messages.

Now I can input Ümläuts intö the conßole window \o/
2015-01-28 17:32:35 +01:00
Robert Beckebans
d691002296 Bumped engine version to 1.0.3 to prepare for new release 2015-01-18 12:13:24 +01:00
Robert Beckebans
c0f537ae7e Made SDL 2 the default 2015-01-18 12:02:48 +01:00
Daniel Gibson
e37671d6ac Change SDL event-handling, mostly for keyboard input
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)
2015-01-06 21:22:12 +01:00
Daniel Gibson
0e1de30fe9 enhance neo/sys/sys_public.h enum keyNum_t with some missing keys
turns out that both d3bfg and cegui use direct input scancode numbers
to represent keys internally.. now isn't that fucking convenient!

d3bfg was missing some, though, so I added them
2015-01-06 21:22:05 +01:00
Daniel Gibson
b9f5d20e93 improved SDL2 textinput handling
strdup() and free() aren't really the right tool if the size of the
buffer is known anyway (and quite small, currently 32 chars)
while at it, I renamed s and s_pos to str and str_pos for better
readability
2015-01-06 21:21:58 +01:00
Robert Beckebans
940d9f8a06 Formatted Code with AStyle 2014-11-25 11:42:08 +01:00
Wintermute0110
bc6cab3ab0 * SDL joystick/gamepad support implemented and working.
* 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, ...).
2014-11-21 02:47:21 +09:00
Wintermute0110
46180de310 * Some debug stuff (now commented in) used to debug joystick/gamepad events. 2014-11-20 06:13:07 +09:00
Wintermute0110
2a71e3a31f New sh script to make standard debug version in linux. Also included the ONATIVE parameter by default in Release version. SDL2 is deacctivated by default, so there is no need to pass that argument to CMake. 2014-11-19 03:39:18 +09:00
Robert Beckebans
354208eb66 Renamed CMake -DFORRT option to -DWINRT 2014-11-15 14:43:44 +01:00
SubjectName
9803c9da0e Add option for WinRT.
"if( ${CMAKE_SYSTEM_VERSION} EQUAL 6.2 )" works for all versions of
Win8.
These changes will suppress compile error when building except for RT.
2014-11-15 00:50:03 +09:00
Robert Beckebans
54fb0ec6ad Merge pull request #204 from coldtobi/use-system-glew
USE_SYSTEM_LIBGLEW -- Use the system libglew instead of the bundled one
2014-11-12 19:56:23 +01:00
Tobias Frost
2550f84fbb USE_SYSTEM_LIBGLEW -- Use the system libglew instead of the bundled one 2014-11-12 19:35:38 +01:00
Robert Beckebans
0722718307 Disabled GPU Skinning for Mesa driver #187 2014-11-12 12:39:53 +01:00
Robert Beckebans
d295a6aea9 Disabled usage of OpenGL 3.2 compatibility profiles for Linux #187 2014-11-12 12:34:07 +01:00
Robert Beckebans
6a906704c5 Made GL_ARB_multitexture exception for OpenGL core profiles and Mesa #189 2014-11-09 11:24:37 +01:00
Robert Beckebans
0f52880767 Astyle 2014-11-09 11:15:35 +01:00
Robert Beckebans
63b6934ad6 Merge pull request #192 from coldtobi/fix_183_libjpeg
Fix 183 libjpeg
2014-11-09 11:12:13 +01:00
Robert Beckebans
1f67070170 Merge pull request #190 from palmalcheg/pch_msvc_fix
enable WinRT XAudio2 sound,  tweaks in cmake script for precompiled header ordering for QtCreator
2014-11-09 11:03:36 +01:00
BielBdeLuna
f77b3b6f71 the engine now supports all the lenguages from steam in sounds and strings 2014-11-06 16:25:25 +01:00
Tobias Frost
6bfedbfeb9 Use system's libjpeg when -DUSE_SYSTEM_LIBJPEG is used
note, that it is expected that this libjpeg is newer, therefore some files needs to be patched
to compile.

This patch is used for Debian -- Debian uses libjpeg-turbo, but I assume that it will also compile
against a recent libjpeg.
2014-11-01 17:59:25 +01:00
Tobias Frost
a8d9c2b489 patch to use system's libpng when enabled by the CMake option USE_SYSTEM_LIBPNG 2014-11-01 16:33:17 +01:00
Tobias Frost
cbbf473d59 patch to use system's zlib when enabled by the CMake option USE_SYSTEM_ZLIB 2014-11-01 14:13:16 +01:00
palmalcheg
27387e664b cmake definition on winrt detection, log device info 2014-10-27 22:20:20 +02:00
palmalcheg
aab81a225f sound for WinRT 2014-10-27 04:39:10 +02:00
unknown
f039e3c668 precompiled for msvc fix 2014-10-26 03:36:49 +03:00
BielBdeLuna
df69087fd6 ffmpeg fix so we can compile it without deprecated functions 2014-10-24 10:44:26 +02:00
Dan McGoo
2288ab82bb Fix loading saved game prior to commit 7e21048 crash.
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.
2014-10-09 18:54:35 +09:00
Dan McGoo
8b28e50cd4 Write the renderprogs under the savepath.
Because under *nix systems, the basepath may be write protected for the user.
2014-10-07 23:20:20 +09:00
Dan McGoo
e719a8de0f Add native arch compilation option. 2014-10-07 23:12:42 +09:00
Robert Beckebans
0d3e4733af glMapBufferRange Bugfix for Nvidia WHQL drivers >= 344.11.
Thanks to Mathias Heyer by Nvidia for helping this out.
2014-09-27 10:56:34 +02:00
Robert Beckebans
72f986077b Removed unnecessary USERCMD_HZ. #129 2014-08-31 16:24:56 +02:00
BielBdeLuna
7e21048ba3 skipping cut scene working 2014-08-31 02:21:49 +02:00
Robert Beckebans
ce0e83ebca Merge pull request #160 from BielBdeLuna/envshot
Envshot and cubemap to skymap transforms
2014-08-25 17:17:47 +02:00
BielBdeLuna
1f993688c6 image.h included 2014-08-25 16:13:16 +02:00
BielBdeLuna
fc7ed840bc astyle and other wonderbar stuff! 2014-08-25 15:25:54 +02:00
BielBdeLuna
fedaf6b691 envshot and others working 2014-08-24 00:10:50 +02:00
Robert Beckebans
9147482a37 Added check for Gallium drivers to use GLSL ES 3.00. #137 2014-08-20 13:07:59 +02:00
BielBdeLuna
d7345d6168 envToSky not working yet 2014-08-20 12:12:01 +02:00
Robert Beckebans
7e49606cc8 Removed ARB endings from OpenGL calls 2014-08-20 11:09:02 +02:00
Robert Beckebans
f9ff46d03d Removed include of SDL_syswm.h because it creates problems on Kubuntu 14.04 with Mir 2014-08-20 00:30:39 +02:00
BielBdeLuna
095cf836c6 screen shots are PNG and envshots are TGA, but still envshots come out somewhat wrong 2014-08-19 11:35:50 +02:00
BielBdeLuna
706d98f24c now envshot does the target renderers at a proportionatesize and unskewed, but still the first of them fails. 2014-08-18 03:38:55 +02:00
BielBdeLuna
71b26cf128 envshot working but not correctly 2014-08-16 23:20:46 +02:00
Robert Beckebans
195b99e39f Removed usage of Sys_GetSystemRam(). refs #164 2014-08-06 11:35:42 +02:00
Robert Beckebans
45b0075a75 VectorSet compile fix. refs #146 2014-08-06 11:27:11 +02:00
Robert Beckebans
05b21ff3ad Updated embedded Cg shaders 2014-08-02 15:10:06 +02:00
Robert Beckebans
e03ed8769d Small corrections to dmap 2014-08-02 15:09:25 +02:00
Robert Beckebans
352df659a8 Replaced ( void ) with () 2014-08-02 14:48:04 +02:00
Pat Raynor
125191b866 Added back dmap and aas compiler from original Doom 3 GPL release 2014-08-01 03:07:00 -04:00
Pat Raynor
d2ebebca35 Fix classic doom define logic in XAudio2 sound backend 2014-08-01 02:37:00 -04:00
Pat Raynor
6f65394d97 Removed the useless Sys_GetSystemRam and Sys_GetVideoRam 2014-08-01 02:36:04 -04:00
Pat Raynor
afeab489dd Add more windows versions... 2014-08-01 02:35:12 -04:00
Robert Beckebans
f5dd0611d5 Merge pull request #140 from darealshinji/patch-1
use av_frame_alloc() if lavc is >= 55.28.1
2014-07-21 10:04:12 +02:00
Robert Beckebans
77f65454f2 Merge pull request #143 from jonathangray/mesa-shader-fix
make a shader work with Mesa by avoiding an implicit type conversion
2014-07-21 10:00:16 +02:00
Jonathan Gray
86216aa708 Fix memory corruption in timidity resampling code.
From Sam Lantinga in SDL_mixer 1.2.8:
http://lists.libsdl.org/pipermail/commits-libsdl.org/2007-July/008673.html

Fixes a crash on OpenBSD.
2014-07-20 22:58:43 +10:00
Jonathan Gray
79b8e04e95 avoid an implicit type conversion in a shader
renderprogs/interactionSM.pixel does not compile with the Mesa
shader compiler due to a an implicit type conversion.

This gives a console warning on a release build and fatally
asserts on an debug build:

0:135(19): error: could not implicitly convert operands to arithmetic operator

Avoid this by changing an int declaration to a float.
2014-07-20 21:25:24 +10:00
darealshinji
f1d2d2c459 use av_frame_alloc() if lavc is >= 55.28.1 2014-07-07 16:40:12 +02:00
Mike Swanson
1c56560cc4 Change default Linux path to a generic and standard name
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/
2014-05-28 19:19:24 -07:00
Robert Beckebans
79c4b3ef98 Fixed SDL 1.2 support 2014-05-22 09:55:25 +02:00
Radegast
e1f8597360 Use SDL to find Application Support path. #87 2014-05-22 00:33:58 +01:00
Radegast
c76e9a26ef Removed objective-c++ code. #87 2014-05-22 00:07:34 +01:00
Radegast
4045be32b1 Replaced procfs dependent functions with native calls on OS X. #87 2014-05-21 22:31:18 +01:00
Robert Beckebans
6d0765f3e3 Fixed mouse release comment #122 2014-05-20 23:50:53 +02:00
Robert Beckebans
746c9ce20a Merge pull request #120 from JanSimek/master
Replaced MACOS_X define with standardised __APPLE__. #87
2014-05-20 23:35:59 +02:00
Robert Beckebans
ae4ef25160 Keep mouse grabbed when opening a PDA or menu. fixes #122 2014-05-20 23:33:57 +02:00
Radegast
b8676a513f Replaced MACOS_X define with standardised __APPLE__. #87 2014-05-20 13:51:53 +01:00
Robert Beckebans
be7d912cf2 Just to be safe. Changed Sys_Yield() 2014-05-20 09:31:40 +02:00
Robert Beckebans
05248cce6d AStyle 2014-05-20 09:29:08 +02:00
Radegast
5304284e90 Added CLOCK_REALTIME support to our custom clock_gettime() function for OS X. #87
The monotonic part was written by Gavin Beatty
https://github.com/gavinbeatty/python-monotonic-time/blob/master/darwin.c
2014-05-19 22:53:46 +01:00
Radegast
ca5c463bbd Added clock_gettime() for OS X which always returns monotonic time. #87 2014-05-19 16:53:20 +01:00
Radegast
764b067825 Avoid 'unknown event' spam when testing with touchpad. #87 2014-05-19 15:52:33 +01:00
Radegast
0ae98f62c4 It's no fun without textures. #87 2014-05-18 23:49:03 +01:00
Radegast
9b4f849cd5 Get RAM in MB. #87 2014-05-18 23:33:08 +01:00
Radegast
812fb78d52 Initial OS X support. #87 2014-05-18 23:14:28 +01:00
Robert Beckebans
185f2aaf90 Disabled some GL_CheckErrors() calls that can be a slowdown 2014-05-18 15:17:15 +02:00
Robert Beckebans
952907fa77 ATI hotfix for shadow mapping. #116 2014-05-17 10:53:14 +02:00
Robert Beckebans
63add75e7f Disabled MSAA 16x option which is a performance killer in combination with shadow mapping 2014-05-16 23:57:17 +02:00
Robert Beckebans
66889f5c81 Bumped engine version to 1.0.2 2014-05-16 22:49:23 +02:00
Robert Beckebans
54c31bff8f Fixed r_shadowMapJitterScale for Poisson disc algorithm 2014-05-16 22:32:56 +02:00
Robert Beckebans
3dcade4c15 Updated embedded shadow mapping using rotated Poisson disc 2014-05-16 21:52:31 +02:00
Robert Beckebans
c17773306c Revert "Changed r_useShadowMapping 1: medium+faster, 2: high quality"
This reverts commit 87b0040f92.

Conflicts:
	neo/renderer/RenderSystem_init.cpp
	neo/renderer/tr_backend_draw.cpp
	neo/renderer/tr_local.h
2014-05-16 21:50:49 +02:00
Robert Beckebans
ef9869972d Improved shadow mapping performance using randomly rotated Poisson discs 2014-05-16 21:33:39 +02:00
Robert Beckebans
7f0f7f8a41 Commented out #include <inttypes.h>. fixes #112 2014-05-16 10:47:42 +02:00
Robert Beckebans
e0c8243ee7 Make high quality shadow mapping the default 2014-05-16 00:22:34 +02:00
Robert Beckebans
87b0040f92 Changed r_useShadowMapping 1: medium+faster, 2: high quality 2014-05-16 00:14:42 +02:00
Robert Beckebans
cd3ed5a927 Sacrificed texture bias option for shadows option. fixes #109
We can't add new graphics options without altering the original Flash menu
files which we don't have. I disabled the r_lodBias functionality which
can make the game look worse by adding a bias to the texture lookup
functions which cause choosing texture mip maps that are smaller than the
original image size in every view even though we want the first mip map
level 0 which is the best quality.
2014-05-15 23:46:53 +02:00
Robert Beckebans
d356c6e156 Merge remote-tracking branch 'RBDOOM-3-BFG/master'
Conflicts:
	neo/renderer/RenderProgs.cpp
	neo/renderer/RenderProgs.h
	neo/renderer/RenderWorld_portals.cpp
	neo/renderer/tr_backend_rendertools.cpp
2014-05-15 17:03:28 +02:00
Robert Beckebans
e13fc0f4e9 Added cvar r_useHalfLambertLighting to make it optional, it requires reloadShaders 2014-05-15 16:37:55 +02:00
Robert Beckebans
42874cfd05 Added graphics option to make soft shadows optional 2014-05-15 12:14:37 +02:00