Index: src/transparency.h =================================================================== --- src/transparency.h (revision 12318) +++ src/transparency.h (working copy) @@ -63,13 +63,13 @@ /** Set or clear all non-locked transparency options */ static inline void ResetRestoreAllTransparency() { - /* if none of the non-locked options are set */ - if ((_transparency_opt & ~_transparency_lock) == 0) { + /* if any of the non-locked options are set */ + if (GB(_transparency_opt, 0, TO_END) & ~GB(_transparency_lock, 0, TO_END)) { + /* clear all non-locked options */ + CLRBITS(_transparency_opt, ~GB(_transparency_lock, 0, TO_END)); + } else { /* set all non-locked options */ - _transparency_opt |= ~_transparency_lock; - } else { - /* clear all non-locked options */ - _transparency_opt &= _transparency_lock; + AB(_transparency_opt, 0, TO_END, ~GB(_transparency_lock, 0, TO_END)); } MarkWholeScreenDirty(); Index: src/transparency_gui.cpp =================================================================== --- src/transparency_gui.cpp (revision 12318) +++ src/transparency_gui.cpp (working copy) @@ -23,7 +23,7 @@ TTW_WIDGET_BRIDGES, ///< Make bridges transparent TTW_WIDGET_STRUCTURES, ///< Make unmovable structures transparent TTW_WIDGET_CATENARY, ///< Make catenary transparent - TTW_WIDGET_LOADING, ///< Make loading indicators transperent + TTW_WIDGET_LOADING, ///< Make loading indicators transparent TTW_WIDGET_END, ///< End of toggle buttons }; @@ -66,7 +66,7 @@ {WWT_STICKYBOX, RESIZE_NONE, 7, 207, 218, 0, 13, STR_NULL, STR_STICKY_BUTTON}, /* transparency widgets: - * transparent signs, trees, houses, industries, player's buildings, bridges, unmovable structures and loading indicators */ + * transparent signs, trees, houses, industries, player's buildings, bridges, unmovable structures, catenary and loading indicators */ { WWT_IMGBTN, RESIZE_NONE, 7, 0, 21, 14, 35, SPR_IMG_SIGN, STR_TRANSPARENT_SIGNS_DESC}, { WWT_IMGBTN, RESIZE_NONE, 7, 22, 43, 14, 35, SPR_IMG_PLANTTREES, STR_TRANSPARENT_TREES_DESC}, { WWT_IMGBTN, RESIZE_NONE, 7, 44, 65, 14, 35, SPR_IMG_TOWN, STR_TRANSPARENT_HOUSES_DESC},