diff --git a/.gitignore b/.gitignore index b40d932889..c21202f71d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,46 @@ -Makefile* bin/* -bundle/* -!bin/data/chars.grf +!bin/ai +bin/ai/* +!bin/ai/compat*.nut +!bin/ai/regression +!bin/data +bin/data/* !bin/data/openttdd.grf !bin/data/openttdw.grf -!bin/data/opntitle.grf -!bin/scenario/README -!bin/scripts* -config.* +!bin/data/opntitle.dat +!bin/data/orig_*.obg +!bin/data/orig_*.obs +!bin/data/no_sound.obs +!bin/gm +bin/gm/* +!bin/gm/no_music.obm +!bin/gm/orig_*.obm +!bin/scripts +bin/scripts/* +!bin/scripts/*.example +!bin/scripts/readme.txt + +bundle/* +bundles/* +docs/aidocs/* +docs/source/* +media/openttd.desktop +media/openttd.desktop.install objs/* +projects/Debug +projects/Release +projects/*.ncb +projects/*.suo +projects/*.sdf +projects/*.opensdf +projects/*.vcproj.*.user +projects/*.vcxproj.user src/rev.cpp +src/os/windows/ottdres.rc + +/Makefile* +!/Makefile.msvc +/config.* +!/config.lib +!*.in +*.tmp diff --git a/.hgignore b/.hgignore index de3910ff91..96d299ad1e 100644 --- a/.hgignore +++ b/.hgignore @@ -1,11 +1,26 @@ +syntax: glob + bin/lang/* -bin/opentd* +bin/openttd* +bin/*.cfg bundle/* -config.cache.* +bundles/* +config.cache* config.log config.pwd +docs/aidocs/* +docs/source/* Makefile Makefile.am -media/openttd.desktop* +Makefile.bundle +media/openttd.desktop +media/openttd.desktop.install objs/* +projects/*.ncb +projects/*.suo +projects/*.sdf +projects/*.opensdf +projects/*.vcproj.*.user +projects/*.vcxproj.user src/rev.cpp +src/os/windows/ottdres.rc diff --git a/src/main_gui.cpp b/src/main_gui.cpp index ed05584cf8..e3566d09c6 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -218,16 +218,19 @@ struct MainWindow : Window { this->DrawWidgets(); if (_game_mode == GM_MENU) { - int off_x = this->width / 2; + static const SpriteID title_sprites[] = {SPR_OTTD_O, SPR_OTTD_P, SPR_OTTD_E, SPR_OTTD_N, SPR_OTTD_T, SPR_OTTD_T, SPR_OTTD_D}; + static const uint LETTER_SPACING = 10; + uint name_width = (lengthof(title_sprites) - 1) * LETTER_SPACING; - DrawSprite(SPR_OTTD_O, PAL_NONE, off_x - 120, 50); - DrawSprite(SPR_OTTD_P, PAL_NONE, off_x - 86, 50); - DrawSprite(SPR_OTTD_E, PAL_NONE, off_x - 53, 50); - DrawSprite(SPR_OTTD_N, PAL_NONE, off_x - 22, 50); + for (uint i = 0; i < lengthof(title_sprites); i++) { + name_width += GetSpriteSize(title_sprites[i]).width; + } + int off_x = (this->width - name_width) / 2; - DrawSprite(SPR_OTTD_T, PAL_NONE, off_x + 34, 50); - DrawSprite(SPR_OTTD_T, PAL_NONE, off_x + 65, 50); - DrawSprite(SPR_OTTD_D, PAL_NONE, off_x + 96, 50); + for (uint i = 0; i < lengthof(title_sprites); i++) { + DrawSprite(title_sprites[i], PAL_NONE, off_x, 50); + off_x += GetSpriteSize(title_sprites[i]).width + LETTER_SPACING; + } } } diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index af89b05cf8..a13c64ec6a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1541,12 +1541,10 @@ static bool RoadVehController(RoadVehicle *v) if (v->reverse_ctr != 0) v->reverse_ctr--; /* handle crashed */ - if (v->vehstatus & VS_CRASHED) { + if (v->vehstatus & VS_CRASHED || RoadVehCheckTrainCrash(v)) { return RoadVehIsCrashed(v); } - RoadVehCheckTrainCrash(v); - /* road vehicle has broken down? */ if (v->breakdown_ctr != 0) { if (v->breakdown_ctr <= 2) { diff --git a/src/table/settings.h b/src/table/settings.h index 7afe20fd21..87ecc35b45 100644 --- a/src/table/settings.h +++ b/src/table/settings.h @@ -430,7 +430,7 @@ const SettingDesc _settings[] = { SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL), SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL), SDT_VAR(GameSettings, game_creation.snow_line_height, SLE_UINT8, 0, 0, DEF_SNOWLINE_HEIGHT, MIN_SNOWLINE_HEIGHT, DEF_SNOWLINE_HEIGHT, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL), - SDTC_VAR( gui.coloured_news_year, SLE_INT32, 0,NC, 2000,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_COLOURED_NEWS_YEAR, NULL), + SDT_CONDNULL( 4, 0, 143), SDT_VAR(GameSettings, game_creation.starting_year, SLE_INT32, 0,NC,DEF_START_YEAR,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_STARTING_YEAR, NULL), SDT_CONDNULL( 4, 0, 104), SDT_BOOL(GameSettings, economy.smooth_economy, 0, 0, true, STR_CONFIG_SETTING_SMOOTH_ECONOMY, NULL), @@ -570,6 +570,7 @@ const SettingDesc _settings[] = { SDTC_VAR(gui.loading_indicators, SLE_UINT8, S, MS, 1, 0, 2, 0, STR_CONFIG_SETTING_LOADING_INDICATORS, RedrawScreen), SDTC_VAR(gui.default_rail_type, SLE_UINT8, S, MS, 0, 0, 2, 0, STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE, NULL), SDTC_BOOL(gui.enable_signal_gui, S, 0, true, STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI, CloseSignalGUI), + SDTC_VAR(gui.coloured_news_year, SLE_INT32, S, NC, 2000, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_SETTING_COLOURED_NEWS_YEAR, NULL), SDTC_VAR(gui.drag_signals_density, SLE_UINT8, S, 0, 4, 1, 20, 0, STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY, DragSignalsDensityChanged), SDTC_VAR(gui.semaphore_build_before, SLE_INT32, S, NC, 1950, MIN_YEAR, MAX_YEAR, 1, STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE, ResetSignalVariant), SDTC_BOOL(gui.vehicle_income_warn, S, 0, true, STR_CONFIG_SETTING_WARN_INCOME_LESS, NULL),