summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-23 00:15:36 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-23 00:15:36 +0200
commit3a32a49febe77b2573a7ae378a59b147b9c9c4d2 (patch)
treec7c06258b77ef39654dcbfe31322f3470ee39422
parent11e77a9d65972c8e59aefd72419dfcf9036e9f6a (diff)
downloadrpgedit-3a32a49febe77b2573a7ae378a59b147b9c9c4d2.tar
rpgedit-3a32a49febe77b2573a7ae378a59b147b9c9c4d2.zip
Make viewport follow the player character
-rw-r--r--src/rpgedit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpgedit.cpp b/src/rpgedit.cpp
index 6057339..8dcd472 100644
--- a/src/rpgedit.cpp
+++ b/src/rpgedit.cpp
@@ -90,7 +90,8 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char *argv[])
ticks = newTicks;
- mapView->render(8, 8);
+ std::pair<float, float> pos = map->getPlayerEntity().getPosition();
+ mapView->render(pos.first, pos.second);
}
}