Don't scale items in inventory screen if <= 40px.

This commit is contained in:
Steve 2018-03-04 21:40:44 +00:00
parent af35c426e9
commit 3a88c5163a
1 changed files with 9 additions and 5 deletions

View File

@ -312,14 +312,18 @@ void drawMissionStatus(void)
if (world.bob->items[i] != NULL)
{
r = getCurrentFrame(world.bob->items[i]->sprite[0]);
rw = r->w;
rh = r->h;
d = 40;
d /= (rw > rh) ? rw : rh;
rw *= d;
rh *= d;
if (rw > 40 || rh > 40)
{
d = 40;
d /= (rw > rh) ? rw : rh;
rw *= d;
rh *= d;
}
blitRectScaled(atlasTexture->texture, x + mid, y + mid, rw, rh, r, 1);