diff --git a/collective.cpp b/collective.cpp index adc5289b0..87166ae7b 100644 --- a/collective.cpp +++ b/collective.cpp @@ -785,6 +785,7 @@ void Collective::processInput(View* view) { } else gatheringTeam = true; break; + case CollectiveAction::DRAW_LEVEL_MAP: view->drawLevelMap(level, this); break; case CollectiveAction::CANCEL_TEAM: gatheringTeam = false; team.clear(); break; case CollectiveAction::MARKET: handleMarket(view); break; case CollectiveAction::TECHNOLOGY: diff --git a/collective_action.h b/collective_action.h index efadd82dd..0ad0e6f31 100644 --- a/collective_action.h +++ b/collective_action.h @@ -6,7 +6,7 @@ class CollectiveAction { public: enum Type { IDLE, GO_TO, BUTTON_RELEASE, ROOM_BUTTON, IMP_BUTTON, CREATURE_BUTTON, - CREATURE_DESCRIPTION, GATHER_TEAM, CANCEL_TEAM, MARKET, TECHNOLOGY }; + CREATURE_DESCRIPTION, GATHER_TEAM, CANCEL_TEAM, MARKET, TECHNOLOGY, DRAW_LEVEL_MAP }; CollectiveAction(Type, Vec2 pos); CollectiveAction(Type, int); diff --git a/window_view.cpp b/window_view.cpp index 5f6772442..b108c9edc 100644 --- a/window_view.cpp +++ b/window_view.cpp @@ -1615,6 +1615,7 @@ void WindowView::animation(Vec2 pos, AnimationId id) { }*/ void WindowView::drawLevelMap(const Level* level, const CreatureView* creature) { + TempClockPause pause; vector roads; while (1) { for (Vec2 v : maxLevelBounds) { @@ -2022,7 +2023,7 @@ void WindowView::addMessage(const string& message) { // } } -void WindowView::unzoom(bool pixel, bool tpp) { +void WindowView::unzoom() { if (mapLayout != currentTileLayout.normalLayout) mapLayout = currentTileLayout.normalLayout; else @@ -2115,8 +2116,12 @@ CollectiveAction WindowView::getClick() { case Event::KeyPressed: switch (event.key.code) { case Keyboard::Z: - unzoom(event.key.shift, event.key.control); - return CollectiveAction(CollectiveAction::IDLE); + if (event.key.shift) + return CollectiveAction(CollectiveAction::DRAW_LEVEL_MAP); + else { + unzoom(); + return CollectiveAction(CollectiveAction::IDLE); + } case Keyboard::F2: Options::handle(this); refreshScreen(); break; case Keyboard::Space: if (!myClock.isPaused()) @@ -2276,7 +2281,7 @@ Action WindowView::getAction() { case Keyboard::Z: if (key->shift) return Action(ActionId::DRAW_LEVEL_MAP); else { - unzoom(key->shift, key->control); + unzoom(); return Action(ActionId::IDLE); } case Keyboard::F1: legendOption = (LegendOption)(1 - (int)legendOption); return Action(ActionId::IDLE); diff --git a/window_view.h b/window_view.h index 42b10de01..f61053159 100644 --- a/window_view.h +++ b/window_view.h @@ -77,7 +77,7 @@ class WindowView: public View { Optional drawObjectAbs(int x, int y, const ViewIndex&, int sizeX, int sizeY, Vec2 tilePos); void darkenObjectAbs(int x, int y); void clearMessageBox(); - void unzoom(bool, bool); + void unzoom(); void switchTiles(); void resize(int, int); Rectangle getMapViewBounds() const;