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