mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove more tele/quick variables duplicating info in struct Summary
For both `tele` and `quick`, I removed these attributes of class Game: - std::string *_gametime - int *_trinkets - std::string *_currentarea - bool *_crewstats[numcrew] All this info can now be gotten from members of Game::last_telesave and Game::last_telesave. I've also cleaned up the continue menu to not have all the display code appear twice (once for telesave and once for quicksave). RIP "Error! Error!" though lol
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
f23ffc0457
commit
ac7fe4475c
@@ -225,8 +225,6 @@ void Game::init(void)
|
||||
|
||||
SDL_memset(crewstats, false, sizeof(crewstats));
|
||||
SDL_memset(ndmresultcrewstats, false, sizeof(ndmresultcrewstats));
|
||||
SDL_memset(tele_crewstats, false, sizeof(tele_crewstats));
|
||||
SDL_memset(quick_crewstats, false, sizeof(quick_crewstats));
|
||||
SDL_memset(besttimes, -1, sizeof(besttimes));
|
||||
SDL_memset(bestframes, -1, sizeof(bestframes));
|
||||
SDL_memset(besttrinkets, -1, sizeof(besttrinkets));
|
||||
@@ -236,13 +234,6 @@ void Game::init(void)
|
||||
crewstats[0] = true;
|
||||
lastsaved = 0;
|
||||
|
||||
tele_gametime = "00:00";
|
||||
tele_trinkets = 0;
|
||||
tele_currentarea = "Error! Error!";
|
||||
quick_gametime = "00:00";
|
||||
quick_trinkets = 0;
|
||||
quick_currentarea = "Error! Error!";
|
||||
|
||||
//Menu stuff initiliased here:
|
||||
SDL_memset(unlock, false, sizeof(unlock));
|
||||
SDL_memset(unlocknotify, false, sizeof(unlock));
|
||||
@@ -5629,29 +5620,11 @@ void Game::loadsummary(void)
|
||||
if (FILESYSTEM_loadTiXml2Document("saves/tsave.vvv", doc))
|
||||
{
|
||||
loadthissummary("tsave.vvv", &last_telesave, doc);
|
||||
|
||||
tele_gametime = giventimestring(
|
||||
last_telesave.hours,
|
||||
last_telesave.minutes,
|
||||
last_telesave.seconds
|
||||
);
|
||||
tele_currentarea = map.currentarea(last_telesave.saverx, last_telesave.savery);
|
||||
SDL_memcpy(tele_crewstats, last_telesave.crewstats, sizeof(tele_crewstats));
|
||||
tele_trinkets = last_telesave.trinkets;
|
||||
}
|
||||
|
||||
if (FILESYSTEM_loadTiXml2Document("saves/qsave.vvv", doc))
|
||||
{
|
||||
loadthissummary("qsave.vvv", &last_quicksave, doc);
|
||||
|
||||
quick_gametime = giventimestring(
|
||||
last_quicksave.hours,
|
||||
last_quicksave.minutes,
|
||||
last_quicksave.seconds
|
||||
);
|
||||
quick_currentarea = map.currentarea(last_quicksave.saverx, last_quicksave.savery);
|
||||
SDL_memcpy(quick_crewstats, last_quicksave.crewstats, sizeof(quick_crewstats));
|
||||
quick_trinkets = last_quicksave.trinkets;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user