Implement viewport tracking for the MapWindow

As the player moves the hero, the MapWindow will try to keep the
hero in the middle of the view.
This commit is contained in:
Eryn Wells 2023-02-12 19:47:27 -08:00
parent 402e910915
commit 356e205f2c
3 changed files with 58 additions and 25 deletions

View file

@ -87,7 +87,7 @@ class MainGameEventHandler(EventHandler):
case tcod.event.KeySym.ESCAPE:
action = ExitAction()
case tcod.event.KeySym.SPACE:
action = RegenerateRoomsAction(hero)
action = RegenerateRoomsAction()
case tcod.event.KeySym.PERIOD:
if not is_shift_pressed:
action = WaitAction(hero)