From ee44f81d4c1a4ffb2f5967356973ebcf75835603 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 12 Nov 2020 16:48:39 -0800 Subject: [PATCH] Remove duplicate using-MMMMMM variable from Game game.usingmmmmmm was a duplicate of music.usingmmmmmm, and has been removed. --- desktop_version/src/Game.cpp | 8 ++------ desktop_version/src/Game.h | 2 -- desktop_version/src/Input.cpp | 5 ----- desktop_version/src/main.cpp | 2 -- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 5a162758..472c732a 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -4638,11 +4638,7 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, ScreenSettings* s if (pKey == "usingmmmmmm") { - if(help.Int(pText)>0){ - usingmmmmmm = 1; - }else{ - usingmmmmmm = 0; - } + music.usingmmmmmm = (bool) help.Int(pText); } if (pKey == "ghostsenabled") @@ -4882,7 +4878,7 @@ void Game::serializesettings(tinyxml2::XMLElement* dataNode) xml::update_tag(dataNode, "advanced_smoothing", graphics.screenbuffer->badSignalEffect); - xml::update_tag(dataNode, "usingmmmmmm", usingmmmmmm); + xml::update_tag(dataNode, "usingmmmmmm", music.usingmmmmmm); xml::update_tag(dataNode, "ghostsenabled", (int) ghostsenabled); diff --git a/desktop_version/src/Game.h b/desktop_version/src/Game.h index f8649775..9d67a060 100644 --- a/desktop_version/src/Game.h +++ b/desktop_version/src/Game.h @@ -198,8 +198,6 @@ public: bool glitchrunkludge; - int usingmmmmmm; - int gamestate; bool hascontrol, jumpheld; int jumppressed; diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 79111595..0c2d6ee6 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -748,11 +748,6 @@ void menuactionpress() else if (game.currentmenuoption == 6+offset && music.mmmmmm) { //**** TOGGLE MMMMMM - if(game.usingmmmmmm > 0){ - game.usingmmmmmm=0; - }else{ - game.usingmmmmmm=1; - } music.usingmmmmmm = !music.usingmmmmmm; music.playef(11); music.play(music.currentsong); diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 2b0b1052..3b559d90 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -276,8 +276,6 @@ int main(int argc, char *argv[]) if (game.skipfakeload) game.gamestate = TITLEMODE; - if(game.usingmmmmmm==0) music.usingmmmmmm=false; - if(game.usingmmmmmm==1) music.usingmmmmmm=true; if (game.slowdown == 0) game.slowdown = 30; switch(game.slowdown){