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) 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);