diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index dc04f4e64..90939b403 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -117,11 +117,13 @@ VIEW predictFifo[256]; int gInterpolate; int nInterpolations; -char gInterpolateSprite[512]; -char gInterpolateWall[1024]; -char gInterpolateSector[128]; +char gInterpolateSprite[(kMaxSprites+7)>>3]; +char gInterpolateWall[(kMaxWalls+7)>>3]; +char gInterpolateSector[(kMaxSectors+7)>>3]; -INTERPOLATE gInterpolation[4096]; +#define kMaxInterpolations 16384 + +INTERPOLATE gInterpolation[kMaxInterpolations]; int gViewXCenter, gViewYCenter; int gViewX0, gViewY0, gViewX1, gViewY1; @@ -903,7 +905,7 @@ void viewClearInterpolations(void) void viewAddInterpolation(void *data, INTERPOLATE_TYPE type) { - if (nInterpolations == 4096) + if (nInterpolations == kMaxInterpolations) ThrowError("Too many interpolations"); INTERPOLATE *pInterpolate = &gInterpolation[nInterpolations++]; pInterpolate->pointer = data; diff --git a/source/blood/src/view.h b/source/blood/src/view.h index ceb4e1c95..0e6117063 100644 --- a/source/blood/src/view.h +++ b/source/blood/src/view.h @@ -84,9 +84,9 @@ extern int gScreenTilt; extern int deliriumTilt, deliriumTurn, deliriumPitch; extern int gScreenTiltO, deliriumTurnO, deliriumPitchO; extern int gShowFrameRate; -extern char gInterpolateSprite[512]; -extern char gInterpolateWall[1024]; -extern char gInterpolateSector[128]; +extern char gInterpolateSprite[]; +extern char gInterpolateWall[]; +extern char gInterpolateSector[]; extern LOCATION gPrevSpriteLoc[kMaxSprites]; extern int gViewSize; extern CGameMessageMgr gGameMessageMgr;