Fix another bunch of improperly sized bitmap arrays

git-svn-id: https://svn.eduke32.com/eduke32@7806 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
This commit is contained in:
terminx 2019-07-19 01:49:19 +00:00 committed by Christoph Oelckers
parent 3d63d1b720
commit 97390c1ff4
5 changed files with 8 additions and 8 deletions

View file

@ -6,7 +6,7 @@
#define FASTPALRGBDIST (FASTPALCOLDEPTH*2+1)
static int32_t rdist[FASTPALRGBDIST], gdist[FASTPALRGBDIST], bdist[FASTPALRGBDIST];
#define FASTPALGRIDSIZ (FASTPALCOLDEPTH>>FASTPALRIGHTSHIFT)
static char colhere[((FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2))>>3];
static char colhere[((FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2)+7)>>3];
static char colhead[(FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2)*(FASTPALGRIDSIZ+2)];
static int32_t colnext[256];
#define FASTPALCOLDIST (1<<FASTPALRIGHTSHIFT)

View file

@ -1356,7 +1356,7 @@ static int32_t defsparser(scriptfile *script)
char *modelend, *modelfn;
double scale=1.0, mzadd=0.0, myoffset=0.0;
int32_t shadeoffs=0, pal=0, flags=0;
uint8_t usedframebitmap[1024>>3];
uint8_t usedframebitmap[(1024+7)>>3];
int32_t model_ok = 1;

View file

@ -516,10 +516,10 @@ void yax_update(int32_t resetstat)
{
// make bunchnums consecutive
uint8_t *const havebunch = (uint8_t *)tempbuf;
uint8_t *const bunchmap = havebunch + (YAX_MAXBUNCHES>>3);
uint8_t *const bunchmap = havebunch + ((YAX_MAXBUNCHES+7)>>3);
int32_t dasub = 0;
Bmemset(havebunch, 0, YAX_MAXBUNCHES>>3);
Bmemset(havebunch, 0, (YAX_MAXBUNCHES+7)>>3);
for (i=0; i<numsectors; i++)
{
yax_getbunches(i, &cb, &fb);
@ -647,7 +647,7 @@ static int16_t bunchsec[YAX_MAXBUNCHES], bunchdist[YAX_MAXBUNCHES];
static int32_t ymostallocsize = 0; // numyaxbunches*xdimen (no sizeof(int16_t) here!)
static int16_t *yumost=NULL, *ydmost=NULL; // used as if [numyaxbunches][xdimen]
uint8_t haveymost[YAX_MAXBUNCHES>>3];
uint8_t haveymost[(YAX_MAXBUNCHES+7)>>3];
static inline int32_t yax_walldist(int32_t w)
{
@ -864,7 +864,7 @@ void yax_preparedrawrooms(void)
void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
int16_t sectnum, int32_t didmirror, int32_t smoothr)
{
static uint8_t havebunch[YAX_MAXBUNCHES>>3];
static uint8_t havebunch[(YAX_MAXBUNCHES+7)>>3];
const fix16_t horiz = global100horiz;

View file

@ -305,7 +305,7 @@ int32_t renderAddTsprite(int16_t z, int16_t sectnum);
extern int32_t g_nodraw, scansector_retfast, scansector_collectsprites;
extern int32_t yax_globallev, yax_globalbunch;
extern int32_t yax_globalcf, yax_nomaskpass, yax_nomaskdidit;
extern uint8_t haveymost[YAX_MAXBUNCHES>>3];
extern uint8_t haveymost[(YAX_MAXBUNCHES+7)>>3];
extern uint8_t yax_gotsector[(MAXSECTORS+7)>>3];
extern int32_t yax_polymostclearzbuffer;

View file

@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# include "lunatic_game.h"
#endif
static uint8_t precachehightile[2][MAXTILES>>3];
static uint8_t precachehightile[2][(MAXTILES+7)>>3];
static int32_t g_precacheCount;