Skip to content

Commit

Permalink
Updated Call to mMapView::moveView to the new MapViewState:moveView
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar139 committed Apr 15, 2024
1 parent feb6fbe commit 9749f3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions OPHD/States/MapViewState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,22 +421,22 @@ void MapViewState::onKeyDown(NAS2D::EventHandler::KeyCode key, NAS2D::EventHandl

case NAS2D::EventHandler::KeyCode::KEY_w:
case NAS2D::EventHandler::KeyCode::KEY_UP:
mMapView->moveView(MapOffset {DirectionNorthWest * shiftMoveScalar});
moveView(MapOffset{{DirectionNorthWest}, 0} * shiftMoveScalar);
break;

case NAS2D::EventHandler::KeyCode::KEY_s:
case NAS2D::EventHandler::KeyCode::KEY_DOWN:
mMapView->moveView(MapOffset{DirectionSouthEast * shiftMoveScalar});
moveView(MapOffset{{DirectionSouthEast}, 0} * shiftMoveScalar);
break;

case NAS2D::EventHandler::KeyCode::KEY_a:
case NAS2D::EventHandler::KeyCode::KEY_LEFT:
mMapView->moveView(MapOffset{DirectionSouthWest * shiftMoveScalar});
moveView(MapOffset{{DirectionSouthWest}, 0} * shiftMoveScalar);
break;

case NAS2D::EventHandler::KeyCode::KEY_d:
case NAS2D::EventHandler::KeyCode::KEY_RIGHT:
mMapView->moveView(MapOffset{DirectionNorthEast * shiftMoveScalar});
moveView(MapOffset{{DirectionNorthEast}, 0} * shiftMoveScalar);
break;

case NAS2D::EventHandler::KeyCode::KEY_0:
Expand Down Expand Up @@ -741,7 +741,7 @@ void MapViewState::onChangeDepth(int oldDepth, int newDepth) {

void MapViewState::moveView(MapOffset offset) {
int oldZLevel = mMapView->currentDepth();

mMapView->moveView(offset);

int newZLevel = mMapView->currentDepth();
Expand Down

0 comments on commit 9749f3f

Please sign in to comment.