OpenTTD
viewport_type.h
Go to the documentation of this file.
1 /* $Id: viewport_type.h 25264 2013-05-19 14:49:25Z 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 VIEWPORT_TYPE_H
13 #define VIEWPORT_TYPE_H
14 
15 #include "zoom_type.h"
16 #include "strings_type.h"
17 
18 class LinkGraphOverlay;
19 
23 struct ViewPort {
24  int left;
25  int top;
26  int width;
27  int height;
28 
33 
35  LinkGraphOverlay *overlay;
36 };
37 
40  VPSM_LEFT = 1,
41  VPSM_RIGHT = 1,
42  VPSM_TOP = 1,
44 };
45 
47 struct ViewportSign {
48  int32 center;
49  int32 top;
50  uint16 width_normal;
51  uint16 width_small;
52 
53  void UpdatePosition(int center, int top, StringID str);
54  void MarkDirty(ZoomLevel maxzoom = ZOOM_LVL_MAX) const;
55 };
56 
62  ZOOM_IN = 0,
63  ZOOM_OUT = 1,
64  ZOOM_NONE = 2,
65 };
66 
73 static const uint BB_HEIGHT_UNDER_BRIDGE = 6;
74 static const uint BB_Z_SEPARATOR = 7;
75 
78  VPM_X_OR_Y = 0,
79  VPM_FIX_X = 1,
80  VPM_FIX_Y = 2,
87  VPM_RAILDIRS = 0x40,
88  VPM_SIGNALDIRS = 0x80,
89 };
91 
92 
107 
108  /* Rail specific actions */
114 
115  /* Road specific actions */
123 };
124 
125 #endif /* VIEWPORT_TYPE_H */