mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Make cutscene "aspect" def token work with ANMs too.
Patch from Fox. git-svn-id: https://svn.eduke32.com/eduke32@6586 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
85d0a3c520
commit
1031f2dec0
1 changed files with 21 additions and 1 deletions
|
@ -515,7 +515,27 @@ int32_t Anim_Play(const char *fn)
|
|||
|
||||
clearallviews(0);
|
||||
|
||||
rotatesprite_fs(0 << 16, 0 << 16, 65536L, 512, TILE_ANIM, 0, 0, 2 + 4 + 8 + 16 + 64 + BGSTRETCH);
|
||||
int32_t z;
|
||||
if (anim->frameaspect1 > 0 && anim->frameaspect2 > 0 && ((anim->frameaspect1 / anim->frameaspect2) != (tilesiz[TILE_ANIM].y / (tilesiz[TILE_ANIM].x * 1.2))))
|
||||
{
|
||||
int32_t const oyxaspect = yxaspect;
|
||||
if ((anim->frameaspect1 / anim->frameaspect2) >= ((decltype(anim->frameaspect1))xdim / ydim))
|
||||
z = divscale16(320, tilesiz[TILE_ANIM].y);
|
||||
else
|
||||
z = divscale16(lrint(320 * ydim * anim->frameaspect1), lrint(tilesiz[TILE_ANIM].y * xdim * anim->frameaspect2));
|
||||
int32_t aspect = divscale16(lrint(tilesiz[TILE_ANIM].y * anim->frameaspect2), lrint(tilesiz[TILE_ANIM].x * anim->frameaspect1));
|
||||
setaspect(viewingrange, aspect);
|
||||
rotatesprite_fs(160<<16, 100<<16, z, 512, TILE_ANIM, 0, 0, 2|4|8|64|1024);
|
||||
setaspect(viewingrange, oyxaspect);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((tilesiz[TILE_ANIM].y / (tilesiz[TILE_ANIM].x * 1.2f)) > (1.f * xdim / ydim))
|
||||
z = divscale16(320 * xdim * 3, tilesiz[TILE_ANIM].y * ydim * 4);
|
||||
else
|
||||
z = divscale16(200, tilesiz[TILE_ANIM].x);
|
||||
rotatesprite_fs(160<<16, 100<<16, z, 512, TILE_ANIM, 0, 0, 2|4|8|64);
|
||||
}
|
||||
|
||||
g_animPtr = anim;
|
||||
i = VM_OnEventWithReturn(EVENT_CUTSCENE, g_player[screenpeek].ps->i, screenpeek, i);
|
||||
|
|
Loading…
Reference in a new issue