diff src/viewport.cpp @ 6669:66456dace92f draft

(svn r9900) -Codechange: Separate the variables for how to highlight a land area and what to do with it afterwards.
author maedhros <maedhros@openttd.org>
date Wed, 23 May 2007 12:45:56 +0000 (2007-05-23)
parents 860f3e5f70ec
children 0b56358a0e3d
line wrap: on
line diff
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1985,9 +1985,10 @@
 }
 
 /** highlighting tiles while only going over them with the mouse */
-void VpStartPlaceSizing(TileIndex tile, int user)
+void VpStartPlaceSizing(TileIndex tile, byte method, byte process)
 {
-	_thd.userdata = user;
+	_thd.select_method = method;
+	_thd.select_proc   = process;
 	_thd.selend.x = TileX(tile) * TILE_SIZE;
 	_thd.selstart.x = TileX(tile) * TILE_SIZE;
 	_thd.selend.y = TileY(tile) * TILE_SIZE;
@@ -2445,7 +2446,8 @@
 
 	if (_special_mouse_mode != WSM_SIZING) return true;
 
-	e.we.place.userdata = _thd.userdata;
+	e.we.place.select_method = _thd.select_method;
+	e.we.place.select_proc   = _thd.select_proc;
 
 	/* stop drag mode if the window has been closed */
 	w = FindWindowById(_thd.window_class, _thd.window_number);
@@ -2467,7 +2469,7 @@
 	_special_mouse_mode = WSM_NONE;
 	if (_thd.next_drawstyle == HT_RECT) {
 		_thd.place_mode = VHM_RECT;
-	} else if ((e.we.place.userdata & 0xF) == VPM_SIGNALDIRS) { // some might call this a hack... -- Dominik
+	} else if (e.we.place.select_method == VPM_SIGNALDIRS) { // some might call this a hack... -- Dominik
 		_thd.place_mode = VHM_RECT;
 	} else if (_thd.next_drawstyle & HT_LINE) {
 		_thd.place_mode = VHM_RAIL;