Changeset - r5874:80b07bf2962e
[Not reviewed]
master
0 6 0
peter1138 - 18 years ago 2007-01-30 21:10:04
peter1138@openttd.org
(svn r8464) -Revert (r4322): Change back to converting to mph in the GUI code, as 1 mph == 1.6 km/h is too far out for some people.
6 files changed with 23 insertions and 23 deletions:
0 comments (0 inline, 0 general)
src/aircraft_gui.cpp
Show inline comments
 
@@ -261,14 +261,14 @@ static void AircraftViewWndProc(Window *
 
			switch (v->current_order.type) {
 
			case OT_GOTO_STATION: {
 
				SetDParam(0, v->current_order.dest);
 
				SetDParam(1, v->cur_speed * 128 / 10);
 
				SetDParam(1, v->cur_speed * 8);
 
				str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
 
			} break;
 

	
 
			case OT_GOTO_DEPOT: {
 
				/* Aircrafts always go to a station, even if you say depot */
 
				SetDParam(0, v->current_order.dest);
 
				SetDParam(1, v->cur_speed * 128 / 10);
 
				SetDParam(1, v->cur_speed * 8);
 
				if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
 
					str = STR_HEADING_FOR_HANGAR + _patches.vehicle_speed;
 
				} else {
 
@@ -283,7 +283,7 @@ static void AircraftViewWndProc(Window *
 
			default:
 
				if (v->num_orders == 0) {
 
					str = STR_NO_ORDERS + _patches.vehicle_speed;
 
					SetDParam(0, v->cur_speed * 128 / 10);
 
					SetDParam(0, v->cur_speed * 8);
 
				} else {
 
					str = STR_EMPTY;
 
				}
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -378,7 +378,7 @@ static int DrawRailWagonPurchaseInfo(int
 

	
 
	/* Wagon speed limit, displayed if above zero */
 
	if (rvi->max_speed > 0 && _patches.wagon_speed_limits) {
 
		SetDParam(0, rvi->max_speed);
 
		SetDParam(0, rvi->max_speed * 10 / 16);
 
		DrawString(x,y, STR_PURCHASE_INFO_SPEED, 0);
 
		y += 10;
 
	}
 
@@ -397,7 +397,7 @@ static int DrawRailEnginePurchaseInfo(in
 
	y += 10;
 

	
 
	/* Max speed - Engine power */
 
	SetDParam(0, rvi->max_speed);
 
	SetDParam(0, rvi->max_speed * 10 / 16);
 
	SetDParam(1, rvi->power << multihead);
 
	DrawString(x,y, STR_PURCHASE_INFO_SPEED_POWER, 0);
 
	y += 10;
 
@@ -432,7 +432,7 @@ static int DrawRoadVehPurchaseInfo(int x
 

	
 
	/* Purchase cost - Max speed */
 
	SetDParam(0, rvi->base_cost * (_price.roadveh_base>>3)>>5);
 
	SetDParam(1, rvi->max_speed / 2);
 
	SetDParam(1, rvi->max_speed * 10 / 32);
 
	DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0);
 
	y += 10;
 

	
 
@@ -456,7 +456,7 @@ static int DrawShipPurchaseInfo(int x, i
 
{
 
	/* Purchase cost - Max speed */
 
	SetDParam(0, svi->base_cost * (_price.ship_base>>3)>>5);
 
	SetDParam(1, svi->max_speed / 2);
 
	SetDParam(1, svi->max_speed * 10 / 32);
 
	DrawString(x,y, STR_PURCHASE_INFO_COST_SPEED, 0);
 
	y += 10;
 

	
 
@@ -482,7 +482,7 @@ static int DrawAircraftPurchaseInfo(int 
 

	
 
	/* Purchase cost - Max speed */
 
	SetDParam(0, avi->base_cost * (_price.aircraft_base>>3)>>5);
 
	SetDParam(1, avi->max_speed * 128 / 10);
 
	SetDParam(1, avi->max_speed * 8);
 
	DrawString(x, y, STR_PURCHASE_INFO_COST_SPEED, 0);
 
	y += 10;
 

	
src/roadveh_gui.cpp
Show inline comments
 
@@ -206,14 +206,14 @@ static void RoadVehViewWndProc(Window *w
 
			switch (v->current_order.type) {
 
			case OT_GOTO_STATION: {
 
				SetDParam(0, v->current_order.dest);
 
				SetDParam(1, v->cur_speed / 2);
 
				SetDParam(1, v->cur_speed * 10 / 32);
 
				str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
 
			} break;
 

	
 
			case OT_GOTO_DEPOT: {
 
				Depot *depot = GetDepot(v->current_order.dest);
 
				SetDParam(0, depot->town_index);
 
				SetDParam(1, v->cur_speed / 2);
 
				SetDParam(1, v->cur_speed * 10 / 32);
 
				if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
 
					str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
 
				} else {
 
@@ -229,7 +229,7 @@ static void RoadVehViewWndProc(Window *w
 
			default:
 
				if (v->num_orders == 0) {
 
					str = STR_NO_ORDERS + _patches.vehicle_speed;
 
					SetDParam(0, v->cur_speed / 2);
 
					SetDParam(0, v->cur_speed * 10 / 32);
 
				} else {
 
					str = STR_EMPTY;
 
				}
src/ship_gui.cpp
Show inline comments
 
@@ -213,14 +213,14 @@ static void ShipViewWndProc(Window *w, W
 
				switch (v->current_order.type) {
 
					case OT_GOTO_STATION: {
 
						SetDParam(0, v->current_order.dest);
 
						SetDParam(1, v->cur_speed / 2);
 
						SetDParam(1, v->cur_speed * 10 / 32);
 
						str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
 
					} break;
 

	
 
					case OT_GOTO_DEPOT: {
 
						Depot *depot = GetDepot(v->current_order.dest);
 
						SetDParam(0, depot->town_index);
 
						SetDParam(1, v->cur_speed / 2);
 
						SetDParam(1, v->cur_speed * 10 / 32);
 
						if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
 
							str = STR_HEADING_FOR_SHIP_DEPOT + _patches.vehicle_speed;
 
						} else {
 
@@ -236,7 +236,7 @@ static void ShipViewWndProc(Window *w, W
 
					default:
 
						if (v->num_orders == 0) {
 
							str = STR_NO_ORDERS + _patches.vehicle_speed;
 
							SetDParam(0, v->cur_speed / 2);
 
							SetDParam(0, v->cur_speed * 10 / 32);
 
						} else {
 
							str = STR_EMPTY;
 
						}
src/strings.cpp
Show inline comments
 
@@ -487,21 +487,21 @@ typedef struct Units {
 
/* Unit conversions */
 
static const Units units[] = {
 
	{ // Imperial (Original, mph, hp, metric ton, litre, kN)
 
		  10,  4, STR_UNITS_VELOCITY_IMPERIAL,
 
		   1,  0, STR_UNITS_VELOCITY_IMPERIAL,
 
		   1,  0, STR_UNITS_POWER_IMPERIAL,
 
		   1,  0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC,
 
		1000,  0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC,
 
		   1,  0, STR_UNITS_FORCE_SI,
 
	},
 
	{ // Metric (km/h, hp, metric ton, litre, kN)
 
		   1,  0, STR_UNITS_VELOCITY_METRIC,
 
		 103,  6, STR_UNITS_VELOCITY_METRIC,
 
		   1,  0, STR_UNITS_POWER_METRIC,
 
		   1,  0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC,
 
		1000,  0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC,
 
		   1,  0, STR_UNITS_FORCE_SI,
 
	},
 
	{ // SI (m/s, kilowatt, kilogram, cubic metres, kilonewton)
 
		 284, 10, STR_UNITS_VELOCITY_SI,
 
		1831, 12, STR_UNITS_VELOCITY_SI,
 
		 764, 10, STR_UNITS_POWER_SI,
 
		1000,  0, STR_UNITS_WEIGHT_SHORT_SI, STR_UNITS_WEIGHT_LONG_SI,
 
		   1,  0, STR_UNITS_VOLUME_SHORT_SI, STR_UNITS_VOLUME_LONG_SI,
src/train_gui.cpp
Show inline comments
 
@@ -183,7 +183,7 @@ static void TrainViewWndProc(Window *w, 
 
					str = STR_8861_STOPPED;
 
				}
 
			} else {
 
				SetDParam(0, v->u.rail.last_speed);
 
				SetDParam(0, v->u.rail.last_speed * 10 / 16);
 
				str = STR_TRAIN_STOPPING + _patches.vehicle_speed;
 
			}
 
		} else {
 
@@ -191,7 +191,7 @@ static void TrainViewWndProc(Window *w, 
 
			case OT_GOTO_STATION: {
 
				str = STR_HEADING_FOR_STATION + _patches.vehicle_speed;
 
				SetDParam(0, v->current_order.dest);
 
				SetDParam(1, v->u.rail.last_speed);
 
				SetDParam(1, v->u.rail.last_speed * 10 / 16);
 
			} break;
 

	
 
			case OT_GOTO_DEPOT: {
 
@@ -202,7 +202,7 @@ static void TrainViewWndProc(Window *w, 
 
				} else {
 
					str = STR_HEADING_FOR_TRAIN_DEPOT_SERVICE + _patches.vehicle_speed;
 
				}
 
				SetDParam(1, v->u.rail.last_speed);
 
				SetDParam(1, v->u.rail.last_speed * 10 / 16);
 
			} break;
 

	
 
			case OT_LOADING:
 
@@ -213,14 +213,14 @@ static void TrainViewWndProc(Window *w, 
 
			case OT_GOTO_WAYPOINT: {
 
				SetDParam(0, v->current_order.dest);
 
				str = STR_HEADING_FOR_WAYPOINT + _patches.vehicle_speed;
 
				SetDParam(1, v->u.rail.last_speed);
 
				SetDParam(1, v->u.rail.last_speed * 10 / 16);
 
				break;
 
			}
 

	
 
			default:
 
				if (v->num_orders == 0) {
 
					str = STR_NO_ORDERS + _patches.vehicle_speed;
 
					SetDParam(0, v->u.rail.last_speed);
 
					SetDParam(0, v->u.rail.last_speed * 10 / 16);
 
				} else {
 
					str = STR_EMPTY;
 
				}
 
@@ -425,7 +425,7 @@ static void DrawTrainDetailsWindow(Windo
 
	SetDParam(3, GetTrainRunningCost(v) >> 8);
 
	DrawString(x, 15, STR_885D_AGE_RUNNING_COST_YR, 0);
 

	
 
	SetDParam(2, v->u.rail.cached_max_speed);
 
	SetDParam(2, v->u.rail.cached_max_speed * 10 / 16);
 
	SetDParam(1, v->u.rail.cached_power);
 
	SetDParam(0, v->u.rail.cached_weight);
 
	SetDParam(3, v->u.rail.cached_max_te / 1000);
0 comments (0 inline, 0 general)