author | skidd13 |
Mon, 16 Jun 2008 17:05:17 +0000 | |
changeset 10979 | 13c4100d8757 |
parent 10466 | 54dfadd481b0 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
10445
2dd7d9d0a957
(svn r12987) -Codechange: split viewport and tile selection.
rubidium
parents:
10083
diff
changeset
|
3 |
/** @file tilehighlight_type.h Types related to highlighting tiles. */ |
6919
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
4 |
|
10445
2dd7d9d0a957
(svn r12987) -Codechange: split viewport and tile selection.
rubidium
parents:
10083
diff
changeset
|
5 |
#ifndef TILEHIGHLIGHT_TYPE_H |
2dd7d9d0a957
(svn r12987) -Codechange: split viewport and tile selection.
rubidium
parents:
10083
diff
changeset
|
6 |
#define TILEHIGHLIGHT_TYPE_H |
0 | 7 |
|
8721
b7971ad9bdd9
(svn r11788) -Fix (11787): makedepend doesn't mark delete files as changed...
rubidium
parents:
8720
diff
changeset
|
8 |
#include "core/geometry_type.hpp" |
8619
c2434269c3eb
(svn r11684) -Codechange: split gfx.h in a type and functional header.
rubidium
parents:
8617
diff
changeset
|
9 |
#include "zoom_type.h" |
8602
9e75e594a068
(svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps.
rubidium
parents:
8414
diff
changeset
|
10 |
#include "window_type.h" |
8720
4e60c30e2006
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8634
diff
changeset
|
11 |
#include "tile_type.h" |
7120
e31767effc16
(svn r9844) -Codechange: replace zoomlevel with an enum
truelight
parents:
6919
diff
changeset
|
12 |
|
8414
8c2ecc2dc12c
(svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode
smatz
parents:
8385
diff
changeset
|
13 |
/** Viewport highlight mode (for highlighting tiles below cursor) */ |
8385
aedd7656cfd1
(svn r11440) -Codechange: replace magic numbers with enumified WindowHighlightMode constants. Patch by SmatZ.
rubidium
parents:
8384
diff
changeset
|
14 |
enum ViewportHighlightMode { |
6919
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
15 |
VHM_NONE = 0, ///< default |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
16 |
VHM_RECT = 1, ///< rectangle (stations, depots, ...) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
17 |
VHM_POINT = 2, ///< point (lower land, raise land, level land, ...) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
18 |
VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
19 |
VHM_DRAG = 4, ///< dragging items in the depot windows |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
20 |
VHM_RAIL = 5, ///< rail pieces |
0 | 21 |
}; |
22 |
||
10083
9fb63cf5cc90
(svn r12619) -Codechange: lots of documentation about window related stuff. Patch by Alberth.
rubidium
parents:
8721
diff
changeset
|
23 |
/** Highlighting draw styles */ |
8720
4e60c30e2006
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8634
diff
changeset
|
24 |
enum HighLightStyle { |
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
|
25 |
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
|
26 |
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
|
27 |
HT_POINT = 0x40, |
6919
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
28 |
HT_LINE = 0x20, ///< used for autorail highlighting (longer streches) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
29 |
///< (uses lower bits to indicate direction) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
30 |
HT_RAIL = 0x10, ///< autorail (one piece) |
339210ecccd3
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6574
diff
changeset
|
31 |
///< (uses lower bits to indicate direction) |
4799
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
32 |
HT_DRAG_MASK = 0xF0, ///< masks the drag-type |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
33 |
|
1109
1bab892228cd
(svn r1610) Remove trailing whitespace (last time ever, i hope)
tron
parents:
1093
diff
changeset
|
34 |
/* lower bits (used with HT_LINE and HT_RAIL): |
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
35 |
* (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
|
36 |
HT_DIR_X = 0, ///< X direction |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
37 |
HT_DIR_Y = 1, ///< Y direction |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
38 |
HT_DIR_HU = 2, ///< horizontal upper |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
39 |
HT_DIR_HL = 3, ///< horizontal lower |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
40 |
HT_DIR_VL = 4, ///< vertical left |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
41 |
HT_DIR_VR = 5, ///< vertical right |
a32af5dd7b6c
(svn r6721) -Codechange: some comments, aligning, types and variable localization.
Darkvater
parents:
4344
diff
changeset
|
42 |
HT_DIR_MASK = 0x7 ///< masks the drag-direction |
0 | 43 |
}; |
8720
4e60c30e2006
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8634
diff
changeset
|
44 |
DECLARE_ENUM_AS_BIT_SET(HighLightStyle); |
4e60c30e2006
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
rubidium
parents:
8634
diff
changeset
|
45 |
|
0 | 46 |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
47 |
struct TileHighlightData { |
0 | 48 |
Point size; |
49 |
Point outersize; |
|
50 |
Point pos; |
|
51 |
Point offs; |
|
52 |
||
53 |
Point new_pos; |
|
54 |
Point new_size; |
|
55 |
Point new_outersize; |
|
56 |
||
57 |
Point selend, selstart; |
|
58 |
||
59 |
byte dirty; |
|
60 |
byte sizelimit; |
|
61 |
||
1070
bef634a62323
(svn r1571) Feature: Visually enhanced autorail placing
dominik
parents:
873
diff
changeset
|
62 |
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
|
63 |
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
|
64 |
byte next_drawstyle; // queued, but not yet drawn style |
0 | 65 |
|
8414
8c2ecc2dc12c
(svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode
smatz
parents:
8385
diff
changeset
|
66 |
ViewportHighlightMode place_mode; |
0 | 67 |
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
|
68 |
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
|
69 |
WindowNumber window_number; |
0 | 70 |
|
8384
cda01fb6ec2a
(svn r11439) -Codechange: replace some magic numbers by a ViewportPlaceMethod enumified constant. Patch by SmatZ.
rubidium
parents:
8177
diff
changeset
|
71 |
ViewportPlaceMethod select_method; |
10466
54dfadd481b0
(svn r13009) -Codechange: move more tile highlighting related functions/types to tilehighlight_*.h.
rubidium
parents:
10445
diff
changeset
|
72 |
ViewportDragDropSelectionProcess select_proc; |
7165
37eb253f3c06
(svn r9900) -Codechange: Separate the variables for how to highlight a land area and what to do with it afterwards.
maedhros
parents:
7120
diff
changeset
|
73 |
|
0 | 74 |
TileIndex redsq; |
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6573
diff
changeset
|
75 |
}; |
0 | 76 |
|
10445
2dd7d9d0a957
(svn r12987) -Codechange: split viewport and tile selection.
rubidium
parents:
10083
diff
changeset
|
77 |
#endif /* TILEHIGHLIGHT_TYPE_H */ |