(svn r92) Feature: invisible trees when in transparent mode (patch entry)
authordominik
Fri, 20 Aug 2004 15:30:32 +0000
changeset 91 6477ea0c240d
parent 90 e5ba630a4cf2
child 92 20b4c7536349
(svn r92) Feature: invisible trees when in transparent mode (patch entry)
lang/english.txt
settings.c
settings_gui.c
tree_cmd.c
variables.h
--- a/lang/english.txt	Fri Aug 20 14:25:11 2004 +0000
+++ b/lang/english.txt	Fri Aug 20 15:30:32 2004 +0000
@@ -977,6 +977,7 @@
 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_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_STATION_SPREAD		:{LTBLUE}Max station spread: {ORANGE}{STRING}
 STR_CONFIG_PATCHES_SERVICEATHELIPAD	:{LTBLUE}Service helicopters at helipads automatically: {ORANGE}{STRING}
--- a/settings.c	Fri Aug 20 14:25:11 2004 +0000
+++ b/settings.c	Fri Aug 20 15:30:32 2004 +0000
@@ -858,6 +858,7 @@
 	{"colored_news_date", SDT_UINT32, (void*)2000, (void*)offsetof(Patches, colored_news_date)},
 
 	{"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)},
 
--- a/settings_gui.c	Fri Aug 20 14:25:11 2004 +0000
+++ b/settings_gui.c	Fri Aug 20 15:30:32 2004 +0000
@@ -678,6 +678,12 @@
     return 0;
 }
 
+int32 InvisibleTreesActive(int32 p1)
+{
+	MarkWholeScreenDirty();
+	return 0;
+}
+
 typedef int32 PatchButtonClick(int32);
 static PatchButtonClick * const _patch_button_proc[] = {
 	&v_PositionMainToolbar,
@@ -715,6 +721,7 @@
 	{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_BOOL, 0, STR_CONFIG_PATCHES_INVISIBLE_TREES, &_patches.invisible_trees, 0, 1, 1, &InvisibleTreesActive},
 };
 
 static const PatchEntry _patches_construction[] = {
--- a/tree_cmd.c	Fri Aug 20 14:25:11 2004 +0000
+++ b/tree_cmd.c	Fri Aug 20 15:30:32 2004 +0000
@@ -287,6 +287,7 @@
 
 	StartSpriteCombine();
 
+	if((_display_opt & DO_TRANS_BUILDINGS) || !_patches.invisible_trees)
 	{
 		int i;
 
--- a/variables.h	Fri Aug 20 14:25:11 2004 +0000
+++ b/variables.h	Fri Aug 20 15:30:32 2004 +0000
@@ -109,6 +109,7 @@
 	bool nonuniform_stations;// allow nonuniform train stations
 	bool always_small_airport; // always allow small airports
 	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