# openttd.h

Go to the documentation of this file.

    00001 /* $Id$ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #ifndef OPENTTD_H
    00013 #define OPENTTD_H
    00014
    00015 #include "core/enum_type.hpp"
    00016
    00017 enum GameMode {
    00018   GM_MENU,
    00019   GM_NORMAL,
    00020   GM_EDITOR,
    00021 };
    00022
    00023 enum SwitchMode {
    00024   SM_NONE,
    00025   SM_NEWGAME,
    00026   SM_RESTARTGAME,
    00027   SM_EDITOR,
    00028   SM_LOAD,
    00029   SM_MENU,
    00030   SM_SAVE,
    00031   SM_GENRANDLAND,
    00032   SM_LOAD_SCENARIO,
    00033   SM_START_SCENARIO,
    00034   SM_START_HEIGHTMAP,
    00035   SM_LOAD_HEIGHTMAP,
    00036 };
    00037
    00038 /* Display Options */
    00039 enum {
    00040   DO_SHOW_TOWN_NAMES     = 0,
    00041   DO_SHOW_STATION_NAMES  = 1,
    00042   DO_SHOW_SIGNS          = 2,
    00043   DO_FULL_ANIMATION      = 3,
    00044   DO_FULL_DETAIL         = 5,
    00045   DO_SHOW_WAYPOINT_NAMES = 6,
    00046 };
    00047
    00048 extern GameMode _game_mode;
    00049 extern SwitchMode _switch_mode;
    00050 extern bool _exit_game;
    00051
    00053 enum PauseMode {
    00054   PM_UNPAUSED              = 0,
    00055   PM_PAUSED_NORMAL         = 1 << 0,
    00056   PM_PAUSED_SAVELOAD       = 1 << 1,
    00057   PM_PAUSED_JOIN           = 1 << 2,
    00058   PM_PAUSED_ERROR          = 1 << 3,
    00059   PM_PAUSED_ACTIVE_CLIENTS = 1 << 4,
    00060
    00061   /* Pause mode bits when paused for network reasons */
    00062   PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN,
    00063 };
    00064 DECLARE_ENUM_AS_BIT_SET(PauseMode);
    00065 typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte;
    00066
    00068 extern PauseModeByte _pause_mode;
    00069
    00070 #endif /* OPENTTD_H */