diff options
author | smatz <smatz@openttd.org> | 2007-11-18 23:13:53 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-11-18 23:13:53 +0000 |
commit | 2686901d84c335f9a761c26e005faa230e5102bc (patch) | |
tree | 249034d78ee0976c3785c11b59468e3d92001ae2 /src/viewport.cpp | |
parent | 6097c07e4b77f72fdb17261ea6616f729265c2a2 (diff) | |
download | openttd-2686901d84c335f9a761c26e005faa230e5102bc.tar.xz |
(svn r11471) -Codechange: one more variable retyped to enum ViewportHighlightMode
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 8 |
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); } |