From c81614c5ef027a3a3a35a88b00464018f46c3cc8 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 7 Dec 2016 18:45:05 -0800 Subject: [PATCH] much more natural screen transitions with regards to zoom. --- desktop/src-common/advent/actions.clj | 7 ++++--- desktop/src-common/advent/screens/rooms/dream.clj | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 2ca79c94..6df34878 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -712,9 +712,10 @@ (if-not (get-in entities [:cam :paused?]) (-> e (update-in [:tweens] dissoc :cam-zoom :cam-x :cam-y) - (assoc-in [:cam :x] 160) - (assoc-in [:cam :y] 120) - (assoc-in [:cam :zoom] utils/max-zoom)) + (assoc-in [:cam :ideal-x] x) + (assoc-in [:cam :ideal-y] y) + (assoc-in [:cam :x] (utils/bound-to-camera x 320 (get-in entities [:cam :zoom]))) + (assoc-in [:cam :y] (utils/bound-to-camera y 240 (get-in entities [:cam :zoom])))) e) (if music-changed? diff --git a/desktop/src-common/advent/screens/rooms/dream.clj b/desktop/src-common/advent/screens/rooms/dream.clj index 474ff166..2df18583 100644 --- a/desktop/src-common/advent/screens/rooms/dream.clj +++ b/desktop/src-common/advent/screens/rooms/dream.clj @@ -501,7 +501,7 @@ :update-fn (partial utils/update-path-location 0.33) :baseline 240 - :laber "Shovel" + :label "Shovel" :cursor :hand :script (actions/get-script entities (if ((get-in @entities [:state :plaques-read]) :shovel)