From bcc8f2dc2d69c25d983ef05c01f7be95f5764ef2 Mon Sep 17 00:00:00 2001 From: ehiker Date: Mon, 10 Oct 2011 14:45:09 +0200 Subject: [PATCH] pathplan, robomon: add dark gray color for cells, which was under robot bitmask. --- src/pathplan/aalgorithm.c | 7 +++++++ src/robomon/RobomonAtlantis.cpp | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pathplan/aalgorithm.c b/src/pathplan/aalgorithm.c index 468debaa..1daf3428 100644 --- a/src/pathplan/aalgorithm.c +++ b/src/pathplan/aalgorithm.c @@ -252,6 +252,13 @@ int aAlgorithm_shape(double xstart_real,double ystart_real, double xgoal_real, d init_bitmap(bitmap_straight, BITMAP_AB, BITMAP_AF, BITMAP_W2); init_bitmap(bitmap_across, BITMAP_AB_ACROSS, BITMAP_AF_ACROSS, BITMAP_W2_ACROSS); + + // Clear previous masks + for (y=0;ycells[y][x].flags &= ~(MAP_FLAG_PLAN_MASK); + } + } if (!map) return -1; // Transform real data in cell data diff --git a/src/robomon/RobomonAtlantis.cpp b/src/robomon/RobomonAtlantis.cpp index b216bda6..ed51b3d3 100644 --- a/src/robomon/RobomonAtlantis.cpp +++ b/src/robomon/RobomonAtlantis.cpp @@ -463,7 +463,9 @@ void RobomonAtlantis::paintMap() struct map_cell *cell = &map->cells[j][i]; color = lightGray; - + + if (cell->flags & MAP_FLAG_PLAN_MASK) + color = darkGray; if ((cell->flags & MAP_FLAG_WALL) && (cell->flags & MAP_FLAG_INVALIDATE_WALL) == 0) color = darkYellow; -- 2.39.2