2005-07-24 15:12:37 +01:00
|
|
|
/* $Id$ */
|
2008-04-19 11:18:38 +01:00
|
|
|
|
2008-05-06 16:11:33 +01:00
|
|
|
/** @file openttd.h Some generic types. */
|
2005-07-24 15:12:37 +01:00
|
|
|
|
2005-07-15 22:28:26 +01:00
|
|
|
#ifndef OPENTTD_H
|
|
|
|
#define OPENTTD_H
|
2004-08-09 18:04:08 +01:00
|
|
|
|
2009-05-06 16:06:57 +01:00
|
|
|
#include "core/enum_type.hpp"
|
|
|
|
|
2009-02-25 00:14:46 +00:00
|
|
|
enum GameMode {
|
2007-12-22 23:30:28 +00:00
|
|
|
GM_MENU,
|
|
|
|
GM_NORMAL,
|
2009-02-25 00:14:46 +00:00
|
|
|
GM_EDITOR,
|
2007-12-22 23:30:28 +00:00
|
|
|
};
|
|
|
|
|
2009-02-25 00:45:52 +00:00
|
|
|
enum SwitchMode {
|
|
|
|
SM_NONE,
|
|
|
|
SM_NEWGAME,
|
|
|
|
SM_EDITOR,
|
|
|
|
SM_LOAD,
|
|
|
|
SM_MENU,
|
|
|
|
SM_SAVE,
|
|
|
|
SM_GENRANDLAND,
|
|
|
|
SM_LOAD_SCENARIO,
|
|
|
|
SM_START_SCENARIO,
|
|
|
|
SM_START_HEIGHTMAP,
|
|
|
|
SM_LOAD_HEIGHTMAP,
|
2004-08-09 18:04:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Display Options */
|
|
|
|
enum {
|
2007-05-07 12:24:23 +01:00
|
|
|
DO_SHOW_TOWN_NAMES = 0,
|
|
|
|
DO_SHOW_STATION_NAMES = 1,
|
|
|
|
DO_SHOW_SIGNS = 2,
|
|
|
|
DO_FULL_ANIMATION = 3,
|
|
|
|
DO_FULL_DETAIL = 5,
|
|
|
|
DO_WAYPOINTS = 6,
|
2007-04-05 08:49:04 +01:00
|
|
|
};
|
|
|
|
|
2009-02-25 00:14:46 +00:00
|
|
|
extern GameMode _game_mode;
|
2009-02-25 00:45:52 +00:00
|
|
|
extern SwitchMode _switch_mode;
|
2007-12-22 23:30:28 +00:00
|
|
|
extern bool _exit_game;
|
2009-05-06 16:06:57 +01:00
|
|
|
|
|
|
|
/** 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;
|
2007-12-22 23:30:28 +00:00
|
|
|
|
2005-07-15 22:28:26 +01:00
|
|
|
#endif /* OPENTTD_H */
|