]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Area.cpp
added debug render for ladder flag
[l2e.git] / src / map / Area.cpp
index 2c7f1b8b7987d50fc477b7b8f5c3af501899344b..a2554c31b2bd01b833171909556d4ee7dd6f3441 100644 (file)
@@ -4,6 +4,7 @@
 #include "../graphics/Sprite.h"
 #include "../loader/TypeDescription.h"
 #include "../loader/Interpreter.h"
+#include "../math/Vector.h"
 #include "../sdl/utility.h"
 
 #include <stdexcept>
@@ -81,6 +82,14 @@ void Area::RenderDebug(SDL_Surface *dest, const graphics::Sprite *tileset, const
                if (tile.BlocksWest()) {
                        sdl::VerticalLine(dest, offset, tileset->Height(), color);
                }
+               if (tile.IsLadder()) {
+                       SDL_Rect rect;
+                       rect.x = offset.X() + (tileset->Width() / 2) - 2;
+                       rect.y = offset.Y();
+                       rect.w = 4;
+                       rect.h = tileset->Height();
+                       SDL_FillRect(dest, &rect, color);
+               }
        }
 }