From d7694cc492924fad379e8886e9e23606960717c1 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 6 Oct 2012 22:21:48 +0200 Subject: [PATCH] added triggers to map debug render --- src/map/Map.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/map/Map.cpp b/src/map/Map.cpp index c7d75f1..b87cd03 100644 --- a/src/map/Map.cpp +++ b/src/map/Map.cpp @@ -78,6 +78,15 @@ void Map::RenderDebug(SDL_Surface *dest, const Vector &inOffset) const { Vector offset(inOffset + Vector::FromIndex(i, width) * area.Size() * tileset->Size()); area.RenderDebug(dest, tileset, offset); } + for (int i(0); i < numTriggers; ++i) { + Vector offset((triggers[i].TilePosition() * tileset->Size()) + inOffset); + SDL_Rect destRect; + destRect.x = offset.X() + (tileset->Width() / 4); + destRect.y = offset.Y() + (tileset->Height() / 4); + destRect.w = tileset->Width() / 2; + destRect.h = tileset->Height() / 2; + SDL_FillRect(dest, &destRect, SDL_MapRGB(dest->format, 0x00, 0xFF, 0xFF)); + } } } -- 2.39.2