mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Use dynamic credits lists for main menu credits screens (and add GitHub contributors) (#160)
Also added GitHub contributors to the credits on the main menu (previously they were only present in the credits at the end of the game)
This commit is contained in:
@@ -1186,13 +1186,27 @@ SDL_assert(0 && "Remove open level dir");
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits4");
|
||||
game.current_credits_list_index += 9;
|
||||
|
||||
if (game.current_credits_list_index >= (int)game.superpatrons.size())
|
||||
{
|
||||
// No more super patrons. Move to the next credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("credits4");
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are more super patrons. Refresh the menu with the next ones
|
||||
game.createmenu("credits3");
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
@@ -1203,13 +1217,27 @@ SDL_assert(0 && "Remove open level dir");
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits5");
|
||||
game.current_credits_list_index += 14;
|
||||
|
||||
if (game.current_credits_list_index >= (int)game.patrons.size())
|
||||
{
|
||||
// No more patrons. Move to the next credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("credits5");
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are more patrons. Refresh the menu with the next ones
|
||||
game.createmenu("credits4");
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
@@ -1220,69 +1248,32 @@ SDL_assert(0 && "Remove open level dir");
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits6");
|
||||
game.current_credits_list_index += 9;
|
||||
|
||||
if (game.current_credits_list_index >= (int)game.githubfriends.size())
|
||||
{
|
||||
// No more GitHub contributors. Move to the next credits section
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("credits6");
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are more GitHub contributors. Refresh the menu with the next ones
|
||||
game.createmenu("credits5");
|
||||
}
|
||||
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.current_credits_list_index = 0;
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuname == "credits6")
|
||||
{
|
||||
if (game.currentmenuoption == 0)
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits7");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuname == "credits7")
|
||||
{
|
||||
if (game.currentmenuoption == 0)
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits8");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuname == "credits8")
|
||||
{
|
||||
if (game.currentmenuoption == 0)
|
||||
{
|
||||
//next page
|
||||
music.playef(11, 10);
|
||||
game.createmenu("credits9");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
else
|
||||
{
|
||||
//back
|
||||
music.playef(11, 10);
|
||||
game.createmenu("mainmenu");
|
||||
map.nexttowercolour();
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuname == "credits9")
|
||||
{
|
||||
if (game.currentmenuoption == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user