summaryrefslogtreecommitdiff
path: root/src/tilehighlight_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-19 10:31:30 +0000
committerrubidium <rubidium@openttd.org>2009-04-19 10:31:30 +0000
commit329cabab4fe4b963c1b928740e0d9f38f7e63b01 (patch)
treea601e141ae386f6a3a400c146dc605dcb03c20d3 /src/tilehighlight_type.h
parent2a2b40461d478406aef9d12093e07ed8ae5b987f (diff)
downloadopenttd-329cabab4fe4b963c1b928740e0d9f38f7e63b01.tar.xz
(svn r16088) -Codechange: merge HighLightStyle and ViewportHighlightMode as they are basically the same thing
Diffstat (limited to 'src/tilehighlight_type.h')
-rw-r--r--src/tilehighlight_type.h28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/tilehighlight_type.h b/src/tilehighlight_type.h
index 934aaa13a..a3ddad5f2 100644
--- a/src/tilehighlight_type.h
+++ b/src/tilehighlight_type.h
@@ -10,26 +10,16 @@
#include "window_type.h"
#include "tile_type.h"
-/** Viewport highlight mode (for highlighting tiles below cursor) */
-enum ViewportHighlightMode {
- VHM_NONE = 0, ///< default
- VHM_RECT = 1, ///< rectangle (stations, depots, ...)
- VHM_POINT = 2, ///< point (lower land, raise land, level land, ...)
- VHM_SPECIAL = 3, ///< special mode used for highlighting while dragging (and for tunnels/docks)
- VHM_DRAG = 4, ///< dragging items in the depot windows
- VHM_RAIL = 5, ///< rail pieces
-};
-
/** Highlighting draw styles */
enum HighLightStyle {
- HT_NONE = 0x00,
- HT_RECT = 0x80,
- HT_POINT = 0x40,
- HT_LINE = 0x20, ///< used for autorail highlighting (longer streches)
- ///< (uses lower bits to indicate direction)
- HT_RAIL = 0x10, ///< autorail (one piece)
- ///< (uses lower bits to indicate direction)
- HT_DRAG_MASK = 0xF0, ///< masks the drag-type
+ HT_NONE = 0x00, ///< default
+ HT_RECT = 0x10, ///< rectangle (stations, depots, ...)
+ HT_POINT = 0x20, ///< point (lower land, raise land, level land, ...)
+ HT_SPECIAL = 0x30, ///< special mode used for highlighting while dragging (and for tunnels/docks)
+ HT_DRAG = 0x40, ///< dragging items in the depot windows
+ HT_LINE = 0x08, ///< used for autorail highlighting (longer streches), lower bits: direction
+ HT_RAIL = 0x80, ///< autorail (one piece), lower bits: direction
+ HT_DRAG_MASK = 0xF8, ///< masks the drag-type
/* lower bits (used with HT_LINE and HT_RAIL):
* (see ASCII art in autorail.h for a visual interpretation) */
@@ -64,7 +54,7 @@ struct TileHighlightData {
HighLightStyle new_drawstyle; // only used in UpdateTileSelection() to as a buffer to compare if there was a change between old and new
HighLightStyle next_drawstyle; // queued, but not yet drawn style
- ViewportHighlightMode place_mode;
+ HighLightStyle place_mode;
bool make_square_red;
WindowClass window_class;
WindowNumber window_number;