4 * Created on: Sep 29, 2012
11 #include "../graphics/Sprite.h"
13 using geometry::Vector;
26 void Map::Render(SDL_Surface *dest, const Vector<int> &inOffset) const {
27 // TODO: skip invisible areas
28 for (int i(0); i < numAreas; ++i) {
29 const Area &area(areas[i]);
31 inOffset.X() + (i % width) * area.Width() * tileset->Width(),
32 inOffset.Y() + (i / width) * area.Height() * tileset->Height());
33 area.Render(dest, tileset, offset);