Skip to content

Commit

Permalink
Initial implementation of localisation credits
Browse files Browse the repository at this point in the history
This commit adds translation credits to the game's end credits
screen. Note that this is not implemented into the menu credits
screen yet. The translator name list is subject to tweaks, and
additionally some localised strings ("Localisation Project Led by"
and "Pan-European Font Design by") run off the screen in some
languages (Catalan, Spanish, Irish, Italian, Dutch, European
Portuguese and Ukrainian) and will need to be addressed later.
  • Loading branch information
Fussmatte authored and InfoTeddy committed Dec 6, 2023
1 parent c660000 commit 9b8808e
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 4 deletions.
57 changes: 55 additions & 2 deletions desktop_version/src/Credits.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,59 @@

namespace Credits {

/* Translators list; lines prefaced with a space aren't translatable */
static const char* translators[] = {
"Catalan",
" Eduard Ereza Martínez",
"Welsh",
" Morgan Roberts",
"German",
" Thomas Faust",
"Esperanto",
" Reese Rivers",
"Spanish",
" Felipe Mercader",
" Sara Marín",
"French",
" Words of Magic",
"Irish",
" Úna-Minh Kavanagh",
" Seaghán Ó Modhráin",
" Davis Sandefur",
"Italian",
" A. Dellepiane",
" M. Scarabelli",
" L. Bertolucci",
" F. Bortolotti",
"Japanese",
" Nicalis, Inc.",
" KabanFriends",
"Korean",
" Bada Im",
" Hyungseok Cho",
"Dutch",
" Dav999",
"Polish",
" Kuba Kallus",
"Brazilian Portuguese",
" Lucas Araujo",
" Thiago Araujo",
"European Portuguese",
" Locsmiths",
"Russian",
" TheMysticSword",
"Silesian",
" Kuba Kallus",
"Turkish",
" Engin İlkiz",
"Ukrainian",
" Olya Sushytska",
"Chinese (Simplified)",
" Sound of Mystery",
"Chinese (Traditional)",
" Sound of Mystery / craft",
};

/* Terry's Patrons... */
static const char* superpatrons[] = {
"Anders Ekermo",
Expand Down Expand Up @@ -121,9 +174,9 @@ static const char* githubfriends[] = {
};

/* Calculate credits length, finally. */
static const int creditmaxposition = 1068 + (10 * (
static const int creditmaxposition = 1228 + (10 * (
SDL_arraysize(superpatrons) + SDL_arraysize(patrons) + SDL_arraysize(githubfriends)
));
)) + (12 * SDL_arraysize(translators));

} /* namespace Credits */

Expand Down
39 changes: 37 additions & 2 deletions desktop_version/src/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1945,9 +1945,44 @@ void gamecompleterender(void)
font::print(PR_2X | PR_FONT_8X8, 60, 830 + position, "Pauli Kohberger", tr, tg, tb);
}

if (graphics.onscreen(910 + position)) font::print(PR_3X | PR_CEN, -1, 890 + position, loc::gettext("Patrons"), tr, tg, tb);
int creditOffset = 890;

int creditOffset = 950;
if (graphics.onscreen(creditOffset + position)) font::print(PR_2X | PR_CEN, -1, creditOffset + position, loc::gettext("Localisation"), tr, tg, tb);
creditOffset += 30;

if (graphics.onscreen(creditOffset + position))
{
font::print(PR_CJK_HIGH, 40, creditOffset + position, loc::gettext("Localisation Project Led by"), tr, tg, tb);
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Dav999", tr, tg, tb);
}
creditOffset += 40;
if (graphics.onscreen(creditOffset + position))
{
font::print(PR_CJK_HIGH, 40, creditOffset + position, loc::gettext("Pan-European Font Design by"), tr, tg, tb);
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Reese Rivers", tr, tg, tb);
}
creditOffset += 40;
if (graphics.onscreen(creditOffset + position)) font::print(PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Translators"), tr, tg, tb);
creditOffset += 20;
for (size_t i = 0; i < SDL_arraysize(Credits::translators); i += 1)
{
if (graphics.onscreen(creditOffset + position))
{
if (Credits::translators[i][0] != ' ') // Not prefixed with a space, so this line is the name of a language, display its localised string
{
font::print(0, 60, creditOffset + position, loc::gettext(Credits::translators[i]), tr, tg, tb);
} else { // Otherwise, this line is the name of a translator, indent it and display with the original 8x8 font always
font::print(PR_FONT_8X8, 72, creditOffset + position, Credits::translators[i], tr, tg, tb);
}
}
creditOffset += 12;
}

creditOffset += 40;

if (graphics.onscreen(creditOffset + position)) font::print(PR_3X | PR_CEN, -1, creditOffset + position, loc::gettext("Patrons"), tr, tg, tb);\

creditOffset += 50;

for (size_t i = 0; i < SDL_arraysize(Credits::superpatrons); i += 1)
{
Expand Down

0 comments on commit 9b8808e

Please sign in to comment.