]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
pathplan, robomon: add dark gray color for cells, which was under robot bitmask.
authorehiker <ehiker@ehikers-lubuntu.(none)>
Mon, 10 Oct 2011 12:45:09 +0000 (14:45 +0200)
committerehiker <ehiker@ehikers-lubuntu.(none)>
Mon, 10 Oct 2011 12:45:09 +0000 (14:45 +0200)
src/pathplan/aalgorithm.c
src/robomon/RobomonAtlantis.cpp

index 468debaa0b23d30fab1b6eda5468e32df98df2c8..1daf34285d0e5482f6e50c6a450c22b3375706d7 100644 (file)
@@ -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;y<MAP_HEIGHT;y++){
+               for(x=0;x<MAP_WIDTH;x++){
+                       map->cells[y][x].flags &= ~(MAP_FLAG_PLAN_MASK);
+               }
+       }
                
         if (!map) return -1;
        // Transform real data in cell data
index b216bda6adc4535fd55b256d8d4b6557df1134d1..ed51b3d38f73cec9e50312494f58b2ee0218c1c2 100644 (file)
@@ -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;