Kp
e1aac6949a
Replace __attribute_warn_unused_result with C++17 [[nodiscard]]
...
This eliminates a configure test, and may help readers understand the
annotation more readily.
2021-06-28 03:37:51 +00:00
Kp
c482d01be5
Move some fvi types to namespaces
2020-10-01 03:25:27 +00:00
Kp
de4efc4f46
Qualify more uses of shared_segment members
2020-08-24 01:31:28 +00:00
Kp
5dfd62c4f6
Use susegment
for references introduced by valptridx conversion
2019-12-22 05:34:08 +00:00
Kp
30091902af
Simplify valptridx types where possible
...
Switch valptridx::ptr to a reference type.
Switch valptridx::ptridx to a reference type or to ::ptr.
Fix up uses of operator-> accordingly.
2019-12-22 05:34:08 +00:00
Kp
12403a78f7
Pass vcvertptr to sphere_intersects_wall
2019-02-02 18:36:39 +00:00
Kp
ffb5e8821c
Flatten use of sphere_intersects_wall
2019-02-02 18:36:39 +00:00
Kp
0080a8b7c7
Remove unused object_intersects_wall
2019-01-01 04:54:35 +00:00
Kp
2f537133e8
Use vcobjidx_t for fvi ignore_obj_list
...
Enforce that callers provide vcobjidx_t, instead of permitting any type
compatible with objnum_t.
2018-12-30 00:43:57 +00:00
Kp
482dcf0ba3
Avoid temporarily moving boss while probing layout
...
Expose sphere_intersects_wall and call it directly from
boss_fits_in_seg, so that boss_fits_in_seg does not need to modify the
position and segment of the boss during the test.
2017-03-01 02:48:40 +00:00
Kp
854907aa1b
Move find_hitpoint_uv into namespace dsx
2016-08-25 04:05:32 +00:00
Kp
bb41075adb
Add preprocessor guards around types that vary by game
2015-11-26 02:56:55 +00:00
Kp
2196008178
Move fwdobject.h -> fwd-object.h for consistency
2015-10-10 03:44:14 +00:00
Kp
bb5fd12ffe
Pass vcobjptr to object_intersects_wall
2015-06-02 03:03:31 +00:00
Kp
661e676688
Combine object_intersects_wall_d outputs
...
Drop unused face.
2015-02-14 22:48:27 +00:00
Kp
078d9513e0
Pass end-of-list for ignore_obj_list
2015-02-05 03:03:51 +00:00
Kp
cd76870ecc
Return find_hitpoint_uv u,v by value
2015-01-29 04:27:36 +00:00
Kp
f4517dc0bd
Reduce inclusion of segment.h
2015-01-29 04:27:36 +00:00
Kp
c8b5fe5552
Pass find_vector_intersection arg by &
2015-01-20 02:46:42 +00:00
Kp
f206b3b127
Reduce inclusion of object.h
2014-11-23 04:36:58 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
9a32e151ff
Pass check_effect_blowup vms_vector arg by &
2014-10-26 21:36:35 +00:00
Kp
125d9257be
Use special type names for segment/object numbers
2014-08-13 02:57:12 +00:00
Kp
1c064b8efb
Remove unused find_hitpoint_uv l parameter
2014-08-08 02:51:02 +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
a7bd19a7ca
Convert fvi to use countarray for segment list
...
Also fixes a bug where seglist could receive wrong elements when
fvi_sub recursive call returns a type other than HIT_NONE. Bug caused
by badly named variables:
int ii;
for (ii=0;i < temp_n_segs && *n_segs < MAX_FVI_SEGS-1;)
seglist[(*n_segs)++] = temp_seglist[ii++];
The wrong counter is used for first part of the conditional, so
uninitialized elements of temp_seglist could be read back if i
(==n_segs_visited) is smaller than temp_n_segs or elements could be
skipped if i is greater than temp_n_segs.
2013-12-22 20:56:53 +00:00
Kp
9de54cfa74
Switch to C++ linkage
...
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
if line == cxxguard:
guard = 1
continue
if guard:
if line == 'extern "C" {\n':
guard = 2
continue
if line == '}\n':
guard = 0
continue
if guard == 2:
assert(line == '#endif\n')
guard = 0
print cxxguard,
continue
print line,
2013-12-06 03:35:32 +00:00
Kp
e5ee9b72f1
Move similar/main/aipath.c -> similar/main/aipath.cpp
2013-10-05 21:35:58 +00:00
Kp
e750c90b00
Mark more math as const correct
2013-08-10 03:55:50 +00:00
Kp
319b3ec5fd
Mark more math as const correct
2013-08-09 03:04:18 +00:00
Kp
a51d4fccae
Move */main/fvi.h -> common/main/fvi.h
2013-03-03 01:03:33 +00:00