Kp
6d3dce4e16
Use enum class for tmap_num2
...
Define separate enum values for rotation data in both the high bits,
where it is usually kept, and the low bits, where it is sometimes used
for math or comparisons.
Define an enum value to represent the composite of the index and the
rotation, since the composite is not suitable for use as an array
subscript. Add helper functions to extract the component pieces.
2020-08-24 01:31:28 +00:00
Kp
de4efc4f46
Qualify more uses of shared_segment members
2020-08-24 01:31:28 +00:00
Kp
038c6aef4d
Move d_level_unique_object_state to a separate header
...
This is required to untangle the cross-inclusion of object.h and
morph.h.
2020-08-10 03:45:14 +00:00
Kp
8cf9ab8222
Access unique_segment::static_light directly
...
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
2020-08-10 03:45:13 +00:00
Kp
336d84f451
Access unique_segment::light_subtracted directly
...
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
2020-08-10 03:45:13 +00:00
Kp
d738f6c21e
Change enum side_type
to enum class side_type
2020-07-16 02:31:04 +00:00
Kp
316a4740a6
Move words_bigendian into if constexpr
...
`words_bigendian` is `constexpr`, so move the tests on it behind `if
constexpr` to encourage the compiler to prune unreachable paths.
2020-07-05 23:34:33 +00:00
Kp
a4f2edfaa9
Move LevelSharedVertexState into d_level_shared_segment_state
2020-05-17 23:35:25 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
c9b1b5b1ec
Use susegment for WALL_IS_DOORWAY
2019-12-27 02:02:23 +00:00
Kp
c3265f6b90
Convert segment &
to susegment
where possible
2019-12-22 05:34:08 +00:00
Kp
48527630dd
Remove __attribute__((packed)) on shortpos for gcc-9 support
...
gcc-9 warns on taking the address of an unaligned member in a packed
structure. This structure does not need to be packed. Remove
__attribute__((packed)) and fix the code to implement I/O correctly
without packing.
2019-05-11 20:18:29 +00:00
Kp
3bd10610fc
Use xrange for loops with zero start and simple identifier end
...
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*!=\s*\([A-Za-z_0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\3))/
2019-05-04 18:27:37 +00:00
Kp
a74914eb9c
Use xrange for loops with constant numerical start and end
...
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*\([0-9]\+\)u\?\s*;\s*\2\s*!=\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\3u, \4u))/
2019-05-04 18:27:37 +00:00
Kp
538286e02c
Add range helper zip()
2019-05-04 18:27:36 +00:00
Kp
2243cd7f58
Use xrange for loops with zero start and constant numerical end
...
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*\(!=\|<\)\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\4u))/
2019-05-04 18:27:36 +00:00
Kp
106de25617
Cache visited_segment_bitarray_t reference in apply_light_to_segment
2019-03-03 00:31:09 +00:00
Kp
c992155ff1
Remove useless texture writeback in validate_segment_side
2019-03-03 00:31:09 +00:00
Kp
1008ab397e
Move Objects to d_level_unique_object_state
2019-03-03 00:31:08 +00:00
Kp
05244122bd
Tighten input for set_segment_depths
2019-02-02 18:36:39 +00:00
Kp
1f18db3c39
Move TmapInfo to d_level_unique_tmap_info_state
2018-12-30 00:43:59 +00:00
Kp
9be3c8e2e8
Move Walls into d_level_unique_wall_state
2018-12-30 00:43:58 +00:00
Kp
b3cd7588ef
Move Delta_lights into d_level_shared_destructible_light_state
2018-12-30 00:43:58 +00:00
Kp
46644b4e91
Move Dl_indices into d_level_shared_destructible_light_state
2018-12-30 00:43:58 +00:00
Kp
1a5844e218
Move Vertices out of global scope
2018-12-30 00:43:57 +00:00
Kp
045afc2c56
Prefer const shared_segment &
over vcsegptr_t
2018-12-30 00:43:57 +00:00
Kp
aa9e6da297
Pass Dl_indices as context
2018-12-30 00:43:57 +00:00
Kp
d550cfe680
Remove struct side
2018-12-13 02:31:38 +00:00
Kp
706a704c6d
Move unique_side to unique_segment
2018-12-13 02:31:38 +00:00
Kp
406be26de4
Pass d_level_shared_segment_state to validate_segment_all
2018-09-19 02:13:30 +00:00
Kp
f7ad4d9b1a
Pass segments to find_point_seg
2018-09-19 02:13:30 +00:00
Kp
9ebb32c111
Pass d_level_shared_segment_state to trace_segs
2018-09-19 02:13:30 +00:00
Kp
c2944896de
Pass vertex factory to create_shortpos_native
2018-09-19 02:13:30 +00:00
Kp
9cedc53f52
Pass vertex factory to extract_orient_from_segment
2018-09-19 02:13:30 +00:00
Kp
1527785efd
Pass vertex factory to validate_segment_side
2018-09-19 02:13:29 +00:00
Kp
adf41c19c2
Pass vertex factory to check_for_degenerate_segment
2018-09-19 02:13:29 +00:00
Kp
68de87c0e5
Pass vertex factory to check_for_degenerate_side
2018-09-19 02:13:29 +00:00
Kp
d71938e1a7
Pass vertex factory to create_walls_on_side
2018-09-19 02:13:29 +00:00
Kp
bd58d5f825
Pass vertex factory to extract_*_vector_from_segment
2018-09-19 02:13:29 +00:00
Kp
01512015a8
Move Num_segments to new d_level_shared_segment_state
2018-09-19 02:13:29 +00:00
Kp
dc4fcf8a35
Flip sense of is_door_free
2018-08-12 21:08:07 +00:00
Kp
eff80c2d13
Fix format string warnings for win64
2018-08-03 04:08:12 +00:00
Kp
30a83eec41
Eliminate some uses of valptridx::operator->
2018-06-24 05:06:15 +00:00
Kp
0fd7e0e4ce
Pass context arrays to WALL_IS_DOORWAY
2018-06-24 05:06:15 +00:00
Kp
3408e3a0cd
Switch to shared_segment arguments where possible
2018-06-24 05:06:15 +00:00
Kp
fb68e7f9ec
Eliminate use of side *
2018-06-24 05:06:15 +00:00
Kp
0c3e99f14c
Split side uses based on shared vs unique
2018-06-24 05:06:15 +00:00
Kp
4ae88b6594
Pass only shared_segment to compute_segment_center
2018-06-24 05:06:14 +00:00
Kp
6d0d68d188
Split some segment uses based on shared vs unique
...
Leave `sides` in `shared_segment` to minimize churn. Parts of it must
move to `unique_segment` before this project finishes.
2018-06-24 05:06:14 +00:00
Kp
93789f0666
Use valptridx for Dl_indices
2018-06-06 04:53:45 +00:00