Commit graph

52 commits

Author SHA1 Message Date
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