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

Remove temporary UtilityClass from Game::savestats()

Looks like it was here from that arg passing stuff from earlier, as a
workaround to not pass args around. Well, there's no need to create an
extra UtilityClass now either, just use the one in the global namespace.
This commit is contained in:
Misa 2020-04-08 22:32:27 -07:00 committed by Ethan Lee
parent 699af342e8
commit 2f1c400c9a

View file

@ -4605,115 +4605,113 @@ void Game::savestats()
msg->LinkEndChild( new TiXmlText( s_bestrank.c_str() ));
dataNode->LinkEndChild( msg );
//for itoa ops
UtilityClass tu;
msg = new TiXmlElement( "bestgamedeaths" );
msg->LinkEndChild( new TiXmlText( tu.String(bestgamedeaths).c_str() ));
msg->LinkEndChild( new TiXmlText( help.String(bestgamedeaths).c_str() ));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "stat_trinkets" );
msg->LinkEndChild( new TiXmlText( tu.String(stat_trinkets).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(stat_trinkets).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "fullscreen" );
msg->LinkEndChild( new TiXmlText( tu.String(fullscreen).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(fullscreen).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "stretch" );
msg->LinkEndChild( new TiXmlText( tu.String(stretchMode).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(stretchMode).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "useLinearFilter" );
msg->LinkEndChild( new TiXmlText( tu.String(useLinearFilter).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(useLinearFilter).c_str()));
dataNode->LinkEndChild( msg );
int width, height;
graphics.screenbuffer->GetWindowSize(&width, &height);
msg = new TiXmlElement( "window_width" );
msg->LinkEndChild( new TiXmlText( tu.String(width).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(width).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "window_height" );
msg->LinkEndChild( new TiXmlText( tu.String(height).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(height).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "noflashingmode" );
msg->LinkEndChild( new TiXmlText( tu.String(noflashingmode).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(noflashingmode).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "colourblindmode" );
msg->LinkEndChild( new TiXmlText( tu.String(colourblindmode).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(colourblindmode).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "setflipmode" );
msg->LinkEndChild( new TiXmlText( tu.String(graphics.setflipmode).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(graphics.setflipmode).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "invincibility" );
msg->LinkEndChild( new TiXmlText( tu.String(map.invincibility).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(map.invincibility).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "slowdown" );
msg->LinkEndChild( new TiXmlText( tu.String(slowdown).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(slowdown).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "swnbestrank" );
msg->LinkEndChild( new TiXmlText( tu.String(swnbestrank).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(swnbestrank).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "swnrecord" );
msg->LinkEndChild( new TiXmlText( tu.String(swnrecord).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(swnrecord).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "advanced_mode" );
msg->LinkEndChild( new TiXmlText( tu.String(advanced_mode).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(advanced_mode).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "advanced_smoothing" );
msg->LinkEndChild( new TiXmlText( tu.String(fullScreenEffect_badSignal).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(fullScreenEffect_badSignal).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement( "usingmmmmmm" );
msg->LinkEndChild( new TiXmlText( tu.String(usingmmmmmm).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(usingmmmmmm).c_str()));
dataNode->LinkEndChild( msg );
msg = new TiXmlElement("skipfakeload");
msg->LinkEndChild(new TiXmlText(tu.String((int) skipfakeload).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) skipfakeload).c_str()));
dataNode->LinkEndChild(msg);
msg = new TiXmlElement("notextoutline");
msg->LinkEndChild(new TiXmlText(tu.String((int) graphics.notextoutline).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) graphics.notextoutline).c_str()));
dataNode->LinkEndChild(msg);
msg = new TiXmlElement("translucentroomname");
msg->LinkEndChild(new TiXmlText(tu.String((int) graphics.translucentroomname).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) graphics.translucentroomname).c_str()));
dataNode->LinkEndChild(msg);
msg = new TiXmlElement("showmousecursor");
msg->LinkEndChild(new TiXmlText(tu.String((int)graphics.showmousecursor).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int)graphics.showmousecursor).c_str()));
dataNode->LinkEndChild(msg);
for (size_t i = 0; i < controllerButton_flip.size(); i += 1)
{
msg = new TiXmlElement("flipButton");
msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_flip[i]).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) controllerButton_flip[i]).c_str()));
dataNode->LinkEndChild(msg);
}
for (size_t i = 0; i < controllerButton_map.size(); i += 1)
{
msg = new TiXmlElement("enterButton");
msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_map[i]).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) controllerButton_map[i]).c_str()));
dataNode->LinkEndChild(msg);
}
for (size_t i = 0; i < controllerButton_esc.size(); i += 1)
{
msg = new TiXmlElement("escButton");
msg->LinkEndChild(new TiXmlText(tu.String((int) controllerButton_esc[i]).c_str()));
msg->LinkEndChild(new TiXmlText(help.String((int) controllerButton_esc[i]).c_str()));
dataNode->LinkEndChild(msg);
}
msg = new TiXmlElement( "controllerSensitivity" );
msg->LinkEndChild( new TiXmlText( tu.String(controllerSensitivity).c_str()));
msg->LinkEndChild( new TiXmlText( help.String(controllerSensitivity).c_str()));
dataNode->LinkEndChild( msg );
FILESYSTEM_saveTiXmlDocument("saves/unlock.vvv", &doc);