equal
deleted
inserted
replaced
8 #include "core/geometry_type.hpp" |
8 #include "core/geometry_type.hpp" |
9 #include "zoom_type.h" |
9 #include "zoom_type.h" |
10 #include "window_type.h" |
10 #include "window_type.h" |
11 #include "tile_type.h" |
11 #include "tile_type.h" |
12 |
12 |
|
13 /** |
|
14 * Data structure for viewport, display of a part of the world |
|
15 */ |
13 struct ViewPort { |
16 struct ViewPort { |
14 int left,top; // screen coordinates for the viewport |
17 int left; ///< Screen coordinate left egde of the viewport |
15 int width, height; // screen width/height for the viewport |
18 int top; ///< Screen coordinate top edge of the viewport |
|
19 int width; ///< Screen width of the viewport |
|
20 int height; ///< Screen height of the viewport |
16 |
21 |
17 int virtual_left, virtual_top; // virtual coordinates |
22 int virtual_left; ///< Virtual left coordinate |
18 int virtual_width, virtual_height; // these are just width << zoom, height << zoom |
23 int virtual_top; ///< Virtual top coordinate |
|
24 int virtual_width; ///< width << zoom |
|
25 int virtual_height; ///< height << zoom |
19 |
26 |
20 ZoomLevel zoom; |
27 ZoomLevel zoom; |
21 }; |
28 }; |
22 |
29 |
23 enum { |
30 enum { |
56 VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks) |
63 VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks) |
57 VHM_DRAG = 4, ///< dragging items in the depot windows |
64 VHM_DRAG = 4, ///< dragging items in the depot windows |
58 VHM_RAIL = 5, ///< rail pieces |
65 VHM_RAIL = 5, ///< rail pieces |
59 }; |
66 }; |
60 |
67 |
61 /* highlighting draw styles */ |
68 /** Highlighting draw styles */ |
62 enum HighLightStyle { |
69 enum HighLightStyle { |
63 HT_NONE = 0x00, |
70 HT_NONE = 0x00, |
64 HT_RECT = 0x80, |
71 HT_RECT = 0x80, |
65 HT_POINT = 0x40, |
72 HT_POINT = 0x40, |
66 HT_LINE = 0x20, ///< used for autorail highlighting (longer streches) |
73 HT_LINE = 0x20, ///< used for autorail highlighting (longer streches) |