mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Add localisation credits to main menu credits
In addition, this adds Ally and mothbeanie to the Localisation Implementation page credits. Also updated the game complete credits!
This commit is contained in:
parent
e754654926
commit
9a40993b5f
5 changed files with 152 additions and 12 deletions
|
@ -58,6 +58,9 @@ static const char* translators[] = {
|
|||
" Sound of Mystery / craft",
|
||||
};
|
||||
|
||||
/* Hardcoded pagesizes for the translator credits. Simplifies paging backwards and forwards */
|
||||
static const int translator_pagesize[] = { 8, 9, 8, 10, 10, 4 };
|
||||
|
||||
/* Terry's Patrons... */
|
||||
static const char* superpatrons[] = {
|
||||
"Anders Ekermo",
|
||||
|
@ -174,7 +177,7 @@ static const char* githubfriends[] = {
|
|||
};
|
||||
|
||||
/* Calculate credits length, finally. */
|
||||
static const int creditmaxposition = 1228 + (10 * (
|
||||
static const int creditmaxposition = 1348 + (10 * (
|
||||
SDL_arraysize(superpatrons) + SDL_arraysize(patrons) + SDL_arraysize(githubfriends)
|
||||
)) + (12 * SDL_arraysize(translators));
|
||||
|
||||
|
|
|
@ -242,6 +242,7 @@ void Game::init(void)
|
|||
currentmenuoption = 0;
|
||||
menutestmode = false;
|
||||
current_credits_list_index = 0;
|
||||
translator_credits_pagenum = 0;
|
||||
menuxoff = 0;
|
||||
menuyoff = 0;
|
||||
menucountdown = 0;
|
||||
|
@ -6703,6 +6704,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
case Menu::credits3:
|
||||
case Menu::credits4:
|
||||
case Menu::credits5:
|
||||
case Menu::credits_localisations_implementation:
|
||||
case Menu::credits_localisations_translations:
|
||||
option(loc::gettext("next page"));
|
||||
option(loc::gettext("previous page"));
|
||||
option(loc::gettext("return"));
|
||||
|
|
|
@ -85,6 +85,8 @@ namespace Menu
|
|||
credits4,
|
||||
credits5,
|
||||
credits6,
|
||||
credits_localisations_implementation,
|
||||
credits_localisations_translations,
|
||||
play,
|
||||
unlocktimetrial,
|
||||
unlocktimetrials,
|
||||
|
@ -375,6 +377,7 @@ public:
|
|||
enum Menu::MenuName kludge_ingametemp;
|
||||
enum SLIDERMODE slidermode;
|
||||
int current_credits_list_index;
|
||||
int translator_credits_pagenum;
|
||||
int menuxoff, menuyoff;
|
||||
int menuspacing;
|
||||
std::vector<MenuStackFrame> menustack;
|
||||
|
|
|
@ -1567,7 +1567,7 @@ static void menuactionpress(void)
|
|||
case 0:
|
||||
//next page
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.createmenu(Menu::credits3, true);
|
||||
game.createmenu(Menu::credits_localisations_implementation, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1584,6 +1584,87 @@ static void menuactionpress(void)
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case Menu::credits_localisations_implementation:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
//next page
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.translator_credits_pagenum = 0;
|
||||
game.createmenu(Menu::credits_localisations_translations, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.createmenu(Menu::credits25, true);
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//back
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Menu::credits_localisations_translations:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
case 0:
|
||||
//next page
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.translator_credits_pagenum++;
|
||||
|
||||
if (game.translator_credits_pagenum >= (int)SDL_arraysize(Credits::translator_pagesize))
|
||||
{
|
||||
// No more translators. Move to the next credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu(Menu::credits3, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are more translators. Refresh the menu with the next ones
|
||||
game.current_credits_list_index = 0;
|
||||
for (int i = 0; i < game.translator_credits_pagenum; i += 1)
|
||||
{
|
||||
game.current_credits_list_index += Credits::translator_pagesize[i];
|
||||
}
|
||||
|
||||
game.createmenu(Menu::credits_localisations_translations, true);
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
case 1:
|
||||
//previous page
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.translator_credits_pagenum--;
|
||||
if (game.translator_credits_pagenum >= 0)
|
||||
{
|
||||
game.current_credits_list_index = 0;
|
||||
for (int i = 0; i < game.translator_credits_pagenum; i += 1)
|
||||
{
|
||||
game.current_credits_list_index += Credits::translator_pagesize[i];
|
||||
}
|
||||
game.createmenu(Menu::credits_localisations_translations, true);
|
||||
}else {
|
||||
//No more translators. Move to the previous credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu(Menu::credits_localisations_implementation, true);
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
default:
|
||||
//back
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
game.current_credits_list_index = 0;
|
||||
game.returnmenu();
|
||||
map.nexttowercolour();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Menu::credits3:
|
||||
switch (game.currentmenuoption)
|
||||
{
|
||||
|
@ -1614,8 +1695,13 @@ static void menuactionpress(void)
|
|||
if (game.current_credits_list_index < 0)
|
||||
{
|
||||
//No more super patrons. Move to the previous credits section
|
||||
game.translator_credits_pagenum = (int)SDL_arraysize(Credits::translator_pagesize) - 1;
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu(Menu::credits25, true);
|
||||
for (int i = 0; i < game.translator_credits_pagenum; i += 1)
|
||||
{
|
||||
game.current_credits_list_index += Credits::translator_pagesize[i];
|
||||
}
|
||||
game.createmenu(Menu::credits_localisations_translations, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -533,13 +533,13 @@ static void menurender(void)
|
|||
graphics.drawimagecol(IMAGE_SITE2, -1, 156, graphics.getRGB(tr, tg, tb), true);
|
||||
break;
|
||||
case Menu::credits2:
|
||||
font::print(PR_CEN, -1, 50, loc::gettext("Roomnames are by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 65, "Bennett Foddy", tr, tg, tb);
|
||||
graphics.drawimagecol(IMAGE_SITE3, -1, 86, graphics.getRGB(tr, tg, tb), true);
|
||||
font::print(PR_CEN, -1, 110, loc::gettext("C++ version by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 125, "Simon Roth", tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 145, "Ethan Lee", tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 165, "Misa Kai", tr, tg, tb);
|
||||
font::print(PR_CEN, -1, 40, loc::gettext("Roomnames are by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 55, "Bennett Foddy", tr, tg, tb);
|
||||
graphics.drawimagecol(IMAGE_SITE3, -1, 76, graphics.getRGB(tr, tg, tb), true);
|
||||
font::print(PR_CEN, -1, 100, loc::gettext("C++ version by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 115, "Simon Roth", tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 135, "Ethan Lee", tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 155, "Misa Kai", tr, tg, tb);
|
||||
break;
|
||||
case Menu::credits25:
|
||||
font::print(PR_CEN, -1, 40, loc::gettext("Beta Testing by"), tr, tg, tb);
|
||||
|
@ -548,6 +548,44 @@ static void menurender(void)
|
|||
font::print(PR_CEN, -1, 130, loc::gettext("Ending Picture by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 145, "Pauli Kohberger", tr, tg, tb);
|
||||
break;
|
||||
case Menu::credits_localisations_implementation:
|
||||
font::print(PR_CEN, -1, 30, loc::gettext("Localisation Project Led by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 45, "Dav999", tr, tg, tb);
|
||||
font::print(PR_CEN, -1, 75, loc::gettext("Pan-European Font Design by"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 90, "Reese Rivers", tr, tg, tb);
|
||||
font::print_wrap(PR_CEN, -1, 125, loc::gettext("With contributions on GitHub from"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 140, "Alexandra Fox", tr, tg, tb);
|
||||
font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 160, "mothbeanie", tr, tg, tb);
|
||||
break;
|
||||
case Menu::credits_localisations_translations:
|
||||
{
|
||||
font::print_wrap(PR_2X | PR_CEN | PR_FONT_8X8, -1, 15, loc::gettext("Translators"), tr, tg, tb);
|
||||
|
||||
int startidx = game.current_credits_list_index;
|
||||
int endidx = game.current_credits_list_index;
|
||||
endidx += Credits::translator_pagesize[game.translator_credits_pagenum];
|
||||
endidx = SDL_min(endidx, (int)SDL_arraysize(Credits::translators));
|
||||
|
||||
int maxheight = 110;
|
||||
|
||||
int totalheight = (endidx - startidx) * 10;
|
||||
int emptyspace = maxheight - totalheight;
|
||||
|
||||
int yofs = 50 + (emptyspace / 2);
|
||||
|
||||
for (int i = startidx; i < endidx; ++i)
|
||||
{
|
||||
if (Credits::translators[i][0] != ' ')
|
||||
{
|
||||
yofs += 5;
|
||||
font::print(PR_FONT_8X8, 80, yofs, loc::gettext(Credits::translators[i]), tr, tg, tb);
|
||||
}else{
|
||||
font::print(PR_FONT_8X8, 80, yofs, Credits::translators[i], tr, tg, tb);
|
||||
}
|
||||
yofs += 10;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Menu::credits3:
|
||||
{
|
||||
font::print_wrap(PR_CEN, -1, 20, loc::gettext("VVVVVV is supported by the following patrons"), tr, tg, tb);
|
||||
|
@ -1967,9 +2005,16 @@ void gamecompleterender(void)
|
|||
creditOffset += 40;
|
||||
if (graphics.onscreen(creditOffset + position))
|
||||
{
|
||||
font::print(PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Translators"), tr, tg, tb);
|
||||
font::print(PR_CJK_HIGH, 40, creditOffset + position, loc::gettext("With contributions on GitHub from"), tr, tg, tb);
|
||||
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Alexandra Fox", tr, tg, tb);
|
||||
font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 30, "mothbeanie", tr, tg, tb);
|
||||
}
|
||||
creditOffset += 20;
|
||||
creditOffset += 100;
|
||||
if (graphics.onscreen(creditOffset + position))
|
||||
{
|
||||
font::print(PR_2X | PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Translators"), tr, tg, tb);
|
||||
}
|
||||
creditOffset += 40;
|
||||
for (size_t i = 0; i < SDL_arraysize(Credits::translators); i += 1)
|
||||
{
|
||||
if (graphics.onscreen(creditOffset + position))
|
||||
|
|
Loading…
Reference in a new issue