mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
- Fixed: DrawBar's clipping didn't take the texture offset into account.
SVN r4056 (trunk)
This commit is contained in:
parent
61322cc33b
commit
b958215b50
1 changed files with 6 additions and 6 deletions
|
@ -1203,8 +1203,8 @@ public:
|
||||||
h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight;
|
h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight;
|
||||||
double dcx = cx == 0 ? 0 : dx + ((double) cx / FRACUNIT) - texture->GetScaledLeftOffsetDouble();
|
double dcx = cx == 0 ? 0 : dx + ((double) cx / FRACUNIT) - texture->GetScaledLeftOffsetDouble();
|
||||||
double dcy = cy == 0 ? 0 : dy + ((double) cy / FRACUNIT) - texture->GetScaledTopOffsetDouble();
|
double dcy = cy == 0 ? 0 : dy + ((double) cy / FRACUNIT) - texture->GetScaledTopOffsetDouble();
|
||||||
double dcr = cr == 0 ? INT_MAX : dx + w - ((double) cr / FRACUNIT);
|
double dcr = cr == 0 ? INT_MAX : dx + w - ((double) cr / FRACUNIT) - texture->GetScaledLeftOffsetDouble();
|
||||||
double dcb = cb == 0 ? INT_MAX : dy + h - ((double) cb / FRACUNIT);
|
double dcb = cb == 0 ? INT_MAX : dy + h - ((double) cb / FRACUNIT) - texture->GetScaledTopOffsetDouble();
|
||||||
|
|
||||||
if(Scaled)
|
if(Scaled)
|
||||||
{
|
{
|
||||||
|
@ -1292,10 +1292,10 @@ public:
|
||||||
// Check for clipping
|
// Check for clipping
|
||||||
if(cx != 0 || cy != 0 || cr != 0 || cb != 0)
|
if(cx != 0 || cy != 0 || cr != 0 || cb != 0)
|
||||||
{
|
{
|
||||||
rcx = cx == 0 ? 0 : rx+(((double) cx/FRACUNIT)*xScale);
|
rcx = cx == 0 ? 0 : rx+(((double) cx/FRACUNIT)*xScale) - texture->GetScaledLeftOffsetDouble();
|
||||||
rcy = cy == 0 ? 0 : ry+(((double) cy/FRACUNIT)*yScale);
|
rcy = cy == 0 ? 0 : ry+(((double) cy/FRACUNIT)*yScale) - texture->GetScaledTopOffsetDouble();
|
||||||
rcr = cr == 0 ? INT_MAX : rx+w-(((double) cr/FRACUNIT)*xScale);
|
rcr = cr == 0 ? INT_MAX : rx+w-(((double) cr/FRACUNIT)*xScale) - texture->GetScaledLeftOffsetDouble();
|
||||||
rcb = cb == 0 ? INT_MAX : ry+h-(((double) cb/FRACUNIT)*yScale);
|
rcb = cb == 0 ? INT_MAX : ry+h-(((double) cb/FRACUNIT)*yScale) - texture->GetScaledTopOffsetDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(clearDontDraw)
|
if(clearDontDraw)
|
||||||
|
|
Loading…
Reference in a new issue