|
|
|
@ -798,6 +798,20 @@ uint ConvertSpeedToDisplaySpeed(uint speed)
|
|
|
|
|
return _units_velocity[_settings_game.locale.units_velocity].c.ToDisplay(speed, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert the given (internal) speed to the display speed, in units (not decimal values).
|
|
|
|
|
* @param speed the speed to convert
|
|
|
|
|
* @return the converted speed.
|
|
|
|
|
*/
|
|
|
|
|
uint ConvertSpeedToUnitDisplaySpeed(uint speed)
|
|
|
|
|
{
|
|
|
|
|
uint result = ConvertSpeedToDisplaySpeed(speed);
|
|
|
|
|
for (uint i = 0; i < _units_velocity[_settings_game.locale.units_velocity].decimal_places; i++) {
|
|
|
|
|
result /= 10;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Convert the given display speed to the (internal) speed.
|
|
|
|
|
* @param speed the speed to convert
|
|
|
|
|