X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftilemap.cpp;h=08784415c69119d30e1397d739fc5af4db7eb7c1;hb=8385faa306eca6d96ab11ed7dae293d85e9c4e4f;hp=47cdeea7bc7021d9a653b0faf6d46811611c6a58;hpb=1d4f04476ae2c9e1530e48bb8881955d4a9d7238;p=supertux.git diff --git a/src/tilemap.cpp b/src/tilemap.cpp index 47cdeea7b..08784415c 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -160,6 +160,21 @@ TileMap::draw(DrawingContext& context) } } + if (debug_grid) + { + for (pos.x = start_x; pos.x < end_x; pos.x += 32) + { + context.draw_filled_rect(Vector (pos.x, start_y), Vector(1, fabsf(start_y - end_y)), + Color(225, 225, 225), LAYER_GUI-50); + } + + for (pos.y = start_y; pos.y < end_y; pos.y += 32) + { + context.draw_filled_rect(Vector (start_x, pos.y), Vector(fabsf(start_x - end_x), 1), + Color(225, 225, 225), LAYER_GUI-50); + } + } + context.pop_transform(); }