summaryrefslogtreecommitdiffstats
path: root/src/view
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-25 23:33:50 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-25 23:33:50 +0200
commit8b4ca336ce68cc17573115dd07eb1bfc6521b298 (patch)
treeb0a6a457986da0a744c1394cc3788443a50ecaa8 /src/view
parentd82f3b7665435abefe84c8dbc16483acd235b478 (diff)
downloadrpgedit-8b4ca336ce68cc17573115dd07eb1bfc6521b298.tar
rpgedit-8b4ca336ce68cc17573115dd07eb1bfc6521b298.zip
Differentiate between int and float positions
Diffstat (limited to 'src/view')
-rw-r--r--src/view/MapView.cpp4
-rw-r--r--src/view/MapView.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/view/MapView.cpp b/src/view/MapView.cpp
index 4a6e552..287fc87 100644
--- a/src/view/MapView.cpp
+++ b/src/view/MapView.cpp
@@ -94,7 +94,7 @@ void MapView::clearEntities() {
entitySprites.clear();
}
-void MapView::render(const Model::Map *map, Model::Position center, uint64_t time) {
+void MapView::render(const Model::Map *map, Model::Position<float> center, uint64_t time) {
SDL_RenderClear(window->getRenderer());
std::pair<int, int> viewport = window->getViewport();
@@ -137,7 +137,7 @@ void MapView::render(const Model::Map *map, Model::Position center, uint64_t tim
}
for (auto &entity : map->getEntities()) {
- Model::Position pos = map->getEntityPosition(entity.get(), time);
+ Model::Position<float> pos = map->getEntityPosition(entity.get(), time);
Model::Direction dir = entity->getDirection();
SDL_Rect src = {
diff --git a/src/view/MapView.hpp b/src/view/MapView.hpp
index e813950..9a27328 100644
--- a/src/view/MapView.hpp
+++ b/src/view/MapView.hpp
@@ -58,7 +58,7 @@ public:
void clear();
- void render(const Model::Map *map, Model::Position center, uint64_t time);
+ void render(const Model::Map *map, Model::Position<float> center, uint64_t time);
};
}