mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- Fixed: The center flag for drawimage didn't work.
- Fixed: GCC didn't like casting from seg_t* to unsigned int on 64-bit systems. SVN r2542 (trunk)
This commit is contained in:
parent
1fda9421ac
commit
a0d16bc99a
2 changed files with 12 additions and 12 deletions
|
@ -933,16 +933,16 @@ void Popup::close()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
inline void adjustRelCenter(const SBarInfoCoordinate &x, const SBarInfoCoordinate &y, double &outX, double &outY, const double &xScale, const double &yScale)
|
inline void adjustRelCenter(bool relX, bool relY, const double &x, const double &y, double &outX, double &outY, const double &xScale, const double &yScale)
|
||||||
{
|
{
|
||||||
if(x.RelCenter())
|
if(relX)
|
||||||
outX = *x + (SCREENWIDTH/(hud_scale ? xScale*2 : 2));
|
outX = x + (SCREENWIDTH/(hud_scale ? xScale*2 : 2));
|
||||||
else
|
else
|
||||||
outX = *x;
|
outX = x;
|
||||||
if(y.RelCenter())
|
if(relY)
|
||||||
outY = *y + (SCREENHEIGHT/(hud_scale ? yScale*2 : 2));
|
outY = y + (SCREENHEIGHT/(hud_scale ? yScale*2 : 2));
|
||||||
else
|
else
|
||||||
outY = *y;
|
outY = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DSBarInfo : public DBaseStatusBar
|
class DSBarInfo : public DBaseStatusBar
|
||||||
|
@ -1227,7 +1227,7 @@ public:
|
||||||
double xScale = !hud_scale ? 1.0 : (double) CleanXfac*320.0/(double) script->resW;//(double) SCREENWIDTH/(double) script->resW;
|
double xScale = !hud_scale ? 1.0 : (double) CleanXfac*320.0/(double) script->resW;//(double) SCREENWIDTH/(double) script->resW;
|
||||||
double yScale = !hud_scale ? 1.0 : (double) CleanYfac*200.0/(double) script->resH;//(double) SCREENHEIGHT/(double) script->resH;
|
double yScale = !hud_scale ? 1.0 : (double) CleanYfac*200.0/(double) script->resH;//(double) SCREENHEIGHT/(double) script->resH;
|
||||||
|
|
||||||
adjustRelCenter(x, y, rx, ry, xScale, yScale);
|
adjustRelCenter(x.RelCenter(), y.RelCenter(), dx, dy, rx, ry, xScale, yScale);
|
||||||
|
|
||||||
// We can't use DTA_HUDRules since it forces a width and height.
|
// We can't use DTA_HUDRules since it forces a width and height.
|
||||||
// Translation: No high res.
|
// Translation: No high res.
|
||||||
|
@ -1343,7 +1343,7 @@ public:
|
||||||
xScale = (double) CleanXfac*320.0/(double) script->resW;//(double) SCREENWIDTH/(double) script->resW;
|
xScale = (double) CleanXfac*320.0/(double) script->resW;//(double) SCREENWIDTH/(double) script->resW;
|
||||||
yScale = (double) CleanYfac*200.0/(double) script->resH;//(double) SCREENWIDTH/(double) script->resW;
|
yScale = (double) CleanYfac*200.0/(double) script->resH;//(double) SCREENWIDTH/(double) script->resW;
|
||||||
}
|
}
|
||||||
adjustRelCenter(x, y, ax, ay, xScale, yScale);
|
adjustRelCenter(x.RelCenter(), y.RelCenter(), *x, *y, ax, ay, xScale, yScale);
|
||||||
}
|
}
|
||||||
while(*str != '\0')
|
while(*str != '\0')
|
||||||
{
|
{
|
||||||
|
|
|
@ -1325,8 +1325,8 @@ void P_LoadSubsectors (MapData * map)
|
||||||
if ((size_t)subsectors[i].firstline >= maxseg)
|
if ((size_t)subsectors[i].firstline >= maxseg)
|
||||||
{
|
{
|
||||||
Printf ("Subsector %d contains invalid segs %u-%u\n"
|
Printf ("Subsector %d contains invalid segs %u-%u\n"
|
||||||
"The BSP will be rebuilt.\n", i, (unsigned)subsectors[i].firstline,
|
"The BSP will be rebuilt.\n", i, (unsigned)((size_t)subsectors[i].firstline),
|
||||||
(unsigned)subsectors[i].firstline + subsectors[i].numlines - 1);
|
(unsigned)((size_t)subsectors[i].firstline) + subsectors[i].numlines - 1);
|
||||||
ForceNodeBuild = true;
|
ForceNodeBuild = true;
|
||||||
delete[] nodes;
|
delete[] nodes;
|
||||||
delete[] subsectors;
|
delete[] subsectors;
|
||||||
|
@ -1336,7 +1336,7 @@ void P_LoadSubsectors (MapData * map)
|
||||||
{
|
{
|
||||||
Printf ("Subsector %d contains invalid segs %u-%u\n"
|
Printf ("Subsector %d contains invalid segs %u-%u\n"
|
||||||
"The BSP will be rebuilt.\n", i, maxseg,
|
"The BSP will be rebuilt.\n", i, maxseg,
|
||||||
(unsigned)subsectors[i].firstline + subsectors[i].numlines - 1);
|
(unsigned)((size_t)subsectors[i].firstline) + subsectors[i].numlines - 1);
|
||||||
ForceNodeBuild = true;
|
ForceNodeBuild = true;
|
||||||
delete[] nodes;
|
delete[] nodes;
|
||||||
delete[] subsectors;
|
delete[] subsectors;
|
||||||
|
|
Loading…
Reference in a new issue