Replace all occurences of assert in our code with Bassert.

git-svn-id: https://svn.eduke32.com/eduke32@2547 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-26 22:04:44 +00:00
parent 2cc9f751cd
commit e74f8cada1
4 changed files with 13 additions and 13 deletions

View file

@ -708,7 +708,7 @@ void yax_tweakpicnums(int32_t bunchnum, int32_t cf, int32_t restore)
static uint8_t expect_restore[2][YAX_MAXBUNCHES];
// must call this with restore == 0, 1, 0, 1, 0, 1, ...
assert(expect_restore[cf][bunchnum] == restore);
Bassert(expect_restore[cf][bunchnum] == restore);
expect_restore[cf][bunchnum] = !expect_restore[cf][bunchnum];
#endif
@ -2380,7 +2380,7 @@ void fade_screen_black(int32_t moreopaquep)
}
else
{
assert(!offscreenrendering);
Bassert(!offscreenrendering);
begindrawing();
{
@ -7538,7 +7538,7 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum)
if (newspritenum >= 0)
{
assert((unsigned)sectnum < MAXSECTORS);
Bassert((unsigned)sectnum < MAXSECTORS);
do_insertsprite_at_headofsect(newspritenum, sectnum);
Numsprites++;
@ -7553,8 +7553,8 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum)
//
int32_t deletesprite(int16_t spritenum)
{
assert((sprite[spritenum].statnum == MAXSTATUS)
== (sprite[spritenum].sectnum == MAXSECTORS));
Bassert((sprite[spritenum].statnum == MAXSTATUS)
== (sprite[spritenum].sectnum == MAXSECTORS));
if (sprite[spritenum].statnum == MAXSTATUS)
return(-1); // already not in the world
@ -9981,7 +9981,7 @@ int32_t saveboard(const char *filename, int32_t *daposx, int32_t *daposy, int32_
numsprites++;
}
assert(numsprites == Numsprites);
Bassert(numsprites == Numsprites);
#ifdef YAX_ENABLE
if (numyaxbunches > 0)
@ -13500,7 +13500,7 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags)
const uint8_t *dapal;
// uint32_t lastbright = curbrightness;
assert((flags&(1+4))==0);
Bassert((flags&(1+4))==0);
if (dapalid >= basepalcount)
dapalid = 0;

View file

@ -611,12 +611,12 @@ int32_t map_undoredo(int32_t dir)
for (i=0; i<mapstate->num[2]; i++)
{
if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48;
assert((unsigned)sprite[i].sectnum < (unsigned)numsectors
Bassert((unsigned)sprite[i].sectnum < (unsigned)numsectors
&& (unsigned)sprite[i].statnum < MAXSTATUS);
insertsprite(sprite[i].sectnum, sprite[i].statnum);
}
assert(Numsprites == mapstate->num[2]);
Bassert(Numsprites == mapstate->num[2]);
#ifdef POLYMER
if (qsetmode == 200 && rendmode == 4)

View file

@ -90,7 +90,7 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine
}
else if ((g_demo_recFilePtr = kopen4loadfrommod(d,g_loadFromGroupOnly)) == -1) return(0);
assert(g_whichDemo >= 1);
Bassert(g_whichDemo >= 1);
i = sv_loadsnapshot(g_demo_recFilePtr, -g_whichDemo, &saveh);
if (i)
{

View file

@ -1076,7 +1076,7 @@ int32_t sv_saveandmakesnapshot(FILE *fil, int8_t spot, int8_t recdiffsp, int8_t
{
savehead_t h;
assert(sizeof(savehead_t) == 310);
Bassert(sizeof(savehead_t) == 310);
// set a few savegame system globals
savegame_comprthres = SV_DEFAULTCOMPRTHRES;
@ -1186,7 +1186,7 @@ int32_t sv_loadheader(int32_t fil, int32_t spot, savehead_t *h)
{
int32_t havedemo = (spot < 0);
assert(sizeof(savehead_t) == 310);
Bassert(sizeof(savehead_t) == 310);
if (kread(fil, h, sizeof(savehead_t)) != sizeof(savehead_t))
{
@ -1579,7 +1579,7 @@ static void sv_restsave()
}
#endif
assert((savegame_restdata+SVARDATALEN)-mem >= 0);
Bassert((savegame_restdata+SVARDATALEN)-mem >= 0);
Bmemset(mem, 0, (savegame_restdata+SVARDATALEN)-mem);
#undef CPDAT