Changeset - r23680:22892a275fd4
[Not reviewed]
master
0 4 0
Charles Pigott - 5 years ago 2019-04-22 12:14:46
charlespigott@googlemail.com
Codechange: Remove PauseModeByte
4 files changed with 6 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -46,7 +46,7 @@ bool _screen_disable_anim = false;   ///
 
bool _exit_game;
 
GameMode _game_mode;
 
SwitchMode _switch_mode;  ///< The next mainloop command.
 
PauseModeByte _pause_mode;
 
PauseMode _pause_mode;
 
Palette _cur_palette;
 

	
 
static byte _stringwidth_table[FS_END][224]; ///< Cache containing width of often used characters. @see GetCharacterWidth()
src/misc_cmd.cpp
Show inline comments
 
@@ -173,9 +173,9 @@ CommandCost CmdPause(TileIndex tile, DoC
 
			PauseMode prev_mode = _pause_mode;
 

	
 
			if (p2 == 0) {
 
				_pause_mode = _pause_mode & ~p1;
 
				_pause_mode = static_cast<PauseMode>(_pause_mode & (byte)~p1);
 
			} else {
 
				_pause_mode = _pause_mode | p1;
 
				_pause_mode = static_cast<PauseMode>(_pause_mode | (byte)p1);
 
			}
 

	
 
			NetworkHandlePauseChange(prev_mode, (PauseMode)p1);
src/openttd.h
Show inline comments
 
@@ -54,7 +54,7 @@ extern SwitchMode _switch_mode;
 
extern bool _exit_game;
 

	
 
/** Modes of pausing we've got */
 
enum PauseMode {
 
enum PauseMode : byte {
 
	PM_UNPAUSED              = 0,      ///< A normal unpaused game
 
	PM_PAUSED_NORMAL         = 1 << 0, ///< A game normally paused
 
	PM_PAUSED_SAVELOAD       = 1 << 1, ///< A game paused for saving/loading
 
@@ -67,10 +67,9 @@ enum PauseMode {
 
	PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN,
 
};
 
DECLARE_ENUM_AS_BIT_SET(PauseMode)
 
typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte;
 

	
 
/** The current pause mode */
 
extern PauseModeByte _pause_mode;
 
extern PauseMode _pause_mode;
 

	
 
void AskExitGame();
 
void AskExitToGameMenu();
src/saveload/oldloader.cpp
Show inline comments
 
@@ -314,7 +314,7 @@ bool LoadOldSaveGame(const char *file)
 
		return false;
 
	}
 

	
 
	_pause_mode = 2;
 
	_pause_mode = PM_PAUSED_SAVELOAD;
 

	
 
	return true;
 
}
0 comments (0 inline, 0 general)