mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Fix a software mode crash bug involving bad animation flags set on tiles
git-svn-id: https://svn.eduke32.com/eduke32@5836 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d7d6623364
commit
3c34256867
2 changed files with 7 additions and 5 deletions
|
@ -63,6 +63,8 @@ void setpalookupaddress(char *paladdr) { ghlinepal = paladdr; }
|
|||
void setuphlineasm4(int32_t bxinc, int32_t byinc) { gbxinc = bxinc; gbyinc = byinc; }
|
||||
void hlineasm4(bssize_t cnt, int32_t skiploadincs, int32_t paloffs, uint32_t by, uint32_t bx, intptr_t p)
|
||||
{
|
||||
Bassert(gbuf);
|
||||
|
||||
if (!skiploadincs) { gbxinc = asm1; gbyinc = asm2; }
|
||||
|
||||
const char *const A_C_RESTRICT palptr = &ghlinepal[paloffs];
|
||||
|
@ -75,7 +77,7 @@ void hlineasm4(bssize_t cnt, int32_t skiploadincs, int32_t paloffs, uint32_t by,
|
|||
#ifdef CLASSIC_SLICE_BY_4
|
||||
for (; cnt>=4; cnt-=4, pp-=4)
|
||||
{
|
||||
#if 0
|
||||
#if 1
|
||||
*pp = palptr[buf[((bx>>log32.x)<<log.y)+(by>>log32.y)]];
|
||||
*(pp-1) = palptr[buf[(((bx-inc.x)>>log32.x)<<log.y)+((by-inc.y)>>log32.y)]];
|
||||
*(pp-2) = palptr[buf[(((bx-(inc.x<<1))>>log32.x)<<log.y)+((by-(inc.y<<1))>>log32.y)]];
|
||||
|
|
|
@ -2639,11 +2639,11 @@ static int32_t setup_globals_cf1(const usectortype *sec, int32_t pal, int32_t zd
|
|||
|
||||
globalpicnum = picnum;
|
||||
if ((unsigned)globalpicnum >= MAXTILES) globalpicnum = 0;
|
||||
DO_TILE_ANIM(globalpicnum, 0);
|
||||
setgotpic(globalpicnum);
|
||||
if ((tilesiz[globalpicnum].x <= 0) || (tilesiz[globalpicnum].y <= 0)) return 1;
|
||||
DO_TILE_ANIM(globalpicnum, 0);
|
||||
|
||||
if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
|
||||
|
||||
globalbufplc = waloff[globalpicnum];
|
||||
|
||||
globalshade = shade;
|
||||
|
@ -8699,9 +8699,9 @@ void drawmapview(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
|||
}
|
||||
globalpicnum = sec->floorpicnum;
|
||||
if ((unsigned)globalpicnum >= (unsigned)MAXTILES) globalpicnum = 0;
|
||||
DO_TILE_ANIM(globalpicnum, s);
|
||||
setgotpic(globalpicnum);
|
||||
if ((tilesiz[globalpicnum].x <= 0) || (tilesiz[globalpicnum].y <= 0)) continue;
|
||||
DO_TILE_ANIM(globalpicnum, s);
|
||||
if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
|
||||
globalbufplc = waloff[globalpicnum];
|
||||
globalshade = max(min(sec->floorshade,numshades-1),0);
|
||||
|
@ -8824,9 +8824,9 @@ void drawmapview(int32_t dax, int32_t day, int32_t zoome, int16_t ang)
|
|||
globalpicnum = spr->picnum;
|
||||
globalpal = spr->pal; // GL needs this, software doesn't
|
||||
if ((unsigned)globalpicnum >= (unsigned)MAXTILES) globalpicnum = 0;
|
||||
DO_TILE_ANIM(globalpicnum, s);
|
||||
setgotpic(globalpicnum);
|
||||
if ((tilesiz[globalpicnum].x <= 0) || (tilesiz[globalpicnum].y <= 0)) continue;
|
||||
DO_TILE_ANIM(globalpicnum, s);
|
||||
if (waloff[globalpicnum] == 0) loadtile(globalpicnum);
|
||||
globalbufplc = waloff[globalpicnum];
|
||||
|
||||
|
|
Loading…
Reference in a new issue