mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-03 10:41:24 +00:00
- added more Scale wrappers to spritetype.
This commit is contained in:
parent
8a8ef22e53
commit
1085752e01
2 changed files with 37 additions and 1 deletions
|
@ -480,6 +480,42 @@ struct spritetypebase
|
||||||
yrepeat = uint8_t(y * (1 / REPEAT_SCALE));
|
yrepeat = uint8_t(y * (1 / REPEAT_SCALE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetScaleX(double x)
|
||||||
|
{
|
||||||
|
xrepeat = uint8_t(x * (1 / REPEAT_SCALE));
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetScaleY(double y)
|
||||||
|
{
|
||||||
|
yrepeat = uint8_t(y * (1 / REPEAT_SCALE));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddScaleX(double x)
|
||||||
|
{
|
||||||
|
xrepeat += uint8_t(x * (1 / REPEAT_SCALE));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddScaleY(double y)
|
||||||
|
{
|
||||||
|
yrepeat += uint8_t(y * (1 / REPEAT_SCALE));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MultScaleX(double x)
|
||||||
|
{
|
||||||
|
xrepeat = uint8_t(xrepeat * x);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MultScaleY(double y)
|
||||||
|
{
|
||||||
|
yrepeat = uint8_t(yrepeat * y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CopyScale(spritetypebase* other)
|
||||||
|
{
|
||||||
|
xrepeat = other->xrepeat;
|
||||||
|
yrepeat = other->yrepeat;
|
||||||
|
}
|
||||||
|
|
||||||
double ScaleX() const
|
double ScaleX() const
|
||||||
{
|
{
|
||||||
return xrepeat * REPEAT_SCALE;
|
return xrepeat * REPEAT_SCALE;
|
||||||
|
|
|
@ -18319,7 +18319,7 @@ int DoFloorBlood(DSWActor* actor)
|
||||||
actor->spr.xrepeat++;
|
actor->spr.xrepeat++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->spr.yrepeat < ysiz && actor->spr.xrepeat != xsiz && actor->spr.xrepeat != 4)
|
if (actor->spr.yrepeat < ysiz && actor->spr.xrepeat < xsiz && actor->spr.xrepeat != 4)
|
||||||
{
|
{
|
||||||
actor->spr.yrepeat++;
|
actor->spr.yrepeat++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue