mirror of https://github.com/OpenTTD/OpenTTD
(svn r92) Feature: invisible trees when in transparent mode (patch entry)
parent
951ce251c0
commit
4f253c2656
|
@ -977,6 +977,7 @@ STR_CONFIG_PATCHES_AUTORENEW_VEHICLE :{LTBLUE}Autorenew vehicle when it gets o
|
||||||
STR_CONFIG_PATCHES_AUTORENEW_MONTHS :{LTBLUE}Autorenew when vehice is {ORANGE}{STRING}{LTBLUE} months before/after max age
|
STR_CONFIG_PATCHES_AUTORENEW_MONTHS :{LTBLUE}Autorenew when vehice is {ORANGE}{STRING}{LTBLUE} months before/after max age
|
||||||
STR_CONFIG_PATCHES_AUTORENEW_MONEY :{LTBLUE}Autorenew minimum needed money for renew: {ORANGE}{STRING}
|
STR_CONFIG_PATCHES_AUTORENEW_MONEY :{LTBLUE}Autorenew minimum needed money for renew: {ORANGE}{STRING}
|
||||||
STR_CONFIG_PATCHES_ERRMSG_DURATION :{LTBLUE}Duration of error message: {ORANGE}{STRING}
|
STR_CONFIG_PATCHES_ERRMSG_DURATION :{LTBLUE}Duration of error message: {ORANGE}{STRING}
|
||||||
|
STR_CONFIG_PATCHES_INVISIBLE_TREES :{LTBLUE}Invisible trees (with transparent buildings): {ORANGE}{STRING}
|
||||||
STR_CONFIG_PATCHES_SNOWLINE_HEIGHT :{LTBLUE}Snow line height: {ORANGE}{STRING}
|
STR_CONFIG_PATCHES_SNOWLINE_HEIGHT :{LTBLUE}Snow line height: {ORANGE}{STRING}
|
||||||
STR_CONFIG_PATCHES_STATION_SPREAD :{LTBLUE}Max station spread: {ORANGE}{STRING}
|
STR_CONFIG_PATCHES_STATION_SPREAD :{LTBLUE}Max station spread: {ORANGE}{STRING}
|
||||||
STR_CONFIG_PATCHES_SERVICEATHELIPAD :{LTBLUE}Service helicopters at helipads automatically: {ORANGE}{STRING}
|
STR_CONFIG_PATCHES_SERVICEATHELIPAD :{LTBLUE}Service helicopters at helipads automatically: {ORANGE}{STRING}
|
||||||
|
|
|
@ -858,6 +858,7 @@ static const SettingDesc patch_settings[] = {
|
||||||
{"colored_news_date", SDT_UINT32, (void*)2000, (void*)offsetof(Patches, colored_news_date)},
|
{"colored_news_date", SDT_UINT32, (void*)2000, (void*)offsetof(Patches, colored_news_date)},
|
||||||
|
|
||||||
{"bridge_pillars", SDT_BOOL, (void*)true, (void*)offsetof(Patches, bridge_pillars)},
|
{"bridge_pillars", SDT_BOOL, (void*)true, (void*)offsetof(Patches, bridge_pillars)},
|
||||||
|
{"invisible_trees", SDT_BOOL, (void*)false, (void*)offsetof(Patches, invisible_trees)},
|
||||||
|
|
||||||
{"keep_all_autosave", SDT_BOOL, (void*)false, (void*)offsetof(Patches, keep_all_autosave)},
|
{"keep_all_autosave", SDT_BOOL, (void*)false, (void*)offsetof(Patches, keep_all_autosave)},
|
||||||
|
|
||||||
|
|
|
@ -678,6 +678,12 @@ int32 AiNew_PatchActive_Warning(int32 p1)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32 InvisibleTreesActive(int32 p1)
|
||||||
|
{
|
||||||
|
MarkWholeScreenDirty();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
typedef int32 PatchButtonClick(int32);
|
typedef int32 PatchButtonClick(int32);
|
||||||
static PatchButtonClick * const _patch_button_proc[] = {
|
static PatchButtonClick * const _patch_button_proc[] = {
|
||||||
&v_PositionMainToolbar,
|
&v_PositionMainToolbar,
|
||||||
|
@ -715,6 +721,7 @@ static const PatchEntry _patches_ui[] = {
|
||||||
{PE_UINT8, 0, STR_CONFIG_PATCHES_ERRMSG_DURATION, &_patches.errmsg_duration, 0, 20, 1},
|
{PE_UINT8, 0, STR_CONFIG_PATCHES_ERRMSG_DURATION, &_patches.errmsg_duration, 0, 20, 1},
|
||||||
|
|
||||||
{PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_TOOLBAR_POS, &_patches.toolbar_pos, 0, 2, 1, &v_PositionMainToolbar},
|
{PE_UINT8, PF_MULTISTRING, STR_CONFIG_PATCHES_TOOLBAR_POS, &_patches.toolbar_pos, 0, 2, 1, &v_PositionMainToolbar},
|
||||||
|
{PE_BOOL, 0, STR_CONFIG_PATCHES_INVISIBLE_TREES, &_patches.invisible_trees, 0, 1, 1, &InvisibleTreesActive},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PatchEntry _patches_construction[] = {
|
static const PatchEntry _patches_construction[] = {
|
||||||
|
|
|
@ -287,6 +287,7 @@ static void DrawTile_Trees(TileInfo *ti)
|
||||||
|
|
||||||
StartSpriteCombine();
|
StartSpriteCombine();
|
||||||
|
|
||||||
|
if((_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,7 @@ typedef struct Patches {
|
||||||
bool nonuniform_stations;// allow nonuniform train stations
|
bool nonuniform_stations;// allow nonuniform train stations
|
||||||
bool always_small_airport; // always allow small airports
|
bool always_small_airport; // always allow small airports
|
||||||
bool realistic_acceleration; // realistic acceleration for trains
|
bool realistic_acceleration; // realistic acceleration for trains
|
||||||
|
bool invisible_trees; // don't show trees when buildings are transparent
|
||||||
|
|
||||||
uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right
|
uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue