15 byte zoom; |
17 byte zoom; |
16 }; |
18 }; |
17 |
19 |
18 void SetSelectionRed(bool); |
20 void SetSelectionRed(bool); |
19 |
21 |
20 /* viewport.c */ |
22 /* viewport.cpp */ |
21 void InitViewports(); |
23 void InitViewports(); |
22 void DeleteWindowViewport(BaseWindow *w); |
24 void DeleteWindowViewport(BaseWindow *w); |
23 void AssignWindowViewport(BaseWindow *w, int x, int y, |
25 void AssignWindowViewport(BaseWindow *w, int x, int y, |
24 int width, int height, uint32 follow_flags, byte zoom); |
26 int width, int height, uint32 follow_flags, byte zoom); |
25 ViewPort *IsPtInWindowViewport(const BaseWindow *w, int x, int y); |
27 ViewPort *IsPtInWindowViewport(const BaseWindow *w, int x, int y); |
74 VPM_X_AND_Y = 4, |
76 VPM_X_AND_Y = 4, |
75 VPM_X_AND_Y_LIMITED = 5, |
77 VPM_X_AND_Y_LIMITED = 5, |
76 VPM_SIGNALDIRS = 6 |
78 VPM_SIGNALDIRS = 6 |
77 }; |
79 }; |
78 |
80 |
79 // viewport highlight mode (for highlighting tiles below cursor) |
81 /* viewport highlight mode (for highlighting tiles below cursor) */ |
80 enum { |
82 enum { |
81 VHM_NONE = 0, // default |
83 VHM_NONE = 0, ///< default |
82 VHM_RECT = 1, // rectangle (stations, depots, ...) |
84 VHM_RECT = 1, ///< rectangle (stations, depots, ...) |
83 VHM_POINT = 2, // point (lower land, raise land, level land, ...) |
85 VHM_POINT = 2, ///< point (lower land, raise land, level land, ...) |
84 VHM_SPECIAL = 3, // special mode used for highlighting while dragging (and for tunnels/docks) |
86 VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks) |
85 VHM_DRAG = 4, // dragging items in the depot windows |
87 VHM_DRAG = 4, ///< dragging items in the depot windows |
86 VHM_RAIL = 5, // rail pieces |
88 VHM_RAIL = 5, ///< rail pieces |
87 }; |
89 }; |
88 |
90 |
89 void VpSelectTilesWithMethod(int x, int y, int method); |
91 void VpSelectTilesWithMethod(int x, int y, int method); |
90 |
92 |
91 // highlighting draw styles |
93 /* highlighting draw styles */ |
92 typedef byte HighLightStyle; |
94 typedef byte HighLightStyle; |
93 enum HighLightStyles { |
95 enum HighLightStyles { |
94 HT_NONE = 0x00, |
96 HT_NONE = 0x00, |
95 HT_RECT = 0x80, |
97 HT_RECT = 0x80, |
96 HT_POINT = 0x40, |
98 HT_POINT = 0x40, |
97 HT_LINE = 0x20, /* used for autorail highlighting (longer streches) |
99 HT_LINE = 0x20, ///< used for autorail highlighting (longer streches) |
98 * (uses lower bits to indicate direction) */ |
100 ///< (uses lower bits to indicate direction) |
99 HT_RAIL = 0x10, /* autorail (one piece) |
101 HT_RAIL = 0x10, ///< autorail (one piece) |
100 * (uses lower bits to indicate direction) */ |
102 ///< (uses lower bits to indicate direction) |
101 HT_DRAG_MASK = 0xF0, ///< masks the drag-type |
103 HT_DRAG_MASK = 0xF0, ///< masks the drag-type |
102 |
104 |
103 /* lower bits (used with HT_LINE and HT_RAIL): |
105 /* lower bits (used with HT_LINE and HT_RAIL): |
104 * (see ASCII art in autorail.h for a visual interpretation) */ |
106 * (see ASCII art in autorail.h for a visual interpretation) */ |
105 HT_DIR_X = 0, ///< X direction |
107 HT_DIR_X = 0, ///< X direction |