mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove global args from Game
I've decided to call dwgfx/game/map/obj/key/help/music the "global args". Because they're essentially global variables that are being passed around in args. This commit removes global args from all functions on the Game class, and deals with updating the callsites of said functions accordingly. It also renames all usages of 'dwgfx' in Game.cpp to 'graphics', since the global variable is called 'graphics' now. Interesting to note, I was removing the class defines from Game.h, but it turns out that Graphics.h depends on the mapclass and entityclass defines from Game.h. And also Graphics.h spelled mapclass wrong (it forgot the "class") so I just decided to use that existing line instead. This is only temporary and after all is said and done, at the end of this pull request those class defines will be gone.
This commit is contained in:
@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
||||
map.bypos = map.ypos / 2;
|
||||
|
||||
//Moved screensetting init here from main menu V2.1
|
||||
game.loadstats(map, graphics);
|
||||
game.loadstats();
|
||||
if (game.skipfakeload)
|
||||
game.gamestate = TITLEMODE;
|
||||
if(game.usingmmmmmm==0) music.usingmmmmmm=false;
|
||||
@@ -500,7 +500,7 @@ int main(int argc, char *argv[])
|
||||
if (game.savemystats)
|
||||
{
|
||||
game.savemystats = false;
|
||||
game.savestats(map, graphics);
|
||||
game.savestats();
|
||||
}
|
||||
|
||||
//Mute button
|
||||
@@ -565,7 +565,7 @@ int main(int argc, char *argv[])
|
||||
//SDL_FreeSurface( gameScreen );
|
||||
|
||||
//Quit SDL
|
||||
game.savestats(map, graphics);
|
||||
game.savestats();
|
||||
NETWORK_shutdown();
|
||||
SDL_Quit();
|
||||
FILESYSTEM_deinit();
|
||||
|
||||
Reference in New Issue
Block a user