mirror of https://github.com/OpenTTD/OpenTTD
(svn r15697) -Fix (r15695): warning about comparing signed vs unsigned.
parent
eb0d43aadd
commit
2adbf67968
|
@ -572,7 +572,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
|
||||||
case GLAND_SMOOTHNESS_PULLDOWN: _settings_newgame.game_creation.tgen_smoothness = index; break;
|
case GLAND_SMOOTHNESS_PULLDOWN: _settings_newgame.game_creation.tgen_smoothness = index; break;
|
||||||
|
|
||||||
case GLAND_TOWN_PULLDOWN:
|
case GLAND_TOWN_PULLDOWN:
|
||||||
if (index == CUSTOM_TOWN_NUMBER_DIFFICULTY) {
|
if ((uint)index == CUSTOM_TOWN_NUMBER_DIFFICULTY) {
|
||||||
this->widget_id = widget;
|
this->widget_id = widget;
|
||||||
SetDParam(0, _settings_newgame.game_creation.custom_town_number);
|
SetDParam(0, _settings_newgame.game_creation.custom_town_number);
|
||||||
ShowQueryString(STR_CONFIG_SETTING_INT32, STR_NUMBER_OF_TOWNS, 5, 50, this, CS_NUMERAL, QSF_NONE);
|
ShowQueryString(STR_CONFIG_SETTING_INT32, STR_NUMBER_OF_TOWNS, 5, 50, this, CS_NUMERAL, QSF_NONE);
|
||||||
|
|
|
@ -95,8 +95,8 @@ struct BuildingCounts {
|
||||||
uint8 class_count[HOUSE_CLASS_MAX];
|
uint8 class_count[HOUSE_CLASS_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings
|
static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings
|
||||||
static const int CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation
|
static const uint CUSTOM_TOWN_MAX_NUMBER = 5000; ///< this is the maximum number of towns a user can specify in customisation
|
||||||
|
|
||||||
DECLARE_OLD_POOL(Town, Town, 3, 8000)
|
DECLARE_OLD_POOL(Town, Town, 3, 8000)
|
||||||
|
|
||||||
|
|
|
@ -1634,7 +1634,7 @@ bool GenerateTowns(TownLayout layout)
|
||||||
{
|
{
|
||||||
uint num = 0;
|
uint num = 0;
|
||||||
uint difficulty = _settings_game.difficulty.number_towns;
|
uint difficulty = _settings_game.difficulty.number_towns;
|
||||||
uint n = difficulty == CUSTOM_TOWN_NUMBER_DIFFICULTY ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7));
|
uint n = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7));
|
||||||
uint num_cities = _settings_game.economy.larger_towns == 0 ? 0 : n / _settings_game.economy.larger_towns;
|
uint num_cities = _settings_game.economy.larger_towns == 0 ? 0 : n / _settings_game.economy.larger_towns;
|
||||||
|
|
||||||
SetGeneratingWorldProgress(GWP_TOWN, n);
|
SetGeneratingWorldProgress(GWP_TOWN, n);
|
||||||
|
|
Loading…
Reference in New Issue