summaryrefslogtreecommitdiff
path: root/src/tree_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-04-14 19:57:19 +0000
committerfrosch <frosch@openttd.org>2010-04-14 19:57:19 +0000
commitaea22529607303aadd138b75b95382c4b3ed02e3 (patch)
treee6c618956ca8137af08953249c33bef0f0f5d236 /src/tree_gui.cpp
parenta929ab0c24826e80e01c59fe57b4c6087d59301c (diff)
downloadopenttd-aea22529607303aadd138b75b95382c4b3ed02e3.tar.xz
(svn r19634) -Codechange: Use TREE_INVALID more consistently.
Diffstat (limited to 'src/tree_gui.cpp')
-rw-r--r--src/tree_gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index 7d8a04c6d..0c69e5008 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -18,6 +18,7 @@
#include "company_base.h"
#include "command_func.h"
#include "sound_func.h"
+#include "tree_map.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -50,7 +51,7 @@ class BuildTreesWindow : public Window
{
uint16 base; ///< Base tree number used for drawing the window.
uint16 count; ///< Number of different trees available.
- uint tree_to_plant; ///< Tree number to plant, \c UINT_MAX for a random tree.
+ TreeType tree_to_plant; ///< Tree number to plant, \c TREE_INVALID for a random tree.
public:
BuildTreesWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
@@ -105,13 +106,13 @@ public:
if (widget - BTW_TYPE_11 >= this->count) break;
if (HandlePlacePushButton(this, widget, SPR_CURSOR_TREE, HT_RECT, NULL)) {
- this->tree_to_plant = this->base + widget - BTW_TYPE_11;
+ this->tree_to_plant = (TreeType)(this->base + widget - BTW_TYPE_11);
}
break;
case BTW_TYPE_RANDOM: // tree of random type.
if (HandlePlacePushButton(this, BTW_TYPE_RANDOM, SPR_CURSOR_TREE, HT_RECT, NULL)) {
- this->tree_to_plant = UINT_MAX;
+ this->tree_to_plant = TREE_INVALID;
}
break;