src/viewport.cpp
branchgamebalance
changeset 9910 0b2aebc8283e
parent 9909 dce9a6923bb7
child 9911 0b8b245a2391
equal deleted inserted replaced
9909:dce9a6923bb7 9910:0b2aebc8283e
  2048 /** Calculates height difference between one tile and another
  2048 /** Calculates height difference between one tile and another
  2049 * Multiplies the result to suit the standard given by minimap - 50 meters high
  2049 * Multiplies the result to suit the standard given by minimap - 50 meters high
  2050 * To correctly get the height difference we need the direction we are dragging
  2050 * To correctly get the height difference we need the direction we are dragging
  2051 * in, as well as with what kind of tool we are dragging. For example a horizontal
  2051 * in, as well as with what kind of tool we are dragging. For example a horizontal
  2052 * autorail tool that starts in bottom and ends at the top of a tile will need the
  2052 * autorail tool that starts in bottom and ends at the top of a tile will need the
  2053 * maximum of SW,S and SE,N corners respectively. This is handled by the lookup table below
  2053 * maximum of SW, S and SE, N corners respectively. This is handled by the lookup table below
  2054 * See _tileoffs_by_dir in map.c for the direction enums if you can't figure out
  2054 * See _tileoffs_by_dir in map.c for the direction enums if you can't figure out
  2055 * the values yourself.
  2055 * the values yourself.
  2056 * @param style HightlightStyle of drag. This includes direction and style (autorail, rect, etc.)
  2056 * @param style HightlightStyle of drag. This includes direction and style (autorail, rect, etc.)
  2057 * @param distance amount of tiles dragged, important for horizontal/vertical drags
  2057 * @param distance amount of tiles dragged, important for horizontal/vertical drags
  2058 *        ignored for others
  2058 *        ignored for others
  2393 	if (_special_mouse_mode != WSM_SIZING) return true;
  2393 	if (_special_mouse_mode != WSM_SIZING) return true;
  2394 
  2394 
  2395 	e.we.place.userdata = _thd.userdata;
  2395 	e.we.place.userdata = _thd.userdata;
  2396 
  2396 
  2397 	/* stop drag mode if the window has been closed */
  2397 	/* stop drag mode if the window has been closed */
  2398 	w = FindWindowById(_thd.window_class,_thd.window_number);
  2398 	w = FindWindowById(_thd.window_class, _thd.window_number);
  2399 	if (w == NULL) {
  2399 	if (w == NULL) {
  2400 		ResetObjectToPlace();
  2400 		ResetObjectToPlace();
  2401 		return false;
  2401 		return false;
  2402 	}
  2402 	}
  2403 
  2403