summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-30 15:32:31 +0000
committeralberth <alberth@openttd.org>2010-12-30 15:32:31 +0000
commit661e13a86af45f88bc0fd7d8c045f66ceddd041e (patch)
treed3665937edc2ba2aefd1f4dfd4372852cf991d1c /src/viewport.cpp
parentcedb07bba3c885b5812244f02bdf5cee3e9cc05f (diff)
downloadopenttd-661e13a86af45f88bc0fd7d8c045f66ceddd041e.tar.xz
(svn r21667) -Codechange: Introduce _thd.Reset().
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index e5e398eb8..f5848a1b9 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2008,6 +2008,17 @@ static HighLightStyle GetAutorailHT(int x, int y)
}
/**
+ * Reset tile highlighting.
+ */
+void TileHighlightData::Reset()
+{
+ this->pos.x = 0;
+ this->pos.y = 0;
+ this->new_pos.x = 0;
+ this->new_pos.y = 0;
+}
+
+/**
* Is the user dragging a 'diagonal rectangle'?
* @return User is dragging a rotated rectangle.
*/