From 5653124a43f9de62e8cab83a8a198b8dd273cada Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 1 Feb 2020 22:33:31 +0000 Subject: [PATCH] Move MAX_VECS into morph_data --- common/main/morph.h | 6 ++++-- similar/main/morph.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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;