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;
|
||||||
|
|
||||||
d = 40;
|
if (rw > 40 || rh > 40)
|
||||||
d /= (rw > rh) ? rw : rh;
|
{
|
||||||
|
d = 40;
|
||||||
rw *= d;
|
d /= (rw > rh) ? rw : rh;
|
||||||
rh *= d;
|
|
||||||
|
rw *= 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