1 /* 2 * This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>. 3 * It is copyright by its individual contributors, as recorded in the 4 * project's Git history. See COPYING.txt at the top level for license 5 * terms and a link to the Git history. 6 */ 7 8 #pragma once 9 #include "dxxsconf.h" 10 #include "object.h" 11 #include "morph.h" 12 13 namespace dcx { 14 15 struct d_level_unique_morph_object_state 16 { 17 std::array<morph_data::ptr, 5> morph_objects; 18 ~d_level_unique_morph_object_state(); 19 }; 20 21 } 22 23 namespace dsx { 24 25 struct d_level_unique_object_state 26 { 27 unsigned num_objects = 0; 28 /* `accumulated_robots` counts robots present at level entry and 29 * robots added later via materialization centers / boss gating. It 30 * never decreases, so it is not a shortcut for counting the number 31 * of currently live objects with type OBJ_ROBOT. 32 */ 33 unsigned accumulated_robots; 34 unsigned total_hostages; 35 unsigned Debris_object_count = 0; 36 #if defined(DXX_BUILD_DESCENT_II) 37 d_unique_buddy_state BuddyState; 38 d_thief_unique_state ThiefState; 39 d_guided_missile_indices Guided_missile; 40 #endif 41 object_number_array<imobjidx_t, MAX_OBJECTS> free_obj_list; 42 object_array Objects; 43 d_level_unique_boss_state BossState; 44 d_level_unique_control_center_state ControlCenterState; 45 vms_vector last_console_player_position; 46 d_level_unique_morph_object_state MorphObjectState; 47 uint8_t Level_path_created = 0; get_objectsd_level_unique_object_state48 auto &get_objects() 49 { 50 return Objects; 51 } get_objectsd_level_unique_object_state52 const auto &get_objects() const 53 { 54 return Objects; 55 } 56 }; 57 58 extern d_level_unique_object_state LevelUniqueObjectState; 59 60 } 61