X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FArea.cpp;h=e7d6f6635d8b284f7945bc2c5c2729238ccefbef;hb=092a2dd175a4001a495c84ee85211734fb928c83;hp=b6d02f6204f7ba0477b4c7c9df636fc2a3bad936;hpb=1907ca03c5e865c4d398170042aa384c67ffff29;p=l2e.git diff --git a/src/map/Area.cpp b/src/map/Area.cpp index b6d02f6..e7d6f66 100644 --- a/src/map/Area.cpp +++ b/src/map/Area.cpp @@ -1,21 +1,15 @@ -/* - * Area.cpp - * - * Created on: Sep 26, 2012 - * Author: holy - */ - #include "Area.h" #include "Tile.h" #include "../graphics/Sprite.h" #include "../loader/TypeDescription.h" #include "../loader/Interpreter.h" +#include "../math/Vector.h" #include "../sdl/utility.h" #include -using geometry::Vector; +using math::Vector; using loader::FieldDescription; using loader::Interpreter; using loader::TypeDescription; @@ -31,7 +25,7 @@ Area::Area() } -Tile *Area::TileAt(const geometry::Vector &offset) { +Tile *Area::TileAt(const math::Vector &offset) { int tileIndex(offset.Y() * width + offset.X()); if (tileIndex < numTiles) { return tiles +tileIndex; @@ -40,7 +34,7 @@ Tile *Area::TileAt(const geometry::Vector &offset) { } } -const Tile *Area::TileAt(const geometry::Vector &offset) const { +const Tile *Area::TileAt(const math::Vector &offset) const { int tileIndex(offset.Y() * width + offset.X()); if (tileIndex < numTiles) { return tiles +tileIndex;