OpenTTD
zoom_type.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 ZOOM_TYPE_H
13 #define ZOOM_TYPE_H
14 
15 #include "core/enum_type.hpp"
16 
17 static uint const ZOOM_LVL_SHIFT = 2;
18 static uint const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT;
19 
21 enum ZoomLevel : byte {
22  /* Our possible zoom-levels */
31 
33 
34  /* Here we define in which zoom viewports are */
44 
46 
49 
50 };
52 
53 extern ZoomLevel _gui_zoom;
54 extern ZoomLevel _font_zoom;
55 #define ZOOM_LVL_GUI (_gui_zoom)
56 #define ZOOM_LVL_FONT (_font_zoom)
57 
58 #endif /* ZOOM_TYPE_H */
ZoomLevel _gui_zoom
GUI Zoom level.
Definition: gfx.cpp:61
ZoomLevel _font_zoom
Font Zoom level.
Definition: gfx.cpp:62
Zoomed 2 times out.
Definition: zoom_type.h:25
End for iteration.
Definition: zoom_type.h:30
Zoomed 16 times out.
Definition: zoom_type.h:28
Minimum zoom level.
Definition: zoom_type.h:47
Number of zoom levels.
Definition: zoom_type.h:32
Maximum zoom level.
Definition: zoom_type.h:48
Type (helpers) for enums.
Default zoom level for the aircraft view.
Definition: zoom_type.h:39
Begin for iteration.
Definition: zoom_type.h:23
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 ship view.
Definition: zoom_type.h:40
Default zoom level for the world screen shot.
Definition: zoom_type.h:43
All zoomlevels below or equal to this, will result in details on the screen, like road-work...
Definition: zoom_type.h:45
Default zoom level for the industry view.
Definition: zoom_type.h:37
Default zoom level for the road vehicle view.
Definition: zoom_type.h:42
Default zoom level for viewports.
Definition: zoom_type.h:35
Zoomed 32 times out.
Definition: zoom_type.h:29
The normal zoom level.
Definition: zoom_type.h:24
ZoomLevel
All zoom levels we know.
Definition: zoom_type.h:21
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:16
Zoomed 4 times out.
Definition: zoom_type.h:26
Default zoom level for the train view.
Definition: zoom_type.h:41
Default zoom level for the news messages.
Definition: zoom_type.h:36