OpenTTD
zoom_type.h
Go to the documentation of this file.
1 /* $Id: zoom_type.h 27134 2015-02-01 20:54:24Z frosch $ */
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 ZOOM_TYPE_H
13 #define ZOOM_TYPE_H
14 
15 #include "core/enum_type.hpp"
16 
17 static int const ZOOM_LVL_SHIFT = 2;
18 static int const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT;
19 
21 enum ZoomLevel {
22  /* Our possible zoom-levels */
31 
33 
34  /* Here we define in which zoom viewports are */
44 
46 
49 };
51 
52 
54 
55 extern ZoomLevelByte _gui_zoom;
56 #define ZOOM_LVL_GUI (_gui_zoom)
57 
58 #endif /* ZOOM_TYPE_H */
Minimum zoom level.
Definition: zoom_type.h:47
Default zoom level for the aircraft view.
Definition: zoom_type.h:39
Zoomed 2 times out.
Definition: zoom_type.h:25
Begin for iteration.
Definition: zoom_type.h:23
All zoomlevels below or equal to this, will result in details on the screen, like road-work...
Definition: zoom_type.h:45
End for iteration.
Definition: zoom_type.h:30
ZoomLevelByte _gui_zoom
GUI Zoom level.
Definition: gfx.cpp:60
Default zoom level for the ship view.
Definition: zoom_type.h:40
Default zoom level for the news messages.
Definition: zoom_type.h:36
Default zoom level for the road vehicle view.
Definition: zoom_type.h:42
Zoomed 32 times out.
Definition: zoom_type.h:29
Type (helpers) for enums.
Maximum zoom level.
Definition: zoom_type.h:48
Zoomed 4 times out.
Definition: zoom_type.h:26
Number of zoom levels.
Definition: zoom_type.h:32
Default zoom level for the industry view.
Definition: zoom_type.h:37
Zoomed 8 times out.
Definition: zoom_type.h:27
Default zoom level for the town view.
Definition: zoom_type.h:38
Default zoom level for the train view.
Definition: zoom_type.h:41
Default zoom level for viewports.
Definition: zoom_type.h:35
Template of struct holding enum types (on most archs, enums are stored in an int32).
Definition: enum_type.hpp:139
ZoomLevel
All zoom levels we know.
Definition: zoom_type.h:21
Zoomed 16 times out.
Definition: zoom_type.h:28
The normal zoom level.
Definition: zoom_type.h:24
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:16
Default zoom level for the world screen shot.
Definition: zoom_type.h:43