OpenTTD
openttd.h
Go to the documentation of this file.
1 /* $Id: openttd.h 25506 2013-06-28 21:11:35Z rubidium $ */
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 {
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 };
71 
73 extern PauseModeByte _pause_mode;
74 
75 void AskExitGame();
76 void AskExitToGameMenu();
77 
78 int openttd_main(int argc, char *argv[]);
79 void HandleExitGameRequest();
80 
81 void SwitchToMode(SwitchMode new_mode);
82 
83 #endif /* OPENTTD_H */