From 305e91c9f8fb88453419412cdbef04fee7f50ee4 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Wed, 22 Jan 2014 17:40:31 -0600 Subject: [PATCH] Fixed detailed view launch animation targetting wrong point when game image is not at origin 0.5 0.5. Tweaked launch animation to zoom a little faster so that images that the camera doesn't overstep the bounds of the UI when the image is closer to the edge. --- src/animations/LaunchAnimation.h | 2 +- src/views/gamelist/DetailedGameListView.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/animations/LaunchAnimation.h b/src/animations/LaunchAnimation.h index 3072a5f37..11dc29ce6 100644 --- a/src/animations/LaunchAnimation.h +++ b/src/animations/LaunchAnimation.h @@ -40,7 +40,7 @@ public: { cameraOut = Eigen::Affine3f::Identity(); - float zoom = lerp(1.0, 3.0, t*t); + float zoom = lerp(1.0, 4.25f, t*t); cameraOut.scale(Eigen::Vector3f(zoom, zoom, 1)); const float sw = (float)Renderer::getScreenWidth() / zoom; diff --git a/src/views/gamelist/DetailedGameListView.cpp b/src/views/gamelist/DetailedGameListView.cpp index 522e67564..0717a4281 100644 --- a/src/views/gamelist/DetailedGameListView.cpp +++ b/src/views/gamelist/DetailedGameListView.cpp @@ -205,7 +205,7 @@ void DetailedGameListView::launch(FileData* game) { Eigen::Vector3f target(Renderer::getScreenWidth() / 2.0f, Renderer::getScreenHeight() / 2.0f, 0); if(mImage.hasImage()) - target = mImage.getPosition(); + target << mImage.getCenter().x(), mImage.getCenter().y(), 0; mWindow->getViewController()->launch(game, target); }