author | rubidium |
Wed, 07 May 2008 13:18:33 +0000 | |
changeset 9129 | a7b713cb0422 |
parent 9127 | 14f21c5954ee |
child 9147 | d9ec5ed630ff |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
8224
c5a64d87cc54
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8138
diff
changeset
|
3 |
/** @file viewport_type.h Types related to viewports. */ |
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6248
diff
changeset
|
4 |
|
8224
c5a64d87cc54
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8138
diff
changeset
|
5 |
#ifndef VIEWPORT_TYPE_H |
c5a64d87cc54
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8138
diff
changeset
|
6 |
#define VIEWPORT_TYPE_H |
0 | 7 |
|
8123
ce31d2843a95
(svn r11684) -Codechange: split gfx.h in a type and functional header.
rubidium
parents:
8121
diff
changeset
|
8 |
#include "zoom_type.h" |
6624
880e29b1f25e
(svn r9844) -Codechange: replace zoomlevel with an enum
truelight
parents:
6423
diff
changeset
|
9 |
|
8857
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
10 |
/** |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
11 |
* Data structure for viewport, display of a part of the world |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
12 |
*/ |
0 | 13 |
struct ViewPort { |
8857
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
14 |
int left; ///< Screen coordinate left egde of the viewport |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
15 |
int top; ///< Screen coordinate top edge of the viewport |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
16 |
int width; ///< Screen width of the viewport |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
17 |
int height; ///< Screen height of the viewport |
0 | 18 |
|
8857
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
19 |
int virtual_left; ///< Virtual left coordinate |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
20 |
int virtual_top; ///< Virtual top coordinate |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
21 |
int virtual_width; ///< width << zoom |
7593af4962e6
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8225
diff
changeset
|
22 |
int virtual_height; ///< height << zoom |
0 | 23 |
|
6624
880e29b1f25e
(svn r9844) -Codechange: replace zoomlevel with an enum
truelight
parents:
6423
diff
changeset
|
24 |
ZoomLevel zoom; |
0 | 25 |
}; |
26 |
||
9129
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
27 |
struct ViewportSign { |
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
28 |
int32 left; |
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
29 |
int32 top; |
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
30 |
byte width_1, width_2; |
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
31 |
}; |
a7b713cb0422
(svn r12989) -Codechange: move ViewportSign to viewport_type.h.
rubidium
parents:
9127
diff
changeset
|
32 |
|
5044
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
33 |
enum { |
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
34 |
ZOOM_IN = 0, |
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
35 |
ZOOM_OUT = 1, |
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
36 |
ZOOM_NONE = 2, // hack, used to update the button status |
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
37 |
}; |
e4e5bcdd79c6
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
38 |
|
7601
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
39 |
/** |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
40 |
* Some values for constructing bounding boxes (BB). The Z positions under bridges are: |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
41 |
* z=0..5 Everything that can be built under low bridges. |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
42 |
* z=6 reserved, currently unused. |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
43 |
* z=7 Z separator between bridge/tunnel and the things under/above it. |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
44 |
*/ |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
45 |
enum { |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
46 |
BB_HEIGHT_UNDER_BRIDGE = 6, ///< Everything that can be built under low bridges, must not exceed this Z height. |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
47 |
BB_Z_SEPARATOR = 7, ///< Separates the bridge/tunnel from the things under/above it. |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
48 |
}; |
988040ee27f4
(svn r11128) -Fix: a lot of graphical glitches by changing some bounding boxes. It's not perfect yet, but a *very* good step into the right direction. Patch by frosch.
rubidium
parents:
7580
diff
changeset
|
49 |
|
7888
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
50 |
/** Viewport place method (type of highlighted area and placed objects) */ |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
51 |
enum ViewportPlaceMethod { |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
52 |
VPM_X_OR_Y = 0, ///< drag in X or Y direction |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
53 |
VPM_FIX_X = 1, ///< drag only in X axis |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
54 |
VPM_FIX_Y = 2, ///< drag only in Y axis |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
55 |
VPM_RAILDIRS = 3, ///< all rail directions |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
56 |
VPM_X_AND_Y = 4, ///< area of land in X and Y directions |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
57 |
VPM_X_AND_Y_LIMITED = 5, ///< area of land of limited size |
a28f4cfff934
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
7681
diff
changeset
|
58 |
VPM_SIGNALDIRS = 6, ///< similiar to VMP_RAILDIRS, but with different cursor |
1070
bd31ed783fd3
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
59 |
}; |
bd31ed783fd3
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
60 |
|
8224
c5a64d87cc54
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8138
diff
changeset
|
61 |
#endif /* VIEWPORT_TYPE_H */ |