mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Started work on making HWR_DrawFill support V_NOSCALESTART properly ...so far I've got the console text select highlight in the right place outside of 320x200 (and 320x200 is still fine), but for whatever reason it's too large in width and height
Oh well, we're part of the way there, anyway
This commit is contained in:
parent
2569a1eda6
commit
0726dbe018
1 changed files with 13 additions and 4 deletions
|
@ -656,6 +656,7 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
{
|
||||
FOutVector v[4];
|
||||
FSurfaceInfo Surf;
|
||||
float sdupx, sdupy, pdupx, pdupy;
|
||||
|
||||
if (w < 0 || h < 0)
|
||||
return; // consistency w/ software
|
||||
|
@ -664,10 +665,18 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
|
|||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
v[0].x = v[3].x = (x - 160.0f)/160.0f;
|
||||
v[2].x = v[1].x = ((x+w) - 160.0f)/160.0f;
|
||||
v[0].y = v[1].y = -(y - 100.0f)/100.0f;
|
||||
v[2].y = v[3].y = -((y+h) - 100.0f)/100.0f;
|
||||
sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
|
||||
if (color & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (x*sdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx + w*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy + h*pdupy)/vid.height;
|
||||
|
||||
//Hurdler: do we still use this argb color? if not, we should remove it
|
||||
v[0].argb = v[1].argb = v[2].argb = v[3].argb = 0xff00ff00; //;
|
||||
|
|
Loading…
Reference in a new issue