Pass LevelUniqueWallSubsystemState to wall_init
This commit is contained in:
parent
211dcede72
commit
d0c32b8cf2
|
@ -47,6 +47,8 @@ enum wall_type_t : uint8_t
|
|||
WALL_CLOAKED = 7, // Can see it, and see through it
|
||||
#endif
|
||||
};
|
||||
|
||||
struct d_level_unique_wall_subsystem_state;
|
||||
}
|
||||
|
||||
namespace dcx {
|
||||
|
@ -127,7 +129,6 @@ constexpr std::integral_constant<wall_clip_flag_t, 4> WCF_TMAP1{}; //this
|
|||
constexpr std::integral_constant<wall_clip_flag_t, 8> WCF_HIDDEN{}; //this uses primary tmap, not tmap2
|
||||
}
|
||||
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
struct wall;
|
||||
struct wclip;
|
||||
|
@ -157,31 +158,18 @@ namespace dcx {
|
|||
DXX_VALPTRIDX_DEFINE_SUBTYPE_TYPEDEFS(active_door, actdoor);
|
||||
extern unsigned Num_wall_anims;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DXX_USE_EDITOR
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
void wall_init();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
||||
// Automatically checks if a there is a doorway (i.e. can fly through)
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
WALL_IS_DOORWAY_result_t WALL_IS_DOORWAY(const GameBitmaps_array &GameBitmaps, const Textures_array &Textures, fvcwallptr &vcwallptr, cscusegment seg, sidenum_t side);
|
||||
|
||||
// Deteriorate appearance of wall. (Changes bitmap (paste-ons))
|
||||
}
|
||||
#endif
|
||||
void wall_damage(vmsegptridx_t seg, sidenum_t side, fix damage);
|
||||
|
||||
// Destroys a blastable wall. (So it is an opening afterwards)
|
||||
void wall_destroy(vmsegptridx_t seg, sidenum_t side);
|
||||
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
|
||||
void wall_illusion_on(fvmwallptr &, vcsegptridx_t seg, sidenum_t side);
|
||||
|
@ -196,7 +184,6 @@ void wall_open_door(vmsegptridx_t seg, sidenum_t side);
|
|||
void wall_close_door(wall_array &Walls, vmsegptridx_t seg, sidenum_t side);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//return codes for wall_hit_process()
|
||||
enum class wall_hit_process_t : unsigned
|
||||
|
@ -209,9 +196,9 @@ enum class wall_hit_process_t : unsigned
|
|||
|
||||
// Determines what happens when a wall is shot
|
||||
//obj is the object that hit...either a weapon or the player himself
|
||||
#ifdef dsx
|
||||
class player_flags;
|
||||
namespace dsx {
|
||||
void wall_init(d_level_unique_wall_subsystem_state &LevelUniqueWallSubsystemState);
|
||||
wall_hit_process_t wall_hit_process(player_flags, vmsegptridx_t seg, sidenum_t side, fix damage, unsigned playernum, const object &obj);
|
||||
|
||||
// Opens/destroys specified door.
|
||||
|
@ -228,7 +215,6 @@ void wall_write(PHYSFS_File *fp, const wall &w, short version);
|
|||
|
||||
void wall_close_door_ref(fvmsegptridx &vmsegptridx, wall_array &Walls, const wall_animations_array &WallAnims, active_door &);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
//start wall open <-> closed transitions
|
||||
|
@ -241,7 +227,6 @@ void cloaking_wall_write(const cloaking_wall &cw, PHYSFS_File *fp);
|
|||
void blast_nearby_glass(const object &objp, fix damage);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void v16_wall_read(PHYSFS_File *fp, v16_wall &w);
|
||||
void v19_wall_read(PHYSFS_File *fp, v19_wall &w);
|
||||
|
|
|
@ -1646,9 +1646,7 @@ int create_new_mine(void)
|
|||
Groupside = {};
|
||||
|
||||
LevelSharedRobotcenterState.Num_robot_centers = 0;
|
||||
auto &ActiveDoors = LevelUniqueWallSubsystemState.ActiveDoors;
|
||||
ActiveDoors.set_count(0);
|
||||
wall_init();
|
||||
wall_init(LevelUniqueWallSubsystemState);
|
||||
auto &Triggers = LevelUniqueWallSubsystemState.Triggers;
|
||||
Triggers.set_count(0);
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ WALL_IS_DOORWAY_result_t WALL_IS_DOORWAY(const GameBitmaps_array &GameBitmaps, c
|
|||
#if DXX_USE_EDITOR
|
||||
//-----------------------------------------------------------------
|
||||
// Initializes all the walls (in other words, no special walls)
|
||||
void wall_init()
|
||||
void wall_init(d_level_unique_wall_subsystem_state &LevelUniqueWallSubsystemState)
|
||||
{
|
||||
init_exploding_walls();
|
||||
auto &Walls = LevelUniqueWallSubsystemState.Walls;
|
||||
|
|
Loading…
Reference in a new issue