- 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:
Braden Obrzut 2010-08-14 21:01:49 +00:00
parent 1fda9421ac
commit a0d16bc99a
2 changed files with 12 additions and 12 deletions

View file

@ -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())
outX = *x + (SCREENWIDTH/(hud_scale ? xScale*2 : 2));
if(relX)
outX = x + (SCREENWIDTH/(hud_scale ? xScale*2 : 2));
else
outX = *x;
if(y.RelCenter())
outY = *y + (SCREENHEIGHT/(hud_scale ? yScale*2 : 2));
outX = x;
if(relY)
outY = y + (SCREENHEIGHT/(hud_scale ? yScale*2 : 2));
else
outY = *y;
outY = y;
}
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 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.
// Translation: No high res.
@ -1343,7 +1343,7 @@ public:
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;
}
adjustRelCenter(x, y, ax, ay, xScale, yScale);
adjustRelCenter(x.RelCenter(), y.RelCenter(), *x, *y, ax, ay, xScale, yScale);
}
while(*str != '\0')
{

View file

@ -1325,8 +1325,8 @@ void P_LoadSubsectors (MapData * map)
if ((size_t)subsectors[i].firstline >= maxseg)
{
Printf ("Subsector %d contains invalid segs %u-%u\n"
"The BSP will be rebuilt.\n", i, (unsigned)subsectors[i].firstline,
(unsigned)subsectors[i].firstline + subsectors[i].numlines - 1);
"The BSP will be rebuilt.\n", i, (unsigned)((size_t)subsectors[i].firstline),
(unsigned)((size_t)subsectors[i].firstline) + subsectors[i].numlines - 1);
ForceNodeBuild = true;
delete[] nodes;
delete[] subsectors;
@ -1336,7 +1336,7 @@ void P_LoadSubsectors (MapData * map)
{
Printf ("Subsector %d contains invalid segs %u-%u\n"
"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;
delete[] nodes;
delete[] subsectors;