Remove duplicate screen configuration variables

There were some duplicate Screen configuration variables that were on
Game, when there didn't need to be.

 - game.fullScreenEffect_badSignal is a duplicate of
   graphics.screenbuffer->badSignalEffect
 - game.fullscreen is a duplicate of !graphics.screenbuffer->isWindowed
 - game.stretchMode is a duplicate of graphics.screenbuffer->stretchMode
 - game.useLinearFilter is a duplicate of
   graphics.screenbuffer->isFiltered

These duplicate variables have been removed now.

I put indentation when handling the ScreenSettings struct in main() so
the local doesn't live for the entirety of main() (which is the entirety
of the program).
This commit is contained in:
Misa
2020-11-12 16:45:51 -08:00
committed by Ethan Lee
parent af11f6936a
commit 40b7ddda05
6 changed files with 55 additions and 67 deletions

View File

@@ -385,7 +385,6 @@ void menuactionpress()
case 0:
music.playef(11);
graphics.screenbuffer->toggleFullScreen();
game.fullscreen = !game.fullscreen;
game.savestats();
// Recreate menu to update "resize to nearest"
@@ -395,7 +394,6 @@ void menuactionpress()
case 1:
music.playef(11);
graphics.screenbuffer->toggleStretchMode();
game.stretchMode = (game.stretchMode + 1) % 3;
game.savestats();
break;
case 2:
@@ -414,13 +412,11 @@ void menuactionpress()
case 3:
music.playef(11);
graphics.screenbuffer->toggleLinearFilter();
game.useLinearFilter = !game.useLinearFilter;
game.savestats();
break;
case 4:
//change smoothing
music.playef(11);
game.fullScreenEffect_badSignal = !game.fullScreenEffect_badSignal;
graphics.screenbuffer->badSignalEffect= !graphics.screenbuffer->badSignalEffect;
game.savestats();
break;