1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Save showtrinkets to custom level quicksaves

Since custom levels have gained the functionality to show trinkets on
the minimap, it's nice to just save the showtrinkets variable directly
to the save file, without having to make level makers handle it
themselves.
This commit is contained in:
Misa 2021-06-13 17:24:16 -07:00 committed by Ethan Lee
parent 3500888971
commit 448a99ca23

View file

@ -5198,6 +5198,10 @@ void Game::customloadquick(std::string savfile)
{ {
disabletemporaryaudiopause = help.Int(pText); disabletemporaryaudiopause = help.Int(pText);
} }
else if (SDL_strcmp(pKey, "showtrinkets") == 0)
{
map.showtrinkets = help.Int(pText);
}
} }
@ -5681,6 +5685,8 @@ bool Game::customsavequick(std::string savfile)
xml::update_tag(msgs, "disabletemporaryaudiopause", (int) disabletemporaryaudiopause); xml::update_tag(msgs, "disabletemporaryaudiopause", (int) disabletemporaryaudiopause);
xml::update_tag(msgs, "showtrinkets", (int) map.showtrinkets);
std::string summary = savearea + ", " + timestring(); std::string summary = savearea + ", " + timestring();
xml::update_tag(msgs, "summary", summary.c_str()); xml::update_tag(msgs, "summary", summary.c_str());