]> git.localhorst.tv Git - l2e.git/commitdiff
added triggers to map debug render
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 20:21:48 +0000 (22:21 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 6 Oct 2012 20:21:48 +0000 (22:21 +0200)
src/map/Map.cpp

index c7d75f18af409dc3774fadfa8098d6a1b3bf8851..b87cd03cb5674a2333f3b78315d1e4c03e01cf5d 100644 (file)
@@ -78,6 +78,15 @@ void Map::RenderDebug(SDL_Surface *dest, const Vector<int> &inOffset) const {
                Vector<int> offset(inOffset + Vector<int>::FromIndex(i, width) * area.Size() * tileset->Size());
                area.RenderDebug(dest, tileset, offset);
        }
+       for (int i(0); i < numTriggers; ++i) {
+               Vector<int> 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));
+       }
 }
 
 }