X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMap.cpp;h=d7c0b32e49c77c6fa1aa08927a7cbe74ff317243;hb=7fb774ec1df3d550cd8a6805bdc69c11ad36e498;hp=c7d75f18af409dc3774fadfa8098d6a1b3bf8851;hpb=07cdc452aeaad73ca9f8f9a3cf9868d2b6c9d5b3;p=l2e.git diff --git a/src/map/Map.cpp b/src/map/Map.cpp index c7d75f1..d7c0b32 100644 --- a/src/map/Map.cpp +++ b/src/map/Map.cpp @@ -23,6 +23,8 @@ Map::Map() , numAreas(0) , triggers(0) , numTriggers(0) +, entities(0) +, numEntities(0) , width(0) { } @@ -78,6 +80,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)); + } } }