1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-04 18:29:41 +01:00

Remove useless attributes m_globalVol, set/getGlobalSound from Game

These do basically nothing. The only time they're used is
getGlobalSound() in an if-statement in main.cpp, but all that
if-conditional does is call setGlobalSound() anyway, which is something
that doesn't really have any side effects. So I'm removing these vars to
simplify the code.
This commit is contained in:
Misa 2020-04-19 13:11:51 -07:00 committed by Ethan Lee
parent aacd39f5c6
commit c176127529
3 changed files with 0 additions and 19 deletions

View file

@ -122,7 +122,6 @@ void Game::init(void)
musicmuted = false; musicmuted = false;
musicmutebutton = 0; musicmutebutton = 0;
globalsound = 128; globalsound = 128;
m_globalVol = 1.0f;
glitchrunkludge = false; glitchrunkludge = false;
hascontrol = true; hascontrol = true;

View file

@ -84,16 +84,6 @@ public:
~Game(void); ~Game(void);
void setGlobalSoundVol(const float _vol)
{
m_globalVol = _vol;
}
float getGlobalSoundVol()
{
return m_globalVol;
}
int crewrescued(); int crewrescued();
std::string unrescued(); std::string unrescued();
@ -194,10 +184,6 @@ public:
int mutebutton; int mutebutton;
bool musicmuted; bool musicmuted;
int musicmutebutton; int musicmutebutton;
private:
float m_globalVol;
public:
int tapleft, tapright; int tapleft, tapright;

View file

@ -379,10 +379,6 @@ int main(int argc, char *argv[])
game.infocus = key.isActive; game.infocus = key.isActive;
if(!game.infocus) if(!game.infocus)
{ {
if(game.getGlobalSoundVol()> 0)
{
game.setGlobalSoundVol(0);
}
FillRect(graphics.backBuffer, 0x00000000); FillRect(graphics.backBuffer, 0x00000000);
graphics.bprint(5, 110, "Game paused", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); graphics.bprint(5, 110, "Game paused", 196 - help.glow, 255 - help.glow, 196 - help.glow, true);
graphics.bprint(5, 120, "[click to resume]", 196 - help.glow, 255 - help.glow, 196 - help.glow, true); graphics.bprint(5, 120, "[click to resume]", 196 - help.glow, 255 - help.glow, 196 - help.glow, true);