Commit graph

89 commits

Author SHA1 Message Date
zico 731fb5204e Adjusted keyboard ramp scaling based on observation that the original game uses a keyboard ramp of 8 frames. Full sensitivity should reflect 60FPS behaviour, half sensitivity reflects 30FPS behaviour (give or take a frame). Ramping should be properly time-scaled now. 2015-12-14 15:19:59 +01:00
Kp 6111e5adbf Allow configuring max joysticks at build time 2015-11-01 21:15:40 +00:00
Kp add7a80bfc Fix binding mouse button to arm fusion/omega cannon
Commit 3adc5fe77a added the ability to
bind mouse buttons to change weapons, but a copying error bound the
fusion/omega entry to joystick instead of mouse.  Switch it to mouse as
clearly intended.

This fix is needed for any commit with the underlying feature, but only
applies cleanly to 0.58.1 after applying cleanup commits:

    00381b2652 ("Abstract out weapon names")
    d035fb258a ("Remove unused kc_item->id")
    fc1e00dae6 ("Pre-compute labelx+inputx")
    a4f3c93247 ("Separate mutable and const kconfig data")
    953a1888d7 ("Combine state pointer and count pointer")
    2bd302cddd ("Move Controls ubyte values into substructure")
    ff8db8d39e ("Reduce relocations for Controls members")
    593d0b25ff ("Remove duplicate kconfig labels")
    dc36ee3ab3 ("Store kconfig labels separately")

Fixes: 3adc5fe77a ("Saving  weapon keys in PLX like in D1X-Rebirth" ...)
2015-11-01 21:15:38 +00:00
Kp 3a4adbc917 Let kconfig skip zero-width kc_item cells 2015-11-01 21:15:38 +00:00
Kp 545b71c1cc Use enum class for kconfig subtype 2015-11-01 21:15:38 +00:00
Kp 50f672ba34 Reuse computed string length 2015-09-29 02:41:22 +00:00
Kp d9cef82f81 Allow nullptr for gr_get_string_size 2015-09-29 02:41:22 +00:00
zico f8f9843f35 Mouse overrun improvements: Reduced the range of Overrun (from 32 to 16) based on feedbach and restored original mouse base divisor for mouse X/Y axes (changed in 5a36ffdb17) 2015-09-25 12:07:30 +02:00
zico d3660207d2 Added Mouse Overrun Buffer option as proposed by kp 2015-09-24 16:31:10 +02:00
Kp 69e3762933 Return joystick axis values by reference 2015-09-19 23:04:34 +00:00
zico b5ac86c4f0 Slightly modified keyboard pitch and heading sensitivity so highest setting matches the original game running at ~60 FPS 2015-08-29 15:46:03 +02:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp bc7c469ab2 Use array<> for more globals 2015-08-12 03:11:46 +00:00
Kp c80d12319a Use unqualified begin/end
Most call sites use unqualified begin/end and rely on using declarations
to pick an appropriate implementation.  Fix the sites that explicitly
requested std::begin/std::end.
2015-08-03 03:11:25 +00:00
Kp 6bd93e466f Guard args.h for LTO -Wodr 2015-07-18 21:01:56 +00:00
Kp 241ea1722d Cache kconfig_read_controls FrameTime 2015-06-25 02:48:43 +00:00
Kp 83f1b1414b Cache speed_factor*FrameTime 2015-06-25 02:48:42 +00:00
Kp 882ffdebb0 Use operator?: in kconfig 2015-06-25 02:48:42 +00:00
Kp bc3a1402b2 Reduce wasted work in kconfig 2015-06-25 02:48:42 +00:00
Kp 0c106b67f2 Make convert_raw_joy_axis static 2015-06-23 03:04:47 +00:00
Kp 2d70cd65ea Cache font space results 2015-06-13 22:42:20 +00:00
Kp 78f6dc29a6 Cache font scale Y float 2015-06-13 22:42:20 +00:00
Kp 5573ed6bea Cache font scale X float 2015-06-13 22:42:20 +00:00
John Ackerman fe71a94d53 Implement Nonlinear Joystick Settings
[Kp: fix whitespace; squash fixes into main]
Requested-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/pull/84>
2015-06-11 01:41:26 +00:00
Kp fd51d9dcd5 Shorten kc_change_mouseaxis 2015-05-09 17:39:03 +00:00
Bradley Bell 630206275d Include <functional> for std::plus and std::minus.
Fixes: similar/main/kconfig.cpp:81:12: error: no member named 'plus' in namespace 'std'
Fixes: similar/main/kconfig.cpp:82:12: error: no member named 'minus' in namespace 'std'

[Kp: fixed commit formatting.  Git style says line 2 is always blank.]
2015-05-01 02:29:11 +00:00
Kp 6792c1bc4b Enable -Wunused-parameter 2015-04-26 20:15:56 +00:00
Kp cd6be09547 Reduce kconfig.h includes 2015-04-19 04:18:51 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp d4351a9457 Fix gcc-4.6 for loop variable warning 2015-04-02 02:36:52 +00:00
Kp 90f99c8baa Use any_of to search system_keys 2015-03-22 18:49:21 +00:00
Kp ce1844bf93 Remove bogus test
Global arrays are never placed at NULL.
2015-03-22 18:49:21 +00:00
Kp ddd81962b7 Reduce duplication in find_next_item_* 2015-02-05 03:03:49 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 28a31a223f Centralize window_close calls 2015-01-17 18:31:41 +00:00
Kp c2b7990550 Pass window_get_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp 64fab7512a Propagate for variables in similar/main/kconfig.cpp 2014-09-26 02:42:09 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp a02f78a171 Move saving window pointer into helper 2014-09-07 19:04:07 +00:00
Kp fdef9fd04f Use C++ allocation for window-specific data 2014-09-07 19:04:07 +00:00
Kp 3e8ec8932f Use array<> for player_config 2014-08-26 02:59:01 +00:00
Kp b276590998 Change gr_fade_table to array<array<>> 2014-08-08 02:50:27 +00:00
Kp 4acbb40ad7 Use enum for window event result 2014-08-07 02:47:48 +00:00
Kp c1d184240d Use unique_ptr to manage fonts 2014-07-22 23:48:23 +00:00
Kp bd1c6d8c5d Reduce header includes of physfsx.h 2014-07-22 23:48:23 +00:00
Kp fda2bf70aa List initialize Controls 2014-07-04 03:56:41 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 1e8036bd24 Split compiler.h for PCH compatibility 2013-12-21 05:12:38 +00:00