mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove unnecessary middleman game.infocus
It does the same thing as key.isActive, so no need to make it a separate variable.
This commit is contained in:
@@ -117,7 +117,6 @@ bool GetButtonFromString(const char *pText, SDL_GameControllerButton *button)
|
||||
void Game::init(void)
|
||||
{
|
||||
mutebutton = 0;
|
||||
infocus = true;
|
||||
muted = false;
|
||||
musicmuted = false;
|
||||
musicmutebutton = 0;
|
||||
|
||||
@@ -179,7 +179,6 @@ public:
|
||||
int jumppressed;
|
||||
int gravitycontrol;
|
||||
|
||||
bool infocus;
|
||||
bool muted;
|
||||
int mutebutton;
|
||||
bool musicmuted;
|
||||
|
||||
@@ -203,7 +203,6 @@ int main(int argc, char *argv[])
|
||||
graphics.init();
|
||||
|
||||
game.init();
|
||||
game.infocus = true;
|
||||
|
||||
// This loads music too...
|
||||
graphics.reloadresources();
|
||||
@@ -351,7 +350,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
game.infocus = true;
|
||||
key.isActive = true;
|
||||
game.gametimer = 0;
|
||||
|
||||
@@ -425,7 +423,7 @@ void inline deltaloop()
|
||||
const float alpha = game.over30mode ? static_cast<float>(accumulator) / timesteplimit : 1.0f;
|
||||
graphics.alpha = alpha;
|
||||
|
||||
if (game.infocus)
|
||||
if (key.isActive)
|
||||
{
|
||||
switch (game.gamestate)
|
||||
{
|
||||
@@ -466,8 +464,6 @@ void inline deltaloop()
|
||||
|
||||
void inline fixedloop()
|
||||
{
|
||||
game.infocus = key.isActive;
|
||||
|
||||
// Update network per frame.
|
||||
NETWORK_update();
|
||||
|
||||
@@ -501,7 +497,7 @@ void inline fixedloop()
|
||||
game.press_map = false;
|
||||
}
|
||||
|
||||
if(!game.infocus)
|
||||
if(!key.isActive)
|
||||
{
|
||||
Mix_Pause(-1);
|
||||
Mix_PauseMusic();
|
||||
@@ -605,11 +601,11 @@ void inline fixedloop()
|
||||
}
|
||||
|
||||
//Screen effects timers
|
||||
if (game.infocus && game.flashlight > 0)
|
||||
if (key.isActive && game.flashlight > 0)
|
||||
{
|
||||
game.flashlight--;
|
||||
}
|
||||
if (game.infocus && game.screenshake > 0)
|
||||
if (key.isActive && game.screenshake > 0)
|
||||
{
|
||||
game.screenshake--;
|
||||
graphics.updatescreenshake();
|
||||
|
||||
Reference in New Issue
Block a user