mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Sanitize walock[] usage
git-svn-id: https://svn.eduke32.com/eduke32@7875 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2a3c80f95d
commit
9c5db5aac0
4 changed files with 14 additions and 11 deletions
|
@ -432,15 +432,11 @@ int32_t Anim_Play(const char *fn)
|
||||||
goto end_anim;
|
goto end_anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
walock[TILE_ANIM] = 219;
|
anim->animlock = 255;
|
||||||
anim->animlock = 1;
|
|
||||||
|
|
||||||
if (!anim->animbuf)
|
if (!anim->animbuf)
|
||||||
cacheAllocateBlock((intptr_t *)&anim->animbuf, length + 1, &anim->animlock);
|
cacheAllocateBlock((intptr_t *)&anim->animbuf, length + 1, &anim->animlock);
|
||||||
|
|
||||||
tilesiz[TILE_ANIM].x = 200;
|
|
||||||
tilesiz[TILE_ANIM].y = 320;
|
|
||||||
|
|
||||||
kread(handle, anim->animbuf, length);
|
kread(handle, anim->animbuf, length);
|
||||||
kclose(handle);
|
kclose(handle);
|
||||||
|
|
||||||
|
@ -499,7 +495,9 @@ int32_t Anim_Play(const char *fn)
|
||||||
|
|
||||||
i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, g_player[screenpeek].ps->i, screenpeek, i);
|
i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, g_player[screenpeek].ps->i, screenpeek, i);
|
||||||
|
|
||||||
|
walock[TILE_ANIM] = 255;
|
||||||
waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i);
|
waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i);
|
||||||
|
tileSetSize(TILE_ANIM, 200, 320);
|
||||||
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
||||||
|
|
||||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_CheckAllInput()))
|
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_CheckAllInput()))
|
||||||
|
@ -572,8 +570,13 @@ end_anim_restore_gl:
|
||||||
end_anim:
|
end_anim:
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
ANIM_FreeAnim();
|
ANIM_FreeAnim();
|
||||||
walock[TILE_ANIM] = 1;
|
|
||||||
anim->animlock = 0;
|
tileSetSize(TILE_ANIM, 0, 0);
|
||||||
|
walock[TILE_ANIM] = 0;
|
||||||
|
waloff[TILE_ANIM] = 0;
|
||||||
|
|
||||||
|
// this is the lock for anim->animbuf
|
||||||
|
anim->animlock = 1;
|
||||||
|
|
||||||
return !running;
|
return !running;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1154,7 +1154,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
|
||||||
tiltZoom >>= tiltcs; // JBF 20030807
|
tiltZoom >>= tiltcs; // JBF 20030807
|
||||||
|
|
||||||
rotatesprite_win(160 << 16, 100 << 16, tiltZoom, tang + 512, TILE_TILT, 0, 0, 4 + 2 + 64 + 1024);
|
rotatesprite_win(160 << 16, 100 << 16, tiltZoom, tang + 512, TILE_TILT, 0, 0, 4 + 2 + 64 + 1024);
|
||||||
walock[TILE_TILT] = 199;
|
walock[TILE_TILT] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3863,7 +3863,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
||||||
t->xrepeat += 10;
|
t->xrepeat += 10;
|
||||||
t->yrepeat += 9;
|
t->yrepeat += 9;
|
||||||
}
|
}
|
||||||
else if (g_curViewscreen == i && display_mirror != 3 && waloff[viewscrTile] && walock[viewscrTile] > 200)
|
else if (g_curViewscreen == i && display_mirror != 3 && waloff[viewscrTile])
|
||||||
{
|
{
|
||||||
// this exposes a sprite sorting issue which needs to be debugged further...
|
// this exposes a sprite sorting issue which needs to be debugged further...
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -4322,7 +4322,7 @@ void Menu_Close(uint8_t playerID)
|
||||||
actor[g_curViewscreen].t_data[0] = totalclock;
|
actor[g_curViewscreen].t_data[0] = totalclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
walock[TILE_SAVESHOT] = 199;
|
walock[TILE_SAVESHOT] = 1;
|
||||||
G_UpdateScreenArea();
|
G_UpdateScreenArea();
|
||||||
S_PauseSounds(false);
|
S_PauseSounds(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,7 +434,7 @@ void G_AnimateCamSprite(int smoothRatio)
|
||||||
if (waloff[viewscrTile] == 0)
|
if (waloff[viewscrTile] == 0)
|
||||||
tileCreate(viewscrTile, tilesiz[PN(spriteNum)].x << viewscrShift, tilesiz[PN(spriteNum)].y << viewscrShift);
|
tileCreate(viewscrTile, tilesiz[PN(spriteNum)].x << viewscrShift, tilesiz[PN(spriteNum)].y << viewscrShift);
|
||||||
else
|
else
|
||||||
walock[viewscrTile] = 255;
|
walock[viewscrTile] = 199;
|
||||||
|
|
||||||
G_SetupCamTile(OW(spriteNum), viewscrTile, smoothRatio);
|
G_SetupCamTile(OW(spriteNum), viewscrTile, smoothRatio);
|
||||||
#ifdef POLYMER
|
#ifdef POLYMER
|
||||||
|
|
Loading…
Reference in a new issue