Commit graph

60 commits

Author SHA1 Message Date
Kp 34d89d5139 Use inline namespace dsx for segment.h 2015-12-05 22:57:25 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp 6f10a67c09 Move segment::sides to end
sides[] is large and caused all members after it to require disp32
offsets.  Move it to the end so that all members can use disp8 offsets.

This saves ~1300 bytes of text on an editor+debug build.
2015-10-18 21:01:20 +00:00
Kp ad8b4230df Move fwdsegment.h -> fwd-segment.h for consistency 2015-10-10 03:44:14 +00:00
Kp 71ffbdf719 Replace fill(0) with ={} 2015-09-29 02:41:22 +00:00
Kp 2155c417cb Move array_managed_type into valptridx<T> 2015-08-22 20:43:04 +00:00
Kp 20b1db3483 Expand dxx_explicit_operator_bool to "explicit"
Many files now use "explicit", so compilers which reject
explicit operator bool() will not work.  Remove the macro.
2015-08-03 03:11:25 +00:00
Kp 3015db64ad Guard segment.h for LTO -Wodr 2015-07-18 21:01:55 +00:00
Kp 745de17c41 Use T::index_type for highest_valid 2015-07-13 01:09:36 +00:00
Kp c53b734abb Compute slide segments early
Store slide flag in segment to save one byte per segment.
2015-05-17 20:37:59 +00:00
Kp 9dc22b1ee6 Expand DXX_CXX11_EXPLICIT_DELETE
Various functions use the non-macro form, so support for =delete is
already mandatory.  Remove the remnants of support for compilers which
lack =delete and replace it with a hard stop when the compiler rejects
declaring explicitly deleted functions.
2015-05-01 02:18:33 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp a65533d477 Remove unused delta_light dummy 2015-02-28 19:36:01 +00:00
Kp 702ea40ade Move segment declarations to fwdsegment.h 2014-12-22 04:35:49 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp 80f3f83577 Use range_for for Delta_lights 2014-11-23 04:36:59 +00:00
Kp 80bbc9c69c Use range_for on Dl_indices 2014-11-23 04:36:58 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 3f85861892 Move side::illegal_type down 2014-10-25 16:11:24 +00:00
Kp 019b572c0e Remove #define Segment2s Segments 2014-10-21 03:15:12 +00:00
Kp 944baf824d Remove #define segment2 segment 2014-10-21 03:14:36 +00:00
Kp 32cb662f66 Remove unused s2s2(S) 2014-10-21 03:14:21 +00:00
Kp d462cd11df Fix gcc 4.6 build of vms_vector with explicit temporary
gcc 4.7 and later support brace initializing the base class
gcc 4.6 requires an explicit temporary to achieve the same result
2014-10-16 01:46:21 +00:00
Kp c704cc9fc9 Add const void* conversion to various types
Add operator const void*() to prevent accidental use of pointer
comparison.  With the overload present, comparing two objects triggers
an ambiguous conversion to pointer, instead of comparing the pointer
values.
2014-10-12 22:11:28 +00:00
Kp 3714c0c645 Use new serializer for writing segment side wall/tmap 2014-10-04 17:53:14 +00:00
Kp af26259158 Remove unnecessary padding in segment sides 2014-10-04 17:53:03 +00:00
Kp 2a63700d95 Use magic type for wall magic constants 2014-10-04 17:31:13 +00:00
Kp 6971dfbf4a Use symbolic *_none constants for -1 2014-10-04 17:31:13 +00:00
Kp ff37e54087 Change Vertices to array<vertex> 2014-10-02 03:02:34 +00:00
Kp 703f60ac3f Fix -Wtype-limits warnings 2014-09-21 21:41:55 +00:00
Kp f5ee5f8813 Use array<> for side 2014-09-13 22:05:52 +00:00
Kp 73a0aee004 Use accessor for side::type 2014-09-06 22:36:58 +00:00
Kp 2a3176dc98 Use array<> for segment members 2014-08-16 18:14:00 +00:00
Kp 9979302303 Change IS_CHILD to inline function 2014-08-13 03:19:12 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp bfda4c554e Inline med_get_vertex_list 2014-08-12 03:01:14 +00:00
Kp bd1c6d8c5d Reduce header includes of physfsx.h 2014-07-22 23:48:23 +00:00
Kp e765fd74fc Move Highest_segment_index into Segments 2014-07-13 03:43:32 +00:00
Kp 8958a0dfbe Remove unnecessary typename usage 2014-06-30 03:25:47 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 9a5d0f6f09 Use symbolic values for segment/object first/none 2014-01-06 04:17:55 +00:00
Kp 888f44336f Use segment array for render visited[] 2014-01-01 03:42:00 +00:00
Kp 40e90fea22 Move Light_subtracted[] to Segments[].light_subtracted 2014-01-01 03:33:27 +00: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 99626b2f34 Clear visited segment array in constructor 2013-12-22 05:27:46 +00:00
Kp c31c67c587 Store selected segments in countarray object 2013-12-22 01:54:15 +00:00
Kp 1e8036bd24 Split compiler.h for PCH compatibility 2013-12-21 05:12:38 +00:00
Kp d2c2dfe95c Make Segments[] a C++ array 2013-12-19 03:31:24 +00:00
Kp 2f18c5037d Store group lists as countarray objects 2013-12-18 03:48:52 +00:00
Kp f05b6f0008 Use on-stack bit array for tracking AI segment visits 2013-12-15 18:50:39 +00:00