Commit graph

63 commits

Author SHA1 Message Date
Kp d6b4106d36 Tighten index handling for Ai_transition_table
Avoid undefined accesses when a robot has an invalid awareness type.
2022-01-08 17:48:09 +00:00
Kp 648bbac0b1 Convert ai_local::achieved_state to ai_static_state 2022-01-08 17:48:09 +00:00
Kp d1ac265c2c Convert ai_local::goal_state to ai_static_state 2022-01-08 17:48:09 +00:00
Kp 37f3c10dd4 Convert ai_static::CURRENT_STATE to ai_static_state 2022-01-08 17:48:09 +00:00
Kp c3937f391f Convert ai_static::GOAL_STATE to enum 2022-01-08 17:48:09 +00:00
Kp 9fdf6005df Convert ai_static::GOALSIDE to sidenum_t 2022-01-08 17:48:09 +00:00
Kp c6d98df9fb Move CURRENT_GUN out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp 5128b84122 Move CURRENT_STATE out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp 39e9673f54 Move GOAL_STATE out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp c10855939b Move PATH_DIR out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp 1f00d716de Move SUBMODE/SUB_FLAGS out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp db90f0df62 Move GOALSIDE out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp ae44e0226e Move CLOAKED out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp db7b528177 Move SKIP_AI_COUNT out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp 197ed13d42 Move REMOTE_OWNER out of ai_static::flags 2022-01-08 17:48:09 +00:00
Kp 7015e3e93c Move REMOTE_SLOT_NUM out of ai_static::flags
Some flags merit a type other than int8_t.  Begin moving flags out to
distinct variables with their own type.

Add static_assert checks that the ABI relevant structures do not change.
2022-01-08 17:48:09 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp ddc25b59b7 Explicitly zero-initialize object structure members
C++17 will require this in order for `object::object()` to be constexpr.
Add it here, before switching over.
2020-05-02 21:18:42 +00:00
Kp 41f4e84261 Move Stolen_item_index into d_thief_unique_state 2019-07-16 04:00:50 +00:00
Kp a2560cdfb5 Move Stolen_items into d_thief_unique_state 2019-07-16 04:00:50 +00:00
Kp af166735cc Use enum class for player visibility 2019-06-20 04:02:27 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 012238ba14 Fold segnum.h into fwd-segment.h 2016-12-24 18:12:17 +00:00
Kp c636dc4b98 Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp 26e948d5f1 Uninline namespace dsx 2015-12-13 18:00:49 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp 32051298ae Use inline namespace dcx/dsx for more symbols 2015-12-13 18:00:48 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp b8baddb5a2 Use uint8_t for player_awareness_type_t
Fixes: 9157e5f970 ("Use enum class for player_awareness_type_t")
2015-08-22 20:43:02 +00:00
Kp f5b02ce6a0 Remove write-only ai_static D1 follow_path_start_seg 2015-05-09 17:39:01 +00:00
Kp 7dae02fbb4 Remove write-only ai_static D1 follow_path_end_seg 2015-05-09 17:39:00 +00:00
Kp 3b59a71e11 Remove unused D1 last_see_time 2015-05-09 17:39:00 +00:00
Kp 83baf4dfe8 Remove unused D1 last_attack_time 2015-05-09 17:39:00 +00:00
Kp 8e5a63700b Use enum class for ai_mode 2015-04-26 20:15:51 +00:00
Kp f15ec9c86a Use enum for AIM constants 2015-04-26 20:15:51 +00:00
Kp e883d7c872 Use enum class for AIB constants 2015-04-26 20:15:51 +00:00
Kp 5ae5033fed Use enum for AIB constants 2015-04-02 02:36:57 +00:00
Kp face692126 Narrow D2 previous_visibility to uint8_t 2015-04-02 02:36:53 +00:00
Kp 6757b2178b Narrow D2 rapidfire_count to uint8_t 2015-04-02 02:36:53 +00:00
Kp bb10d350f4 Narrow D2 consecutive_retries to uint8_t 2015-04-02 02:36:53 +00:00
Kp a36603826a Narrow D2 retry_count to uint8_t 2015-04-02 02:36:53 +00:00
Kp 9157e5f970 Use enum class for player_awareness_type_t 2015-04-02 02:36:53 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp a622aecd58 Pass vcobjptridx_t to digi_ functions 2014-12-13 17:47:06 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp 81c6f27f44 Change point_seg::segnum to short 2014-08-13 02:56:58 +00:00
Kp 7888c13b6b Write point_seg carefully 2014-08-12 02:55:23 +00:00
Kp f6631ce742 Unpack various structures
Prohibit conversion to void* to avoid accidental use with memcpy
2014-06-21 23:56:27 +00:00