Commit graph

83 commits

Author SHA1 Message Date
Kp 32e819a9e7 Remove unnecessary explicit definition of WALL_IS_DOORWAY_result_t::operator!= 2022-10-09 23:15:19 +00:00
Kp 2a6c513ffd Fix LTO ODR build failure in wall.h
The conditional definition of a D2X flag causes a technical ODR
violation.  It is legal, though not useful, to define this flag in D1X
and in common code.  Remove the preprocessor guard so that D2X and
common code use the same definition for the enum.
2022-04-17 22:27:19 +00:00
Kp fbe3bbd0fa Use enum sidenum_t in more places 2022-01-09 15:25:42 +00:00
Kp 12a0f8e8e0 Use enum class for wall_state 2021-11-01 03:37:19 +00:00
Kp 76e2f2c6d9 Use enum class for wall_flags 2021-11-01 03:37:19 +00:00
Kp f64ed06a9d Use enum class for wall flag constants 2021-11-01 03:37:19 +00:00
Kp 983ad86e4b Use enum class for trigger number 2021-09-04 12:17:14 +00:00
Kp c58d26a791 Use trgnum_t more consistently 2021-09-04 12:17:14 +00:00
Kp 834f009dd7 Use enum class for wallnum_t 2020-12-26 21:17:29 +00:00
Kp c68dddd372 Move various definitions into namespaces 2020-12-19 16:13:26 +00:00
Kp b1b2300c7d Use enum class for wall_key 2020-12-19 16:13:26 +00:00
Kp 47c33cbd55 Use enum class for WALL_IS_DOORWAY_FLAG
This reduces the size of the debug information substantially.
2020-12-19 16:13:26 +00:00
Kp efcd9b91ce Use enum class for WALL_IS_DOORWAY_sresult_t
This generates the same code, but shrinks the debug information.
2020-12-19 16:13:26 +00:00
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 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 6ee28c3fe0 Move Triggers to d_level_unique_trigger_state 2018-12-30 00:43:58 +00:00
Kp 4b125af449 Move ActiveDoors to d_level_unique_active_door_state 2018-12-30 00:43:58 +00:00
Kp 865bad8607 Move CloakingWalls to d_level_unique_cloaking_wall_state 2018-12-30 00:43:58 +00:00
Kp 9be3c8e2e8 Move Walls into d_level_unique_wall_state 2018-12-30 00:43:58 +00:00
Kp a9a9d1f26a Move WALL_IS_DOORWAY out of line
Writing it inline causes wall.h to depend on segment.h.
2018-12-30 00:43:57 +00:00
Kp 706a704c6d Move unique_side to unique_segment 2018-12-13 02:31:38 +00:00
Kp c56223ced4 Eliminate more uses of valptridx::operator-> 2018-09-19 02:13:29 +00:00
Kp facc1fe1f5 Fix check_header_includes=1 build 2018-08-29 01:47:42 +00:00
Kp 36ada21c0c Fold exploding walls into regular walls 2018-08-12 21:08:07 +00:00
Kp 8bbdeedeb2 Consolidate stuck object state
Move it to a structure.  Make all the modifiers methods.  Change all
callers of those methods to pass the structure.  This makes the stuck
object handling free of direct access to global game data.
2018-08-04 17:52:57 +00:00
Kp 57334255ac Simplify stuck object cleanup 2018-08-04 17:52:57 +00:00
Kp 0fd7e0e4ce Pass context arrays to WALL_IS_DOORWAY 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 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 73d92bb509 Make wclip::num_frames uint16_t 2017-06-17 23:05:16 +00:00
Kp 430f7832aa Move valptridx factories into array_managed_type 2017-06-10 03:31:03 +00:00
Kp 45d7c6da65 Fix check_header_includes=1 wall.h 2017-02-19 19:33:36 +00:00
Kp fa1f8488f0 Use uint8_t for sidenum 2016-12-24 22:44:08 +00:00
Kp 1f434f98ad Use valptridx for ActiveDoors 2016-12-10 17:51:08 +00:00
Kp 6226e5fbbf Remove obsolete operator-(wall *, array<wall, N> &) 2016-11-26 22:51:49 +00:00
Kp cb1410dd95 Use valptridx for CloakingWalls 2016-11-19 17:24:54 +00:00
Kp 608467161b Remove obsolete arguments from DEFINE_VALPTRIDX_SUBTYPE 2016-04-06 03:34:13 +00:00
Kp 553b313099 Use vwallptr 2016-02-12 04:02:28 +00:00
Kp 0101f98905 Use wallnum_t in more places 2016-02-06 22:12:54 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp ffd6c113ae Move fwdwall.h -> fwd-wall.h for consistency 2015-10-09 02:46:10 +00:00
Kp 15fb75c1c7 Fix check_header_includes build 2015-07-25 23:10:45 +00:00
Kp fd6ac87c25 Fix trigger_none checks 2015-04-26 20:15:50 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp fd01d4c673 Reorder wall_is_doorway to favor likely results 2015-01-12 00:26:03 +00:00
Kp 44d5ae69c6 Pack wall 2015-01-12 00:26:02 +00:00
Kp 754c5342f9 Move wall declarations to fwdwall.h 2014-12-22 04:35:48 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00