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
Kp
cea46651fc
Check type of window handler function
2013-12-15 18:51:26 +00:00
Kp
dc36ee3ab3
Store kconfig labels separately
2013-12-15 18:51:23 +00:00
Kp
027b6fd20a
Only build tables in debug builds
2013-12-15 05:20:37 +00:00
Kp
593d0b25ff
Remove duplicate kconfig labels
...
import re, fileinput
which = 3
last = [None, None]
e = re.compile(r'(?P<left> \{(?:\s*\d+,){8})(?P<quote>"?)(?P<s>[^",]+)(?P=quote)(?P<right>,.*},)$')
for line in fileinput.input(inplace=True):
if line == '#if defined(DXX_BUILD_DESCENT_I)\n':
which = 1
elif line == '#elif defined(DXX_BUILD_DESCENT_II)\n':
which = 2
elif line == '#endif\n':
which = 3
else:
m = e.match(line)
if m:
s = m.group('s')
suppress = True
if (which & 1) and last[0] != s:
suppress = False
last[0] = s
if (which & 2) and last[1] != s:
suppress = False
last[1] = s
if suppress:
line = m.group('left') + ' NULL /* duplicate */' + m.group('right') + '\n'
print line,
2013-12-13 03:50:51 +00:00
Kp
ff8db8d39e
Reduce relocations for Controls members
2013-12-13 03:49:37 +00:00
Kp
2bd302cddd
Move Controls ubyte values into substructure
2013-12-13 03:47:57 +00:00
zico
5a36ffdb17
Reduced base divisor for mouse X and Y axes, doubling acceleration and base sensitivity
2013-12-10 16:26:37 +01:00
Kp
04fdf83298
Use helper to copy default key settings
2013-12-08 21:43:53 +00:00
Kp
953a1888d7
Combine state pointer and count pointer
2013-12-08 00:12:45 +00:00
Kp
a4f3c93247
Separate mutable and const kconfig data
2013-12-08 00:10:29 +00:00
Kp
3e4884f499
Consolidate ramped keyboard input
...
This also fixes a copy-paste bug in bank handling.
2013-12-07 21:34:53 +00:00
Kp
65ef441f20
Fix copy-paste bug from 98bf17c0
change of keyboard sensitivity
...
Using different sensitivities for left-slide versus right-slide looks
like a bug. Fix it.
2013-12-07 21:32:03 +00:00
Kp
141ead1830
Move ramped controls into template structure
2013-12-07 21:13:37 +00:00
Kp
75c229c6bf
Normalize con_printf newline usage
2013-12-07 21:13:37 +00:00
Kp
7f5410cc8b
Use lengthof instead of sizeof(A)/sizeof(A[0])
...
The latter form can accept pointers, but the template lengthof cannot.
2013-12-07 18:38:10 +00:00
Kp
74ac85076f
Store joystick button text in one allocation
2013-12-01 22:42:47 +00:00
Kp
5354d05fbf
Store joystick axis text in one allocation
2013-12-01 22:42:47 +00:00
Kp
b326bb832b
Use helper to clamp kconfig values
2013-11-18 04:51:06 +00:00
Kp
810ccd037d
Sanity check axis reads
2013-11-18 04:51:06 +00:00
Kp
4ba8444fc8
Use helper to read axis fields
2013-11-18 04:51:06 +00:00
Kp
6f839dedae
Use helper to set exclusive binding
2013-11-18 04:51:06 +00:00
Kp
5266426171
Also switch kc_menu to references
2013-11-18 00:56:20 +00:00
Kp
975acb97fe
Remove pointer subtraction in kc_change_*
2013-11-18 00:56:20 +00:00