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

Remove outdated comments from Game.cpp

Most of this is telecookie/quickcookie stuff, which was used in the
Flash version, but there's no longer any such thing as a save cookie.

Also one TODO that says to make a function that's now been made.
This commit is contained in:
Misa 2020-04-02 15:11:45 -07:00 committed by Ethan Lee
parent f7ff076074
commit b061051297

View file

@ -368,18 +368,6 @@ void Game::init(void)
} }
} }
//if (telecookie.data.savex == undefined) {
// telecookieexists = false; telesummary = "";
//} else {
// telecookieexists = true; telesummary = telecookie.data.summary;
//}
//if (quickcookie.data.savex == undefined) {
// quickcookieexists = false; quicksummary = "";
//} else {
// quickcookieexists = true; quicksummary = quickcookie.data.summary;
//}
screenshake = flashlight = 0 ; screenshake = flashlight = 0 ;
stat_trinkets = 0; stat_trinkets = 0;
@ -4219,7 +4207,6 @@ void Game::unlocknum( int t )
void Game::loadstats() void Game::loadstats()
{ {
// TODO loadstats
TiXmlDocument doc; TiXmlDocument doc;
if (!FILESYSTEM_loadTiXmlDocument("saves/unlock.vvv", &doc)) if (!FILESYSTEM_loadTiXmlDocument("saves/unlock.vvv", &doc))
{ {
@ -5427,36 +5414,8 @@ void Game::customloadquick(std::string savfile)
} }
//TODO load summary
void Game::loadsummary() void Game::loadsummary()
{ {
//quickcookie = SharedObject.getLocal("dwvvvvvv_quick");
//telecookie = SharedObject.getLocal("dwvvvvvv_tele");
//if (telecookie.data.savex == undefined) {
// telecookieexists = false; telesummary = "";
//} else {
// telecookieexists = true; telesummary = telecookie.data.summary;
// tele_gametime = giventimestring(telecookie.data.hours, telecookie.data.minutes, telecookie.data.seconds, help);
// tele_trinkets = telecookie.data.trinkets;
// tele_currentarea = map.currentarea(map.area(telecookie.data.savex, telecookie.data.savey));
// summary_crewstats = telecookie.data.crewstats.slice();
// tele_crewstats = summary_crewstats.slice();
//}
//if (quickcookie.data.savex == undefined) {
// quickcookieexists = false; quicksummary = "";
//} else {
// quickcookieexists = true; quicksummary = quickcookie.data.summary;
// quick_gametime = giventimestring(quickcookie.data.hours, quickcookie.data.minutes, quickcookie.data.seconds, help);
// quick_trinkets = quickcookie.data.trinkets;
// quick_currentarea = map.currentarea(map.area(quickcookie.data.savex, quickcookie.data.savey));
// summary_crewstats = quickcookie.data.crewstats.slice();
// quick_crewstats = summary_crewstats.slice();
//}
TiXmlDocument docTele; TiXmlDocument docTele;
if (!FILESYSTEM_loadTiXmlDocument("saves/tsave.vvv", &docTele)) if (!FILESYSTEM_loadTiXmlDocument("saves/tsave.vvv", &docTele))
{ {
@ -5658,9 +5617,6 @@ void Game::savetele()
{ {
//TODO make this code a bit cleaner. //TODO make this code a bit cleaner.
//telecookie = SharedObject.getLocal("dwvvvvvv_tele");
//Save to the telesave cookie
if (map.custommode) if (map.custommode)
{ {
//Don't trash save data! //Don't trash save data!
@ -5684,18 +5640,6 @@ void Game::savetele()
//Flags, map and stats //Flags, map and stats
//savestate[1].explored = map.explored.slice();
//savestate[1].flags = obj.flags.slice();
//savestate[1].crewstats = crewstats.slice();
//savestate[1].collect = obj.collect.slice();
//telecookie.data.worldmap = savestate[1].explored.slice();
//telecookie.data.flags = savestate[1].flags.slice();
//telecookie.data.crewstats = savestate[1].crewstats.slice();
//telecookie.data.collect = savestate[1].collect.slice();
//telecookie.data.finalmode = map.finalmode;
//telecookie.data.finalstretch = map.finalstretch;
std::string mapExplored; std::string mapExplored;
for(size_t i = 0; i < map.explored.size(); i++ ) for(size_t i = 0; i < map.explored.size(); i++ )
@ -5733,11 +5677,7 @@ void Game::savetele()
msg->LinkEndChild( new TiXmlText( collect.c_str() )); msg->LinkEndChild( new TiXmlText( collect.c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.finalx = map.finalx;
//telecookie.data.finaly = map.finaly;
//Position //Position
//telecookie.data.savex = savex;
//telecookie.data.savey = savey;
msg = new TiXmlElement( "finalx" ); msg = new TiXmlElement( "finalx" );
msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() ));
@ -5763,13 +5703,6 @@ void Game::savetele()
msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.saverx = saverx;
//telecookie.data.savery = savery;
//telecookie.data.savegc = savegc;
//telecookie.data.savedir = savedir;
//telecookie.data.savepoint = savepoint;
//telecookie.data.trinkets = trinkets;
msg = new TiXmlElement( "savegc" ); msg = new TiXmlElement( "savegc" );
msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -5787,19 +5720,7 @@ void Game::savetele()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//if (music.nicechange != -1) {
//telecookie.data.currentsong = music.nicechange;
//}else{
//telecookie.data.currentsong = music.currentsong;
//}
//telecookie.data.teleportscript = teleportscript;
//Special stats //Special stats
//telecookie.data.companion = companion;
//telecookie.data.lastsaved = lastsaved;
//telecookie.data.supercrewmate = supercrewmate;
//telecookie.data.scmprogress = scmprogress;
//telecookie.data.scmmoveme = scmmoveme;
if(music.nicefade==1) if(music.nicefade==1)
{ {
@ -5836,18 +5757,6 @@ void Game::savetele()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.frames = frames; telecookie.data.seconds = seconds;
//telecookie.data.minutes = minutes; telecookie.data.hours = hours;
//telecookie.data.deathcounts = deathcounts;
//telecookie.data.totalflips = totalflips;
//telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths;
//savearea = map.currentarea(map.area(roomx, roomy))
//telecookie.data.summary = savearea + ", " + timestring(help);
//telesummary = telecookie.data.summary;
msg = new TiXmlElement( "frames" ); msg = new TiXmlElement( "frames" );
msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -5890,8 +5799,6 @@ void Game::savetele()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
telesummary = summary; telesummary = summary;
//telecookie.flush();
//telecookie.close();
if(FILESYSTEM_saveTiXmlDocument("saves/tsave.vvv", &doc)) if(FILESYSTEM_saveTiXmlDocument("saves/tsave.vvv", &doc))
{ {
@ -5930,18 +5837,6 @@ void Game::savequick()
//Flags, map and stats //Flags, map and stats
//savestate[1].explored = map.explored.slice();
//savestate[1].flags = obj.flags.slice();
//savestate[1].crewstats = crewstats.slice();
//savestate[1].collect = obj.collect.slice();
//telecookie.data.worldmap = savestate[1].explored.slice();
//telecookie.data.flags = savestate[1].flags.slice();
//telecookie.data.crewstats = savestate[1].crewstats.slice();
//telecookie.data.collect = savestate[1].collect.slice();
//telecookie.data.finalmode = map.finalmode;
//telecookie.data.finalstretch = map.finalstretch;
std::string mapExplored; std::string mapExplored;
for(size_t i = 0; i < map.explored.size(); i++ ) for(size_t i = 0; i < map.explored.size(); i++ )
@ -5979,11 +5874,7 @@ void Game::savequick()
msg->LinkEndChild( new TiXmlText( collect.c_str() )); msg->LinkEndChild( new TiXmlText( collect.c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.finalx = map.finalx;
//telecookie.data.finaly = map.finaly;
//Position //Position
//telecookie.data.savex = savex;
//telecookie.data.savey = savey;
msg = new TiXmlElement( "finalx" ); msg = new TiXmlElement( "finalx" );
msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() ));
@ -6009,13 +5900,6 @@ void Game::savequick()
msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.saverx = saverx;
//telecookie.data.savery = savery;
//telecookie.data.savegc = savegc;
//telecookie.data.savedir = savedir;
//telecookie.data.savepoint = savepoint;
//telecookie.data.trinkets = trinkets;
msg = new TiXmlElement( "savegc" ); msg = new TiXmlElement( "savegc" );
msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -6033,19 +5917,8 @@ void Game::savequick()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//if (music.nicechange != -1) {
//telecookie.data.currentsong = music.nicechange;
//}else{
//telecookie.data.currentsong = music.currentsong;
//}
//telecookie.data.teleportscript = teleportscript;
//Special stats //Special stats
//telecookie.data.companion = companion;
//telecookie.data.lastsaved = lastsaved;
//telecookie.data.supercrewmate = supercrewmate;
//telecookie.data.scmprogress = scmprogress;
//telecookie.data.scmmoveme = scmmoveme;
if(music.nicefade==1) if(music.nicefade==1)
{ {
msg = new TiXmlElement( "currentsong" ); msg = new TiXmlElement( "currentsong" );
@ -6081,9 +5954,6 @@ void Game::savequick()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.finalmode = map.finalmode;
//telecookie.data.finalstretch = map.finalstretch;
msg = new TiXmlElement( "finalmode" ); msg = new TiXmlElement( "finalmode" );
msg->LinkEndChild( new TiXmlText( BoolToString(map.finalmode) )); msg->LinkEndChild( new TiXmlText( BoolToString(map.finalmode) ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -6091,18 +5961,6 @@ void Game::savequick()
msg->LinkEndChild( new TiXmlText( BoolToString(map.finalstretch) )); msg->LinkEndChild( new TiXmlText( BoolToString(map.finalstretch) ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.frames = frames; telecookie.data.seconds = seconds;
//telecookie.data.minutes = minutes; telecookie.data.hours = hours;
//telecookie.data.deathcounts = deathcounts;
//telecookie.data.totalflips = totalflips;
//telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths;
//savearea = map.currentarea(map.area(roomx, roomy))
//telecookie.data.summary = savearea + ", " + timestring(help);
//telesummary = telecookie.data.summary;
msg = new TiXmlElement( "frames" ); msg = new TiXmlElement( "frames" );
msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -6137,8 +5995,6 @@ void Game::savequick()
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
quicksummary = summary; quicksummary = summary;
//telecookie.flush();
//telecookie.close();
if(FILESYSTEM_saveTiXmlDocument("saves/qsave.vvv", &doc)) if(FILESYSTEM_saveTiXmlDocument("saves/qsave.vvv", &doc))
{ {
@ -6171,18 +6027,6 @@ void Game::customsavequick(std::string savfile)
//Flags, map and stats //Flags, map and stats
//savestate[1].explored = map.explored.slice();
//savestate[1].flags = obj.flags.slice();
//savestate[1].crewstats = crewstats.slice();
//savestate[1].collect = obj.collect.slice();
//telecookie.data.worldmap = savestate[1].explored.slice();
//telecookie.data.flags = savestate[1].flags.slice();
//telecookie.data.crewstats = savestate[1].crewstats.slice();
//telecookie.data.collect = savestate[1].collect.slice();
//telecookie.data.finalmode = map.finalmode;
//telecookie.data.finalstretch = map.finalstretch;
std::string mapExplored; std::string mapExplored;
for(size_t i = 0; i < map.explored.size(); i++ ) for(size_t i = 0; i < map.explored.size(); i++ )
@ -6238,11 +6082,7 @@ void Game::customsavequick(std::string savfile)
msg->LinkEndChild( new TiXmlText( customcollect.c_str() )); msg->LinkEndChild( new TiXmlText( customcollect.c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.finalx = map.finalx;
//telecookie.data.finaly = map.finaly;
//Position //Position
//telecookie.data.savex = savex;
//telecookie.data.savey = savey;
msg = new TiXmlElement( "finalx" ); msg = new TiXmlElement( "finalx" );
msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(map.finalx).c_str() ));
@ -6268,13 +6108,6 @@ void Game::customsavequick(std::string savfile)
msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savery).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.saverx = saverx;
//telecookie.data.savery = savery;
//telecookie.data.savegc = savegc;
//telecookie.data.savedir = savedir;
//telecookie.data.savepoint = savepoint;
//telecookie.data.trinkets = trinkets;
msg = new TiXmlElement( "savegc" ); msg = new TiXmlElement( "savegc" );
msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(savegc).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -6296,19 +6129,8 @@ void Game::customsavequick(std::string savfile)
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//if (music.nicechange != -1) {
//telecookie.data.currentsong = music.nicechange;
//}else{
//telecookie.data.currentsong = music.currentsong;
//}
//telecookie.data.teleportscript = teleportscript;
//Special stats //Special stats
//telecookie.data.companion = companion;
//telecookie.data.lastsaved = lastsaved;
//telecookie.data.supercrewmate = supercrewmate;
//telecookie.data.scmprogress = scmprogress;
//telecookie.data.scmmoveme = scmmoveme;
if(music.nicefade==1) if(music.nicefade==1)
{ {
msg = new TiXmlElement( "currentsong" ); msg = new TiXmlElement( "currentsong" );
@ -6344,18 +6166,6 @@ void Game::customsavequick(std::string savfile)
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
//telecookie.data.frames = frames; telecookie.data.seconds = seconds;
//telecookie.data.minutes = minutes; telecookie.data.hours = hours;
//telecookie.data.deathcounts = deathcounts;
//telecookie.data.totalflips = totalflips;
//telecookie.data.hardestroom = hardestroom; telecookie.data.hardestroomdeaths = hardestroomdeaths;
//savearea = map.currentarea(map.area(roomx, roomy))
//telecookie.data.summary = savearea + ", " + timestring(help);
//telesummary = telecookie.data.summary;
msg = new TiXmlElement( "frames" ); msg = new TiXmlElement( "frames" );
msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() )); msg->LinkEndChild( new TiXmlText( help.String(frames).c_str() ));
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
@ -6394,8 +6204,6 @@ void Game::customsavequick(std::string savfile)
msgs->LinkEndChild( msg ); msgs->LinkEndChild( msg );
customquicksummary = summary; customquicksummary = summary;
//telecookie.flush();
//telecookie.close();
std::string levelfile = savfile.substr(7); std::string levelfile = savfile.substr(7);
if(FILESYSTEM_saveTiXmlDocument(("saves/"+levelfile+".vvv").c_str(), &doc)) if(FILESYSTEM_saveTiXmlDocument(("saves/"+levelfile+".vvv").c_str(), &doc))