OpenTTD: src/core/geometry_type.hpp Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

geometry_type.hpp
Go to the documentation of this file.
1 /* $Id: geometry_type.hpp 17248 2009-08-21 20:21:05Z 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 GEOMETRY_TYPE_HPP
13 #define GEOMETRY_TYPE_HPP
14
15 #if defined(__AMIGA__)
16 /* AmigaOS already has a Point declared */
17 #define Point OTTD_Point
18 #endif /* __AMIGA__ */
19
20 #if defined(__APPLE__)
21 /* Mac OS X already has both Rect and Point declared */
22 #define Rect OTTD_Rect
23 #define Point OTTD_Point
24 #endif /* __APPLE__ */
25
26
28 struct Point {
29 int x;
30 int y;
31 };
32
34 struct Dimension {
35 uint width;
36 uint height;
37 };
38
40 struct Rect {
41 int left;
42 int top;
43 int right;
44 int bottom;
45 };
46
51 struct PointDimension {
52 int x;
53 int y;
54 int width;
55 int height;
56 };
57
59 struct Pair {
60 int a;
61 int b;
62 };
63
64 #endif /* GEOMETRY_TYPE_HPP */