OpenTTD
openttd.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * 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.
4  * 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.
5  * 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/>.
6  */
7 
10 #ifndef OPENTTD_H
11 #define OPENTTD_H
12 
13 #include "core/enum_type.hpp"
14 
16 enum GameMode {
17  GM_MENU,
18  GM_NORMAL,
19  GM_EDITOR,
20  GM_BOOTSTRAP
21 };
22 
24 enum SwitchMode {
25  SM_NONE,
37 };
38 
48 };
49 
50 extern GameMode _game_mode;
52 extern bool _exit_game;
53 
55 enum PauseMode : byte {
57  PM_PAUSED_NORMAL = 1 << 0,
58  PM_PAUSED_SAVELOAD = 1 << 1,
59  PM_PAUSED_JOIN = 1 << 2,
60  PM_PAUSED_ERROR = 1 << 3,
63 
66 };
68 
69 
70 extern PauseMode _pause_mode;
71 
72 void AskExitGame();
73 void AskExitToGameMenu();
74 
75 int openttd_main(int argc, char *argv[]);
76 void HandleExitGameRequest();
77 
78 void SwitchToMode(SwitchMode new_mode);
79 
80 #endif /* OPENTTD_H */
A game paused for &#39;min_active_clients&#39;.
Definition: openttd.h:61
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
DisplayOptions
Display Options.
Definition: openttd.h:40
Load heightmap from scenario editor.
Definition: openttd.h:36
Display waypoint names.
Definition: openttd.h:46
Switch to game intro menu.
Definition: openttd.h:30
Load game, Play Scenario.
Definition: openttd.h:29
Display station names.
Definition: openttd.h:42
Display town names.
Definition: openttd.h:41
Display signs, station names and waypoint names of opponent companies. Buoys and oilrig-stations are ...
Definition: openttd.h:47
Also draw details of track and roads.
Definition: openttd.h:45
Type (helpers) for enums.
Display signs.
Definition: openttd.h:43
Load a heightmap and start a new game from it.
Definition: openttd.h:35
Switch to scenario editor.
Definition: openttd.h:28
A normal unpaused game.
Definition: openttd.h:56
GameMode
Mode which defines the state of the game.
Definition: openttd.h:16
A game paused for saving/loading.
Definition: openttd.h:58
int openttd_main(int argc, char *argv[])
Main entry point for this lovely game.
Definition: openttd.cpp:533
SwitchMode _switch_mode
The next mainloop command.
Definition: gfx.cpp:46
A game normally paused.
Definition: openttd.h:57
PauseMode
Modes of pausing we&#39;ve got.
Definition: openttd.h:55
Save game.
Definition: openttd.h:31
Restart –> &#39;Random game&#39; with current settings.
Definition: openttd.h:27
Pause mode bits when paused for network reasons.
Definition: openttd.h:65
Perform palette animation.
Definition: openttd.h:44
Load scenario from scenario editor.
Definition: openttd.h:34
PauseMode _pause_mode
The current pause mode.
Definition: gfx.cpp:47
A game paused by a game script.
Definition: openttd.h:62
Generate random land within scenario editor.
Definition: openttd.h:33
A game paused for &#39;pause_on_join&#39;.
Definition: openttd.h:59
New Game –> &#39;Random game&#39;.
Definition: openttd.h:26
A game paused because a (critical) error.
Definition: openttd.h:60
SwitchMode
Mode which defines what mode we&#39;re switching to.
Definition: openttd.h:24
Save heightmap.
Definition: openttd.h:32