mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
- fixed: fullscreen images with texture scaling used the unscaled size for
positioning. To avoid future problems with them I added a new DTA_Fullscreen option for DrawTexture. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@625 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
65312800bb
commit
6cc96afdd5
6 changed files with 55 additions and 29 deletions
|
@ -595,8 +595,8 @@ void WI_updateAnimatedBack()
|
|||
void WI_drawBackground()
|
||||
{
|
||||
unsigned int i;
|
||||
int animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
||||
int animheight=200;
|
||||
double animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
||||
double animheight=200;
|
||||
|
||||
if (background)
|
||||
{
|
||||
|
@ -606,11 +606,10 @@ void WI_drawBackground()
|
|||
// scale all animations below to fit the size of the base pic
|
||||
// The base pic is always scaled to fit the screen so this allows
|
||||
// placing the animations precisely where they belong on the base pic
|
||||
animwidth = background->GetWidth();
|
||||
animheight = background->GetHeight();
|
||||
animwidth = background->GetScaledWidth();
|
||||
animheight = background->GetScaledHeight();
|
||||
screen->FillBorder (NULL);
|
||||
screen->DrawTexture(background, 0, 0, DTA_VirtualWidth, animwidth,
|
||||
DTA_VirtualHeight, animheight, TAG_DONE);
|
||||
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -666,7 +665,7 @@ void WI_drawBackground()
|
|||
}
|
||||
if (a->ctr >= 0)
|
||||
screen->DrawTexture(a->p[a->ctr], a->loc.x, a->loc.y,
|
||||
DTA_VirtualWidth, animwidth, DTA_VirtualHeight, animheight, TAG_DONE);
|
||||
DTA_VirtualWidthF, animwidth, DTA_VirtualHeightF, animheight, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue