author | rubidium |
Sat, 06 Oct 2007 21:16:00 +0000 | |
branch | NewGRF_ports |
changeset 6870 | ca3fd1fbe311 |
parent 6812 | 35bd847c2aba |
child 6871 | 5a9dc001e1ad |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
3 |
/** @file viewport.h */ |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
4 |
|
0 | 5 |
#ifndef VIEWPORT_H |
6 |
#define VIEWPORT_H |
|
7 |
||
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
8 |
#include "zoom.hpp" |
6807
436fc766fc34
(svn r10881) [NewGRF_ports] -Feature: Adds irregular highlight to airport placement based on the FSMportLayout data. You can now see where the holes should be!
richk
parents:
6743
diff
changeset
|
9 |
#include "newgrf_fsmports.h" |
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
10 |
|
0 | 11 |
struct ViewPort { |
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
12 |
int left,top; // screen coordinates for the viewport |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
13 |
int width, height; // screen width/height for the viewport |
0 | 14 |
|
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
15 |
int virtual_left, virtual_top; // virtual coordinates |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
16 |
int virtual_width, virtual_height; // these are just width << zoom, height << zoom |
0 | 17 |
|
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
18 |
ZoomLevel zoom; |
0 | 19 |
}; |
20 |
||
1990
90eb49e87b90
(svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the selection wasn't correctly redrawn
tron
parents:
1977
diff
changeset
|
21 |
void SetSelectionRed(bool); |
90eb49e87b90
(svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the selection wasn't correctly redrawn
tron
parents:
1977
diff
changeset
|
22 |
|
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
23 |
/* viewport.cpp */ |
6573 | 24 |
void InitViewports(); |
5122
a68d16b055fa
(svn r7202) -Codechange: Move _viewports and _active_viewports local to viewport.c and have them
Darkvater
parents:
5046
diff
changeset
|
25 |
void DeleteWindowViewport(Window *w); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
152
diff
changeset
|
26 |
void AssignWindowViewport(Window *w, int x, int y, |
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
27 |
int width, int height, uint32 follow_flags, ZoomLevel zoom); |
2116 | 28 |
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y); |
6573 | 29 |
Point GetTileBelowCursor(); |
5044
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
30 |
void UpdateViewportPosition(Window *w); |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
31 |
|
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
32 |
enum { |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
33 |
ZOOM_IN = 0, |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
34 |
ZOOM_OUT = 1, |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
35 |
ZOOM_NONE = 2, // hack, used to update the button status |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
36 |
}; |
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
37 |
|
7e70387677e5
(svn r7093) -Codechange: Move DoZoomInOutWindow declaration to viewport.h and rewrite the function
Darkvater
parents:
5026
diff
changeset
|
38 |
bool DoZoomInOutWindow(int how, Window *w); |
152
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
133
diff
changeset
|
39 |
void ZoomInOrOutToCursorWindow(bool in, Window * w); |
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
133
diff
changeset
|
40 |
Point GetTileZoomCenterWindow(bool in, Window * w); |
5045
3e734e178dae
(svn r7094) -Codechange: Get rid of the window-specific code in DoZoomInOutWindow (enable, disable
Darkvater
parents:
5044
diff
changeset
|
41 |
void HandleZoomMessage(Window *w, const ViewPort *vp, byte widget_zoom_in, byte widget_zoom_out); |
0 | 42 |
|
5046
2b2375affc0a
(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it to MaxZoomInOut
Darkvater
parents:
5045
diff
changeset
|
43 |
static inline void MaxZoomInOut(int how, Window *w) |
2b2375affc0a
(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it to MaxZoomInOut
Darkvater
parents:
5045
diff
changeset
|
44 |
{ |
6743
cabfaa4a0295
(svn r10766) [NewGRF_ports] -Sync: with trunk r10651-10765
richk
parents:
6720
diff
changeset
|
45 |
while (DoZoomInOutWindow(how, w)) {}; |
5046
2b2375affc0a
(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it to MaxZoomInOut
Darkvater
parents:
5045
diff
changeset
|
46 |
} |
2b2375affc0a
(svn r7095) -Codechange: Move MaxZoomIn function to viewport.h and change it to MaxZoomInOut
Darkvater
parents:
5045
diff
changeset
|
47 |
|
6870
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
48 |
/** |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
49 |
* Some values for constructing bounding boxes (BB). The Z positions under bridges are: |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
50 |
* z=0..5 Everything that can be built under low bridges. |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
51 |
* z=6 reserved, currently unused. |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
52 |
* z=7 Z separator between bridge/tunnel and the things under/above it. |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
53 |
*/ |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
54 |
enum { |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
55 |
BB_HEIGHT_UNDER_BRIDGE = 6, ///< Everything that can be built under low bridges, must not exceed this Z height. |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
56 |
BB_Z_SEPARATOR = 7, ///< Separates the bridge/tunnel from the things under/above it. |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
57 |
}; |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
58 |
|
0 | 59 |
void OffsetGroundSprite(int x, int y); |
60 |
||
6870
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
61 |
void DrawGroundSprite(SpriteID image, SpriteID pal, const SubSprite *sub = NULL); |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
62 |
void DrawGroundSpriteAt(SpriteID image, SpriteID pal, int32 x, int32 y, byte z, const SubSprite *sub = NULL); |
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
63 |
void AddSortableSpriteToDraw(SpriteID image, SpriteID pal, int x, int y, int w, int h, int dz, int z, bool transparent = false, int bb_offset_x = 0, int bb_offset_y = 0, int bb_offset_z = 0, const SubSprite *sub = NULL); |
6720
35756db7e577
(svn r10560) [NewGRF_ports] -Sync: with trunk r10027-10559
richk
parents:
6719
diff
changeset
|
64 |
void *AddStringToDraw(int x, int y, StringID string, uint64 params_1, uint64 params_2); |
6870
ca3fd1fbe311
(svn r11219) [NewGRF_ports] -Sync: with trunk r11035:11218.
rubidium
parents:
6812
diff
changeset
|
65 |
void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y, bool transparent = false, const SubSprite *sub = NULL); |
0 | 66 |
|
67 |
||
6573 | 68 |
void StartSpriteCombine(); |
69 |
void EndSpriteCombine(); |
|
0 | 70 |
|
2116 | 71 |
void HandleViewportClicked(const ViewPort *vp, int x, int y); |
6573 | 72 |
void PlaceObject(); |
0 | 73 |
void SetRedErrorSquare(TileIndex tile); |
74 |
void SetTileSelectSize(int w, int h); |
|
75 |
void SetTileSelectBigSize(int ox, int oy, int sx, int sy); |
|
76 |
||
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
77 |
void VpStartPlaceSizing(TileIndex tile, byte method, byte process); |
0 | 78 |
void VpSetPresizeRange(uint from, uint to); |
79 |
void VpSetPlaceSizingLimit(int limit); |
|
80 |
||
6573 | 81 |
Vehicle *CheckMouseOverVehicle(); |
0 | 82 |
|
83 |
enum { |
|
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
84 |
VPM_X_OR_Y = 0, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
85 |
VPM_FIX_X = 1, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
86 |
VPM_FIX_Y = 2, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
87 |
VPM_RAILDIRS = 3, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
88 |
VPM_X_AND_Y = 4, |
0 | 89 |
VPM_X_AND_Y_LIMITED = 5, |
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
90 |
VPM_SIGNALDIRS = 6 |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
91 |
}; |
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
92 |
|
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
93 |
/* viewport highlight mode (for highlighting tiles below cursor) */ |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
94 |
enum { |
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
95 |
VHM_NONE = 0, ///< default |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
96 |
VHM_RECT = 1, ///< rectangle (stations, depots, ...) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
97 |
VHM_POINT = 2, ///< point (lower land, raise land, level land, ...) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
98 |
VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
99 |
VHM_DRAG = 4, ///< dragging items in the depot windows |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
100 |
VHM_RAIL = 5, ///< rail pieces |
0 | 101 |
}; |
102 |
||
103 |
void VpSelectTilesWithMethod(int x, int y, int method); |
|
104 |
||
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
105 |
/* highlighting draw styles */ |
4799
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
106 |
typedef byte HighLightStyle; |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
107 |
enum HighLightStyles { |
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
108 |
HT_NONE = 0x00, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
109 |
HT_RECT = 0x80, |
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
2817
diff
changeset
|
110 |
HT_POINT = 0x40, |
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
111 |
HT_LINE = 0x20, ///< used for autorail highlighting (longer streches) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
112 |
///< (uses lower bits to indicate direction) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
113 |
HT_RAIL = 0x10, ///< autorail (one piece) |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
114 |
///< (uses lower bits to indicate direction) |
4799
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
115 |
HT_DRAG_MASK = 0xF0, ///< masks the drag-type |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
116 |
|
1109
1bab892228cd
(svn r1610) Remove trailing whitespace (last time ever, i hope)
tron
parents:
1093
diff
changeset
|
117 |
/* lower bits (used with HT_LINE and HT_RAIL): |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
118 |
* (see ASCII art in autorail.h for a visual interpretation) */ |
4799
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
119 |
HT_DIR_X = 0, ///< X direction |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
120 |
HT_DIR_Y = 1, ///< Y direction |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
121 |
HT_DIR_HU = 2, ///< horizontal upper |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
122 |
HT_DIR_HL = 3, ///< horizontal lower |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
123 |
HT_DIR_VL = 4, ///< vertical left |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
124 |
HT_DIR_VR = 5, ///< vertical right |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
125 |
HT_DIR_MASK = 0x7 ///< masks the drag-direction |
0 | 126 |
}; |
127 |
||
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
128 |
struct TileHighlightData { |
0 | 129 |
Point size; |
130 |
Point outersize; |
|
131 |
Point pos; |
|
132 |
Point offs; |
|
133 |
||
134 |
Point new_pos; |
|
135 |
Point new_size; |
|
136 |
Point new_outersize; |
|
137 |
||
138 |
Point selend, selstart; |
|
139 |
||
140 |
byte dirty; |
|
141 |
byte sizelimit; |
|
142 |
||
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
143 |
byte drawstyle; // lower bits 0-3 are reserved for detailed highlight information information |
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
144 |
byte new_drawstyle; // only used in UpdateTileSelection() to as a buffer to compare if there was a change between old and new |
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
145 |
byte next_drawstyle; // queued, but not yet drawn style |
0 | 146 |
|
6807
436fc766fc34
(svn r10881) [NewGRF_ports] -Feature: Adds irregular highlight to airport placement based on the FSMportLayout data. You can now see where the holes should be!
richk
parents:
6743
diff
changeset
|
147 |
FSMportsLayout *FSMportLayout; ///< used to identify the airport construction data to allow for holes in airport designs |
6812
35bd847c2aba
(svn r10889) [NewGRF_ports] -Feature: Colour of highlight for FSMs with placement masks shows Green for land tiles, and Blue for water tiles.
richk
parents:
6807
diff
changeset
|
148 |
FSMportsLayout *FSMportMask; ///< used to identify the airport construction mask for blue/green water/land colouring of highlight |
6718
5a8b295aa345
(svn r9511) [NewGRF_ports] -Feature: Added ability to have irregular shaped airports. Use value 255 in airport layout, and that tile is skipped during airport placement & deletion.
richk
parents:
6574
diff
changeset
|
149 |
|
0 | 150 |
byte place_mode; |
151 |
bool make_square_red; |
|
873
46e892485be3
(svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
tron
parents:
849
diff
changeset
|
152 |
WindowClass window_class; |
46e892485be3
(svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
tron
parents:
849
diff
changeset
|
153 |
WindowNumber window_number; |
0 | 154 |
|
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
155 |
byte select_method; |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
156 |
byte select_proc; |
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
157 |
|
0 | 158 |
TileIndex redsq; |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
159 |
}; |
0 | 160 |
|
161 |
||
6719
4cc327ad39d5
(svn r10027) [NewGRF_ports] -Sync: with trunk r9506-10026
richk
parents:
6718
diff
changeset
|
162 |
/* common button handler */ |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5726
diff
changeset
|
163 |
bool HandlePlacePushButton(Window *w, int widget, CursorID cursor, int mode, PlaceProc *placeproc); |
0 | 164 |
|
165 |
VARDEF Point _tile_fract_coords; |
|
166 |
||
1863
610acc8bc189
(svn r2369) Remove _thd_ptr: It always holds the address of _thd
tron
parents:
1109
diff
changeset
|
167 |
extern TileHighlightData _thd; |
0 | 168 |
|
169 |
||
430 | 170 |
void ViewportDoDraw(const ViewPort *vp, int left, int top, int right, int bottom); |
171 |
||
172 |
#endif /* VIEWPORT_H */ |