From 3a32a49febe77b2573a7ae378a59b147b9c9c4d2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 23 Sep 2014 00:15:36 +0200 Subject: Make viewport follow the player character --- src/rpgedit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 pos = map->getPlayerEntity().getPosition(); + mapView->render(pos.first, pos.second); } } -- cgit v1.2.3