mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Replace std::string Game::telesummary and Game::quicksummary by Summary
Game::telesummary and Game::quicksummary stored the summary string for the save files - which is the <summary> tag that says something like "Space Station, 10:30:59". The game only ever displays the quicksave variant of these two, for "Last Save:" on the map menu's SAVE tab. So the telesave has a <summary> too, but it's never displayed anywhere. (In fact, the area is often set to "nowhere"...) However, the summary strings have another function: detect that both the telesave and quicksave exist. If a summary string for a save is empty, then that save is considered not to exist. I'm refactoring the summary string system, by making the new variables Game::last_telesave and Game::last_quicksave of type struct Game::Summary. This struct should have all data necessary to display the summary string at runtime, and thus translate it at runtime (so we don't store a summary in a certain language and then display it in the wrong font later - the summary can always be in the current language). It also has an `exists` member, to replace the need to check for empty strings. The <summary> tag is now completely unused, but is still written to for older versions of the game to read. (This commit does not add the new string to the language files, since Terry now added it separately in his own branch)
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
64bad7d67f
commit
0ea41e7913
@@ -1773,13 +1773,13 @@ static void menuactionpress(void)
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
startmode(Start_MAINGAME);
|
||||
}
|
||||
else if (game.telesummary == "")
|
||||
else if (!game.last_telesave.exists)
|
||||
{
|
||||
//You at least have a quicksave, or you couldn't have gotten here
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
startmode(Start_MAINGAME_QUICKSAVE);
|
||||
}
|
||||
else if (game.quicksummary == "")
|
||||
else if (!game.last_quicksave.exists)
|
||||
{
|
||||
//You at least have a telesave, or you couldn't have gotten here
|
||||
music.playef(Sound_VIRIDIAN);
|
||||
|
||||
Reference in New Issue
Block a user