diff options
author | rubidium <rubidium@openttd.org> | 2009-05-06 15:06:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-06 15:06:57 +0000 |
commit | 2664f2a2d95dbc2122ff1f9b96e8569ae401892f (patch) | |
tree | fb2112ce7a51edd259190186790bf00319a53510 /src/openttd.h | |
parent | bb121a1510fbd3faea71b794b1f6bdaba1641665 (diff) | |
download | openttd-2664f2a2d95dbc2122ff1f9b96e8569ae401892f.tar.xz |
(svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
Diffstat (limited to 'src/openttd.h')
-rw-r--r-- | src/openttd.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/openttd.h b/src/openttd.h index d3cc1bb1e..c8d22b03c 100644 --- a/src/openttd.h +++ b/src/openttd.h @@ -5,6 +5,8 @@ #ifndef OPENTTD_H #define OPENTTD_H +#include "core/enum_type.hpp" + enum GameMode { GM_MENU, GM_NORMAL, @@ -38,6 +40,19 @@ enum { extern GameMode _game_mode; extern SwitchMode _switch_mode; extern bool _exit_game; -extern int8 _pause_game; + +/** Modes of pausing we've got */ +enum PauseMode { + 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 + PM_PAUSED_JOIN = 1 << 2, ///< A game paused for 'pause on join' + PM_PAUSED_ERROR = 1 << 3, ///< A game paused because a (critical) error +}; +DECLARE_ENUM_AS_BIT_SET(PauseMode); +typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte; + +/** The current pause mode */ +extern PauseModeByte _pause_mode; #endif /* OPENTTD_H */ |