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
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
Kp
29826db21c
Always keep kc_* table relations const
2013-11-18 00:54:59 +00:00
Kp
6becfdacca
Remove NUM_DXX_REBIRTH_CONTROLS
2013-11-18 00:54:59 +00:00
Kp
a842b31a20
Remove NUM_MOUSE_CONTROLS
2013-11-18 00:54:59 +00:00
Kp
04b0bd892d
Remove NUM_JOYSTICK_CONTROLS
2013-11-18 00:54:59 +00:00
Kp
bf7063080e
Remove NUM_KEY_CONTROLS
2013-11-18 00:54:59 +00:00
Kp
6586d474f9
Only rebuild tables on request
2013-11-16 23:24:12 +00:00
Kp
fc1e00dae6
Pre-compute labelx+inputx
2013-11-16 23:24:12 +00:00
Kp
c959915fba
Remove always-true test in kc_drawitem
2013-11-16 23:24:12 +00:00
Kp
d0514455b3
Use automap_state instead of automap_count
2013-11-16 23:24:12 +00:00
Kp
321e240744
Use rear_view_state instead of rear_view_count
2013-11-16 23:24:12 +00:00
Kp
cda0b60687
Remove unused fire_secondary_count
2013-11-16 23:24:12 +00:00
Kp
494c380abb
Switch automap to use fire_primary_state
...
Counting is unnecessary here.
2013-11-16 23:24:12 +00:00
Kp
d035fb258a
Remove unused kc_item->id
2013-11-16 04:28:39 +00:00
Kp
9a6414ceca
Combine hitbox bounds testing
2013-11-16 04:28:39 +00:00
Kp
b7f1a71840
Combine item text formatting
2013-11-16 04:28:39 +00:00
Kp
ba7950d3d5
Move similar/main/kconfig.c -> similar/main/kconfig.cpp
2013-10-20 22:49:11 +00:00