1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00

Remove global args from titlerender.cpp

This removes all global args in all functions in titlerender.cpp.
Additionally, all 'dwgfx' has been renamed to 'graphics' in that file
(there are a lot of them, as you might guess).
This commit is contained in:
Misa 2020-04-01 14:59:19 -07:00 committed by Ethan Lee
parent a1fd4c6f02
commit 07a0c74b01
4 changed files with 1034 additions and 1034 deletions

View File

@ -10,7 +10,7 @@
extern scriptclass script; extern scriptclass script;
// Found in titlerender.cpp // Found in titlerender.cpp
void updategraphicsmode(Game& game, Graphics& graphics); void updategraphicsmode();
void updatebuttonmappings(int bind) void updatebuttonmappings(int bind)
{ {
@ -510,7 +510,7 @@ SDL_assert(0 && "Remove open level dir");
music.playef(11, 10); music.playef(11, 10);
graphics.screenbuffer->toggleFullScreen(); graphics.screenbuffer->toggleFullScreen();
game.fullscreen = !game.fullscreen; game.fullscreen = !game.fullscreen;
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 0; game.currentmenuoption = 0;
@ -518,7 +518,7 @@ SDL_assert(0 && "Remove open level dir");
music.playef(11, 10); music.playef(11, 10);
graphics.screenbuffer->toggleStretchMode(); graphics.screenbuffer->toggleStretchMode();
game.stretchMode = (game.stretchMode + 1) % 3; game.stretchMode = (game.stretchMode + 1) % 3;
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 1; game.currentmenuoption = 1;
@ -526,7 +526,7 @@ SDL_assert(0 && "Remove open level dir");
music.playef(11, 10); music.playef(11, 10);
graphics.screenbuffer->toggleLinearFilter(); graphics.screenbuffer->toggleLinearFilter();
game.useLinearFilter = !game.useLinearFilter; game.useLinearFilter = !game.useLinearFilter;
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
game.currentmenuoption = 2; game.currentmenuoption = 2;
@ -535,7 +535,7 @@ SDL_assert(0 && "Remove open level dir");
music.playef(11, 10); music.playef(11, 10);
game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal; game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal;
//Hook the analogue thing in here: ABCDEFG //Hook the analogue thing in here: ABCDEFG
updategraphicsmode(game, graphics); updategraphicsmode();
graphics.screenbuffer->badSignalEffect= !graphics.screenbuffer->badSignalEffect; graphics.screenbuffer->badSignalEffect= !graphics.screenbuffer->badSignalEffect;
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -576,7 +576,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
} }
@ -588,10 +588,10 @@ SDL_assert(0 && "Remove open level dir");
if (game.fullscreen) if (game.fullscreen)
{ {
game.fullscreen = false; game.fullscreen = false;
updategraphicsmode(game, graphics); updategraphicsmode();
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -604,7 +604,7 @@ SDL_assert(0 && "Remove open level dir");
game.advanced_scaling = (game.advanced_scaling + 1) % 5; game.advanced_scaling = (game.advanced_scaling + 1) % 5;
graphics.screenbuffer->ResizeScreen(320 *game.advanced_scaling,240*game.advanced_scaling ); graphics.screenbuffer->ResizeScreen(320 *game.advanced_scaling,240*game.advanced_scaling );
graphics.screenbuffer->SetScale(game.advanced_scaling); graphics.screenbuffer->SetScale(game.advanced_scaling);
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -615,7 +615,7 @@ SDL_assert(0 && "Remove open level dir");
//change smoothing //change smoothing
music.playef(11, 10); music.playef(11, 10);
game.advanced_smoothing = !game.advanced_smoothing; game.advanced_smoothing = !game.advanced_smoothing;
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -644,7 +644,7 @@ SDL_assert(0 && "Remove open level dir");
{ {
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");
@ -657,10 +657,10 @@ SDL_assert(0 && "Remove open level dir");
if (game.fullscreen) if (game.fullscreen)
{ {
game.fullscreen = false; game.fullscreen = false;
updategraphicsmode(game, graphics); updategraphicsmode();
game.fullscreen = true; game.fullscreen = true;
} }
updategraphicsmode(game, graphics); updategraphicsmode();
game.savestats(); game.savestats();
game.createmenu("graphicoptions"); game.createmenu("graphicoptions");

View File

@ -374,7 +374,7 @@ int main(int argc, char *argv[])
//Input //Input
titleinput(); titleinput();
//Render //Render
titlerender(graphics, map, game, obj, help, music); titlerender();
////Logic ////Logic
titlelogic(); titlelogic();
break; break;
@ -390,7 +390,7 @@ int main(int argc, char *argv[])
//else //else
//{ //{
//} //}
towerrender(graphics, game, map, obj, help); towerrender();
towerlogic(); towerlogic();
} }
@ -410,14 +410,14 @@ int main(int argc, char *argv[])
gameinput(); gameinput();
//} //}
gamerender(graphics,map, game, obj, help); gamerender();
gamelogic(); gamelogic();
} }
break; break;
case MAPMODE: case MAPMODE:
maprender(graphics, game, map, obj, help); maprender();
if (game.recording == 1) if (game.recording == 1)
{ {
//recordinput(); //will implement this later if it's actually needed //recordinput(); //will implement this later if it's actually needed
@ -429,7 +429,7 @@ int main(int argc, char *argv[])
maplogic(); maplogic();
break; break;
case TELEPORTERMODE: case TELEPORTERMODE:
teleporterrender(graphics, game, map, obj, help); teleporterrender();
if (game.recording == 1) if (game.recording == 1)
{ {
//recordinput(); //recordinput();
@ -452,14 +452,14 @@ int main(int argc, char *argv[])
maplogic(); maplogic();
break; break;
case GAMECOMPLETE: case GAMECOMPLETE:
gamecompleterender(graphics, game, obj, help, map); gamecompleterender();
//Input //Input
gamecompleteinput(); gamecompleteinput();
//Logic //Logic
gamecompletelogic(); gamecompletelogic();
break; break;
case GAMECOMPLETE2: case GAMECOMPLETE2:
gamecompleterender2(graphics, game, obj, help); gamecompleterender2();
//Input //Input
gamecompleteinput2(); gamecompleteinput2();
//Logic //Logic

File diff suppressed because it is too large Load Diff

View File

@ -18,18 +18,18 @@ extern Stage stage;
extern Stage swfStage; extern Stage swfStage;
extern int temp; extern int temp;
void titlerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help, musicclass& music); void titlerender();
void towerrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); void towerrender();
void gamerender(Graphics& dwgfx, mapclass& map, Game& game, entityclass& obj, UtilityClass& help); void gamerender();
void maprender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); void maprender();
void teleporterrender(Graphics& dwgfx, Game& game, mapclass& map, entityclass& obj, UtilityClass& help); void teleporterrender();
void gamecompleterender(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help, mapclass& map); void gamecompleterender();
void gamecompleterender2(Graphics& dwgfx, Game& game, entityclass& obj, UtilityClass& help); void gamecompleterender2();
#endif /* TITLERENDERER_H */ #endif /* TITLERENDERER_H */