diff --git a/common/main/morph.h b/common/main/morph.h index 1585b2f36..38b466bb0 100644 --- a/common/main/morph.h +++ b/common/main/morph.h @@ -34,8 +34,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "dsx-ns.h" #include "compiler-array.h" -#define MAX_VECS 5000 - #ifdef dsx #include "object.h" @@ -43,6 +41,10 @@ namespace dsx { struct morph_data : prohibit_void_ptr { + enum + { + MAX_VECS = 5000, + }; object *obj; // object which is morphing int n_submodels_active; uint8_t morph_save_control_type; diff --git a/similar/main/morph.cpp b/similar/main/morph.cpp index c1e45005b..ea840edc8 100644 --- a/similar/main/morph.cpp +++ b/similar/main/morph.cpp @@ -145,7 +145,7 @@ static void init_points(polymodel *pm,const vms_vector *box_size,int submodel_nu else i = 0; //start at zero - Assert(i+nverts < MAX_VECS); + assert(i + nverts < morph_data::MAX_VECS); md->submodel_startpoints[submodel_num] = i;