(svn r12022) -Revert(r12018): Invisible trees are now separate from the building concept.
authorbelugas
Wed, 30 Jan 2008 17:36:28 +0000
changeset 8948 a04421da1801
parent 8947 3b7bb9f2770c
child 8949 cd14f0b75670
(svn r12022) -Revert(r12018): Invisible trees are now separate from the building concept.
So when you want invisible trees, just select the option of the same name in the Patch Options and toggle transparency of trees.
More to come on the saga of Invisibility. So stay tuned.
src/lang/english.txt
src/main_gui.cpp
src/transparency_gui.cpp
src/tree_cmd.cpp
--- a/src/lang/english.txt	Wed Jan 30 17:31:39 2008 +0000
+++ b/src/lang/english.txt	Wed Jan 30 17:36:28 2008 +0000
@@ -1068,7 +1068,7 @@
 STR_CONFIG_PATCHES_AUTORENEW_MONEY                              :{LTBLUE}Autorenew minimum needed money for renew: {ORANGE}{STRING1}
 STR_CONFIG_PATCHES_ERRMSG_DURATION                              :{LTBLUE}Duration of error message: {ORANGE}{STRING1}
 STR_CONFIG_PATCHES_POPULATION_IN_LABEL                          :{LTBLUE}Show town population in the town name label: {ORANGE}{STRING1}
-STR_CONFIG_PATCHES_INVISIBLE_TREES                              :{LTBLUE}Invisible trees (with transparent buildings): {ORANGE}{STRING1}
+STR_CONFIG_PATCHES_INVISIBLE_TREES                              :{LTBLUE}Invisible trees: {ORANGE}{STRING1}
 
 STR_CONFIG_PATCHES_LAND_GENERATOR                               :{LTBLUE}Land generator: {ORANGE}{STRING1}
 STR_CONFIG_PATCHES_LAND_GENERATOR_ORIGINAL                      :Original
--- a/src/main_gui.cpp	Wed Jan 30 17:31:39 2008 +0000
+++ b/src/main_gui.cpp	Wed Jan 30 17:36:28 2008 +0000
@@ -176,7 +176,7 @@
 		case  9: ToggleBit(_display_opt, DO_WAYPOINTS);          break;
 		case 10: ToggleBit(_display_opt, DO_FULL_ANIMATION);     break;
 		case 11: ToggleBit(_display_opt, DO_FULL_DETAIL);        break;
-		case 12:	ToggleTransparency(TO_HOUSES);                  break;
+		case 12: ToggleTransparency(TO_HOUSES);                  break;
 		case 13: ToggleTransparency(TO_SIGNS);                   break;
 	}
 	MarkWholeScreenDirty();
--- a/src/transparency_gui.cpp	Wed Jan 30 17:31:39 2008 +0000
+++ b/src/transparency_gui.cpp	Wed Jan 30 17:36:28 2008 +0000
@@ -7,7 +7,6 @@
 #include "variables.h"
 #include "transparency.h"
 #include "sound_func.h"
-#include "settings_type.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
@@ -39,10 +38,6 @@
 				w->SetWidgetLoweredState(i, IsTransparencySet((TransparencyOption)(i - TTW_WIDGET_SIGNS)));
 			}
 
-			/* Disabling the trees button allows to make it very evident that it has no effect
-			 * upon current situation */
-			w->SetWidgetDisabledState(TTW_WIDGET_TREES, _patches.invisible_trees && IsTransparencySet(TO_HOUSES));
-
 			DrawWindowWidgets(w);
 			break;
 
--- a/src/tree_cmd.cpp	Wed Jan 30 17:31:39 2008 +0000
+++ b/src/tree_cmd.cpp	Wed Jan 30 17:36:28 2008 +0000
@@ -428,8 +428,8 @@
 
 	StartSpriteCombine();
 
-	/* Do not draw trees when buildings are transparent and when the invisile trees patch is on */
-	if (!(_patches.invisible_trees && IsTransparencySet(TO_HOUSES))) {
+	/* Do not draw trees when the invisible trees patch and transparency tree are set */
+	if (!(IsTransparencySet(TO_TREES) && _patches.invisible_trees)) {
 		TreeListEnt te[4];
 		uint i;