Don't scale items in inventory screen if <= 40px.
This commit is contained in:
parent
af35c426e9
commit
3a88c5163a
|
@ -312,14 +312,18 @@ void drawMissionStatus(void)
|
||||||
if (world.bob->items[i] != NULL)
|
if (world.bob->items[i] != NULL)
|
||||||
{
|
{
|
||||||
r = getCurrentFrame(world.bob->items[i]->sprite[0]);
|
r = getCurrentFrame(world.bob->items[i]->sprite[0]);
|
||||||
|
|
||||||
rw = r->w;
|
rw = r->w;
|
||||||
rh = r->h;
|
rh = r->h;
|
||||||
|
|
||||||
|
if (rw > 40 || rh > 40)
|
||||||
|
{
|
||||||
d = 40;
|
d = 40;
|
||||||
d /= (rw > rh) ? rw : rh;
|
d /= (rw > rh) ? rw : rh;
|
||||||
|
|
||||||
rw *= d;
|
rw *= d;
|
||||||
rh *= d;
|
rh *= d;
|
||||||
|
}
|
||||||
|
|
||||||
blitRectScaled(atlasTexture->texture, x + mid, y + mid, rw, rh, r, 1);
|
blitRectScaled(atlasTexture->texture, x + mid, y + mid, rw, rh, r, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue