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" ...)
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.
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.]
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,