From fd2c8df74efb44b5c6d270ee69652c663df8dc60 Mon Sep 17 00:00:00 2001 From: Kp Date: Wed, 18 Jan 2017 03:06:02 +0000 Subject: [PATCH] Raise MAX_WALLS to 255 Raise D2 MAX_WALLS to 255, since Walls[254] is not special. Synchronize D1 MAX_WALLS to D2 MAX_WALLS to fix D1 Level of the World BRDECON. Requested-by: Ryusei117 --- common/main/fwd-wall.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/main/fwd-wall.h b/common/main/fwd-wall.h index a6cd91b9d..68c7579db 100644 --- a/common/main/fwd-wall.h +++ b/common/main/fwd-wall.h @@ -17,6 +17,7 @@ namespace dcx { using actdoornum_t = uint8_t; +constexpr unsigned MAX_WALLS = 255; // Maximum number of walls constexpr std::integral_constant MAX_DOORS{}; // Maximum number of open doors struct active_door; } @@ -27,10 +28,8 @@ DXX_VALPTRIDX_DECLARE_SUBTYPE(active_door, actdoornum_t, MAX_DOORS); #ifdef dsx namespace dsx { #if defined(DXX_BUILD_DESCENT_I) -constexpr unsigned MAX_WALLS = 175; // Maximum number of walls constexpr std::size_t MAX_WALL_ANIMS = 30; // Maximum different types of doors #elif defined(DXX_BUILD_DESCENT_II) -constexpr unsigned MAX_WALLS = 254; // Maximum number of walls constexpr std::size_t MAX_WALL_ANIMS = 60; // Maximum different types of doors #endif @@ -198,7 +197,7 @@ DXX_VALPTRIDX_DECLARE_GLOBAL_SUBTYPE(cloaking_wall, clwall, CloakingWalls); } #endif -DXX_VALPTRIDX_DECLARE_SUBTYPE(dsx::wall, wallnum_t, dsx::MAX_WALLS); +DXX_VALPTRIDX_DECLARE_SUBTYPE(dsx::wall, wallnum_t, dcx::MAX_WALLS); namespace dsx { DXX_VALPTRIDX_DECLARE_GLOBAL_SUBTYPE(wall, wall, Walls); extern array WallAnims;