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