From 0de85b7eb0375f3b857c10fc172f3894a906d758 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 7 May 2007 11:24:23 +0000 Subject: (svn r9805) -Codechange: Use HASBIT() et al for display options bits. --- src/viewport.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/viewport.cpp') diff --git a/src/viewport.cpp b/src/viewport.cpp index 52d189e7d..23f5a5a31 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -799,7 +799,7 @@ static void ViewportAddTownNames(DrawPixelInfo *dpi) Town *t; int left, top, right, bottom; - if (!(_display_opt & DO_SHOW_TOWN_NAMES) || _game_mode == GM_MENU) + if (!HASBIT(_display_opt, DO_SHOW_TOWN_NAMES) || _game_mode == GM_MENU) return; left = dpi->left; @@ -873,7 +873,7 @@ static void ViewportAddStationNames(DrawPixelInfo *dpi) int left, top, right, bottom; const Station *st; - if (!(_display_opt & DO_SHOW_STATION_NAMES) || _game_mode == GM_MENU) + if (!HASBIT(_display_opt, DO_SHOW_STATION_NAMES) || _game_mode == GM_MENU) return; left = dpi->left; @@ -940,7 +940,7 @@ static void ViewportAddSigns(DrawPixelInfo *dpi) const Sign *si; int left, top, right, bottom; - if (!(_display_opt & DO_SHOW_SIGNS)) + if (!HASBIT(_display_opt, DO_SHOW_SIGNS)) return; left = dpi->left; @@ -1007,7 +1007,7 @@ static void ViewportAddWaypoints(DrawPixelInfo *dpi) const Waypoint *wp; int left, top, right, bottom; - if (!(_display_opt & DO_WAYPOINTS)) + if (!HASBIT(_display_opt, DO_WAYPOINTS)) return; left = dpi->left; @@ -1487,7 +1487,7 @@ static bool CheckClickOnTown(const ViewPort *vp, int x, int y) { const Town *t; - if (!(_display_opt & DO_SHOW_TOWN_NAMES)) return false; + if (!HASBIT(_display_opt, DO_SHOW_TOWN_NAMES)) return false; switch (vp->zoom) { case 0: @@ -1541,7 +1541,7 @@ static bool CheckClickOnStation(const ViewPort *vp, int x, int y) { const Station *st; - if (!(_display_opt & DO_SHOW_STATION_NAMES)) return false; + if (!HASBIT(_display_opt, DO_SHOW_STATION_NAMES)) return false; switch (vp->zoom) { case 0: @@ -1595,7 +1595,7 @@ static bool CheckClickOnSign(const ViewPort *vp, int x, int y) { const Sign *si; - if (!(_display_opt & DO_SHOW_SIGNS) || _current_player == PLAYER_SPECTATOR) return false; + if (!HASBIT(_display_opt, DO_SHOW_SIGNS) || _current_player == PLAYER_SPECTATOR) return false; switch (vp->zoom) { case 0: @@ -1649,7 +1649,7 @@ static bool CheckClickOnWaypoint(const ViewPort *vp, int x, int y) { const Waypoint *wp; - if (!(_display_opt & DO_WAYPOINTS)) return false; + if (!HASBIT(_display_opt, DO_WAYPOINTS)) return false; switch (vp->zoom) { case 0: -- cgit v1.2.3-70-g09d2