mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
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:
parent
2cc9f751cd
commit
e74f8cada1
4 changed files with 13 additions and 13 deletions
|
@ -708,7 +708,7 @@ void yax_tweakpicnums(int32_t bunchnum, int32_t cf, int32_t restore)
|
||||||
static uint8_t expect_restore[2][YAX_MAXBUNCHES];
|
static uint8_t expect_restore[2][YAX_MAXBUNCHES];
|
||||||
|
|
||||||
// must call this with restore == 0, 1, 0, 1, 0, 1, ...
|
// 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];
|
expect_restore[cf][bunchnum] = !expect_restore[cf][bunchnum];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2380,7 +2380,7 @@ void fade_screen_black(int32_t moreopaquep)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(!offscreenrendering);
|
Bassert(!offscreenrendering);
|
||||||
|
|
||||||
begindrawing();
|
begindrawing();
|
||||||
{
|
{
|
||||||
|
@ -7538,7 +7538,7 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum)
|
||||||
|
|
||||||
if (newspritenum >= 0)
|
if (newspritenum >= 0)
|
||||||
{
|
{
|
||||||
assert((unsigned)sectnum < MAXSECTORS);
|
Bassert((unsigned)sectnum < MAXSECTORS);
|
||||||
|
|
||||||
do_insertsprite_at_headofsect(newspritenum, sectnum);
|
do_insertsprite_at_headofsect(newspritenum, sectnum);
|
||||||
Numsprites++;
|
Numsprites++;
|
||||||
|
@ -7553,7 +7553,7 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum)
|
||||||
//
|
//
|
||||||
int32_t deletesprite(int16_t spritenum)
|
int32_t deletesprite(int16_t spritenum)
|
||||||
{
|
{
|
||||||
assert((sprite[spritenum].statnum == MAXSTATUS)
|
Bassert((sprite[spritenum].statnum == MAXSTATUS)
|
||||||
== (sprite[spritenum].sectnum == MAXSECTORS));
|
== (sprite[spritenum].sectnum == MAXSECTORS));
|
||||||
|
|
||||||
if (sprite[spritenum].statnum == MAXSTATUS)
|
if (sprite[spritenum].statnum == MAXSTATUS)
|
||||||
|
@ -9981,7 +9981,7 @@ int32_t saveboard(const char *filename, int32_t *daposx, int32_t *daposy, int32_
|
||||||
numsprites++;
|
numsprites++;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(numsprites == Numsprites);
|
Bassert(numsprites == Numsprites);
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
if (numyaxbunches > 0)
|
if (numyaxbunches > 0)
|
||||||
|
@ -13500,7 +13500,7 @@ void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags)
|
||||||
const uint8_t *dapal;
|
const uint8_t *dapal;
|
||||||
// uint32_t lastbright = curbrightness;
|
// uint32_t lastbright = curbrightness;
|
||||||
|
|
||||||
assert((flags&(1+4))==0);
|
Bassert((flags&(1+4))==0);
|
||||||
|
|
||||||
if (dapalid >= basepalcount)
|
if (dapalid >= basepalcount)
|
||||||
dapalid = 0;
|
dapalid = 0;
|
||||||
|
|
|
@ -611,12 +611,12 @@ int32_t map_undoredo(int32_t dir)
|
||||||
for (i=0; i<mapstate->num[2]; i++)
|
for (i=0; i<mapstate->num[2]; i++)
|
||||||
{
|
{
|
||||||
if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48;
|
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);
|
&& (unsigned)sprite[i].statnum < MAXSTATUS);
|
||||||
insertsprite(sprite[i].sectnum, sprite[i].statnum);
|
insertsprite(sprite[i].sectnum, sprite[i].statnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(Numsprites == mapstate->num[2]);
|
Bassert(Numsprites == mapstate->num[2]);
|
||||||
|
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
if (qsetmode == 200 && rendmode == 4)
|
if (qsetmode == 200 && rendmode == 4)
|
||||||
|
|
|
@ -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);
|
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);
|
i = sv_loadsnapshot(g_demo_recFilePtr, -g_whichDemo, &saveh);
|
||||||
if (i)
|
if (i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1076,7 +1076,7 @@ int32_t sv_saveandmakesnapshot(FILE *fil, int8_t spot, int8_t recdiffsp, int8_t
|
||||||
{
|
{
|
||||||
savehead_t h;
|
savehead_t h;
|
||||||
|
|
||||||
assert(sizeof(savehead_t) == 310);
|
Bassert(sizeof(savehead_t) == 310);
|
||||||
|
|
||||||
// set a few savegame system globals
|
// set a few savegame system globals
|
||||||
savegame_comprthres = SV_DEFAULTCOMPRTHRES;
|
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);
|
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))
|
if (kread(fil, h, sizeof(savehead_t)) != sizeof(savehead_t))
|
||||||
{
|
{
|
||||||
|
@ -1579,7 +1579,7 @@ static void sv_restsave()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert((savegame_restdata+SVARDATALEN)-mem >= 0);
|
Bassert((savegame_restdata+SVARDATALEN)-mem >= 0);
|
||||||
|
|
||||||
Bmemset(mem, 0, (savegame_restdata+SVARDATALEN)-mem);
|
Bmemset(mem, 0, (savegame_restdata+SVARDATALEN)-mem);
|
||||||
#undef CPDAT
|
#undef CPDAT
|
||||||
|
|
Loading…
Reference in a new issue