Show common fighter information in database.

This commit is contained in:
Steve 2017-08-12 11:56:36 +01:00
parent bb095034fc
commit ae5c56d791
3 changed files with 14 additions and 4 deletions

View File

@ -295,7 +295,7 @@
{ {
"id" : "FREQUENT_FLYER", "id" : "FREQUENT_FLYER",
"title" : "Frequent flyer", "title" : "Frequent flyer",
"description" : "Destroy one of each common type of starfighter", "description" : "Destroy one of each type of common starfighter",
"value" : "TROPHY_SILVER" "value" : "TROPHY_SILVER"
}, },
{ {

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TBFTSS: The Pandoran War\n" "Project-Id-Version: TBFTSS: The Pandoran War\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-12 08:33:27+0100\n" "POT-Creation-Date: 2017-08-12 11:56:12+0100\n"
"PO-Revision-Date: ???\n" "PO-Revision-Date: ???\n"
"Last-Translator: ???\n" "Last-Translator: ???\n"
"Language-Team: ???\n" "Language-Team: ???\n"
@ -295,6 +295,9 @@ msgstr ""
msgid "Page %d / %d" msgid "Page %d / %d"
msgstr "" msgstr ""
msgid "(Common)"
msgstr ""
msgid "Destroyed" msgid "Destroyed"
msgstr "" msgstr ""
@ -3127,7 +3130,7 @@ msgstr ""
msgid "Frequent flyer" msgid "Frequent flyer"
msgstr "" msgstr ""
msgid "Destroy one of each common type of starfighter" msgid "Destroy one of each type of common starfighter"
msgstr "" msgstr ""
msgid "Not the face!" msgid "Not the face!"

View File

@ -32,6 +32,7 @@ static Widget *prev;
static Widget *next; static Widget *next;
static char *DB_TEXT; static char *DB_TEXT;
static char *PAGE_TEXT; static char *PAGE_TEXT;
static char *COMMON_TEXT;
static char *DESTROYED_TEXT; static char *DESTROYED_TEXT;
static char *AFFILIATION_TEXT; static char *AFFILIATION_TEXT;
static char *ARMOUR_TEXT; static char *ARMOUR_TEXT;
@ -47,6 +48,7 @@ void initFighterDatabase(void)
DB_TEXT = _("Fighter Database"); DB_TEXT = _("Fighter Database");
PAGE_TEXT = _("Page %d / %d"); PAGE_TEXT = _("Page %d / %d");
COMMON_TEXT = _("(Common)");
DESTROYED_TEXT = _("Destroyed"); DESTROYED_TEXT = _("Destroyed");
AFFILIATION_TEXT = _("Affiliation"); AFFILIATION_TEXT = _("Affiliation");
ARMOUR_TEXT = _("Armour"); ARMOUR_TEXT = _("Armour");
@ -121,7 +123,12 @@ void drawFighterDatabase(void)
blitRotated(fighter->texture, r.x + (r.w / 2), 250, rotation); blitRotated(fighter->texture, r.x + (r.w / 2), 250, rotation);
drawText(r.x + (r.w / 2), 290, 18, TA_CENTER, colors.lightGrey, "%s: %d", DESTROYED_TEXT, numDestroyed); if (fighter->flags & EF_COMMON_FIGHTER)
{
drawText(SCREEN_WIDTH / 2, 170, 18, TA_CENTER, colors.darkGrey, COMMON_TEXT);
drawText(r.x + (r.w / 2), 290, 18, TA_CENTER, colors.lightGrey, "%s: %d", DESTROYED_TEXT, numDestroyed);
}
drawText(r.x + 25, 200, 22, TA_LEFT, colors.white, "%s: %s", AFFILIATION_TEXT, fighter->affiliation); drawText(r.x + 25, 200, 22, TA_LEFT, colors.white, "%s: %s", AFFILIATION_TEXT, fighter->affiliation);
drawText(r.x + 25, 240, 22, TA_LEFT, colors.white, "%s: %d", ARMOUR_TEXT, fighter->health); drawText(r.x + 25, 240, 22, TA_LEFT, colors.white, "%s: %d", ARMOUR_TEXT, fighter->health);