Hide inventory if selected. Clamp objective values to max.

This commit is contained in:
Steve 2018-02-14 07:13:28 +00:00
parent 69145189c9
commit dacb561e62
2 changed files with 6 additions and 2 deletions

View File

@ -69,7 +69,10 @@ void drawHud(void)
drawText(5, 80, 16, TA_LEFT, colors.white, "Weapon: %s", getWeaponName(world.bob->weaponType));
if (app.config.hudInventory)
{
drawInventory();
}
if (messageTime > 0)
{
@ -235,7 +238,7 @@ void drawMissionStatus(void)
}
drawText(x + 20, y, 24, TA_LEFT, c, o->description);
drawText(SCREEN_WIDTH / 2 + 100, y, 24, TA_LEFT, c, "%d / %d", o->currentValue, o->targetValue);
drawText(SCREEN_WIDTH / 2 + 100, y, 24, TA_LEFT, c, "%d / %d", MIN(o->currentValue, o->targetValue), o->targetValue);
drawText(x + w - 20, y, 24, TA_RIGHT, c, status);
y += 55;

View File

@ -31,6 +31,7 @@ extern Texture *getTexture(const char *filename);
extern SDL_Rect getCurrentFrame(Sprite *s);
extern int getPercent(float current, float total);
extern App app;
extern Dev dev;
extern Camera camera;
extern Colors colors;