From 428702ca49a1fa25d0d439cb764ee9c88a54ee1e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 9 Sep 2012 16:25:45 -0400 Subject: PEGASUS: Fix some formatting issues --- engines/pegasus/gamestate.h | 2 +- engines/pegasus/transition.cpp | 57 +++++++++++++++++++++--------------------- 2 files changed, 30 insertions(+), 29 deletions(-) (limited to 'engines') diff --git a/engines/pegasus/gamestate.h b/engines/pegasus/gamestate.h index 7812003e15..14ff5335f5 100644 --- a/engines/pegasus/gamestate.h +++ b/engines/pegasus/gamestate.h @@ -313,7 +313,7 @@ public: RoomViewID getCurrentRoomAndView(); void getNextLocation(NeighborhoodID &neighborhood, RoomID &room, DirectionConstant &direction); - void setNextLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); + void setNextLocation(const NeighborhoodID neighborhood, const RoomID room, const DirectionConstant direction); NeighborhoodID getNextNeighborhood(); void setNextNeighborhood(const NeighborhoodID neighborhood); diff --git a/engines/pegasus/transition.cpp b/engines/pegasus/transition.cpp index 0de63d6080..4bcc4f0a25 100644 --- a/engines/pegasus/transition.cpp +++ b/engines/pegasus/transition.cpp @@ -163,36 +163,37 @@ void Slide::drawSlideElement(const Common::Rect &drawRect, const Common::Rect &o void Push::adjustSlideRects(Common::Rect &oldBounds, Common::Rect &newBounds) { switch (_direction & kSlideHorizMask) { - case kSlideLeftMask: - newBounds.left = oldBounds.right = _bounds.right - pegasusRound(getFaderValue() * _boundsWidth, kTransitionRange); - newBounds.right = newBounds.left + _boundsWidth; - oldBounds.left = oldBounds.right - _boundsWidth; - break; - case kSlideRightMask: - oldBounds.left = newBounds.right = _bounds.left + pegasusRound(getFaderValue() * _boundsWidth, kTransitionRange); - oldBounds.right = oldBounds.left + _boundsWidth; - newBounds.left = newBounds.right - _boundsWidth; - break; - default: - newBounds.left = oldBounds.left = _bounds.left; - newBounds.right = oldBounds.right = _bounds.right; - break; + case kSlideLeftMask: + newBounds.left = oldBounds.right = _bounds.right - pegasusRound(getFaderValue() * _boundsWidth, kTransitionRange); + newBounds.right = newBounds.left + _boundsWidth; + oldBounds.left = oldBounds.right - _boundsWidth; + break; + case kSlideRightMask: + oldBounds.left = newBounds.right = _bounds.left + pegasusRound(getFaderValue() * _boundsWidth, kTransitionRange); + oldBounds.right = oldBounds.left + _boundsWidth; + newBounds.left = newBounds.right - _boundsWidth; + break; + default: + newBounds.left = oldBounds.left = _bounds.left; + newBounds.right = oldBounds.right = _bounds.right; + break; } + switch (_direction & kSlideVertMask) { - case kSlideDownMask: - oldBounds.top = newBounds.bottom = _bounds.top + pegasusRound(getFaderValue() * _boundsHeight, kTransitionRange); - oldBounds.bottom = oldBounds.top + _boundsHeight; - newBounds.top = newBounds.bottom - _boundsHeight; - break; - case kSlideUpMask: - newBounds.top = oldBounds.bottom = _bounds.bottom - pegasusRound(getFaderValue() * _boundsHeight, kTransitionRange); - newBounds.bottom = newBounds.top + _boundsHeight; - oldBounds.top = oldBounds.bottom - _boundsHeight; - break; - default: - newBounds.top = oldBounds.top = _bounds.top; - newBounds.bottom = oldBounds.bottom = _bounds.bottom; - break; + case kSlideDownMask: + oldBounds.top = newBounds.bottom = _bounds.top + pegasusRound(getFaderValue() * _boundsHeight, kTransitionRange); + oldBounds.bottom = oldBounds.top + _boundsHeight; + newBounds.top = newBounds.bottom - _boundsHeight; + break; + case kSlideUpMask: + newBounds.top = oldBounds.bottom = _bounds.bottom - pegasusRound(getFaderValue() * _boundsHeight, kTransitionRange); + newBounds.bottom = newBounds.top + _boundsHeight; + oldBounds.top = oldBounds.bottom - _boundsHeight; + break; + default: + newBounds.top = oldBounds.top = _bounds.top; + newBounds.bottom = oldBounds.bottom = _bounds.bottom; + break; } } -- cgit v1.2.3