author | peter1138 |
Tue, 22 Jan 2008 07:27:06 +0000 | |
changeset 8374 | 7a1b6c89cb89 |
parent 8127 | a20f557b7081 |
child 9077 | 1ac587da1d58 |
permissions | -rw-r--r-- |
8121
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
1 |
/* $Id$ */ |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
2 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
3 |
/** @file geometry_type.hpp All geometry types in OpenTTD. */ |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
4 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
5 |
#ifndef GEOMETRY_TYPE_HPP |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
6 |
#define GEOMETRY_TYPE_HPP |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
7 |
|
8126
c96febd50363
(svn r11687) -Codechange: move some defines to a better place
skidd13
parents:
8121
diff
changeset
|
8 |
#if defined(__AMIGA__) |
c96febd50363
(svn r11687) -Codechange: move some defines to a better place
skidd13
parents:
8121
diff
changeset
|
9 |
/* AmigaOS already has a Point declared */ |
c96febd50363
(svn r11687) -Codechange: move some defines to a better place
skidd13
parents:
8121
diff
changeset
|
10 |
#define Point OTTD_Point |
c96febd50363
(svn r11687) -Codechange: move some defines to a better place
skidd13
parents:
8121
diff
changeset
|
11 |
#endif /* __AMIGA__ */ |
c96febd50363
(svn r11687) -Codechange: move some defines to a better place
skidd13
parents:
8121
diff
changeset
|
12 |
|
8127
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
13 |
#if defined(__APPLE__) |
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
14 |
/* Mac OS X already has both Rect and Point declared */ |
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
15 |
#define Rect OTTD_Rect |
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
16 |
#define Point OTTD_Point |
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
17 |
#endif /* __APPLE__ */ |
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
18 |
|
a20f557b7081
(svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again.
egladil
parents:
8126
diff
changeset
|
19 |
|
8121
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
20 |
struct Point { |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
21 |
int x; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
22 |
int y; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
23 |
}; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
24 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
25 |
struct Dimension { |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
26 |
int width; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
27 |
int height; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
28 |
}; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
29 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
30 |
struct Rect { |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
31 |
int left; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
32 |
int top; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
33 |
int right; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
34 |
int bottom; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
35 |
}; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
36 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
37 |
struct PointDimension { |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
38 |
int x; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
39 |
int y; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
40 |
int width; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
41 |
int height; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
42 |
}; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
43 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
44 |
struct Pair { |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
45 |
int a; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
46 |
int b; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
47 |
}; |
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
48 |
|
3bc6351e7369
(svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type.
rubidium
parents:
diff
changeset
|
49 |
#endif /* GEOMETRY_TYPE_HPP */ |