summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2007-11-18 23:13:53 +0000
committersmatz <smatz@openttd.org>2007-11-18 23:13:53 +0000
commit2686901d84c335f9a761c26e005faa230e5102bc (patch)
tree249034d78ee0976c3785c11b59468e3d92001ae2 /src/viewport.cpp
parent6097c07e4b77f72fdb17261ea6616f729265c2a2 (diff)
downloadopenttd-2686901d84c335f9a761c26e005faa230e5102bc.tar.xz
(svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index c1b05288c..289ba3532 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2270,6 +2270,10 @@ void UpdateTileSelection()
break;
case VHM_RAIL:
_thd.new_drawstyle = GetAutorailHT(pt.x, pt.y); // draw one highlighted tile
+ break;
+ default:
+ NOT_REACHED();
+ break;
}
_thd.new_pos.x = x1 & ~0xF;
_thd.new_pos.y = y1 & ~0xF;
@@ -2826,8 +2830,8 @@ void SetObjectToPlace(CursorID icon, SpriteID pal, ViewportHighlightMode mode, W
Window *w;
/* undo clicking on button */
- if (_thd.place_mode != 0) {
- _thd.place_mode = 0;
+ if (_thd.place_mode != VHM_NONE) {
+ _thd.place_mode = VHM_NONE;
w = FindWindowById(_thd.window_class, _thd.window_number);
if (w != NULL) CallWindowEventNP(w, WE_ABORT_PLACE_OBJ);
}