From 97794f953cf82abc99b8b61fc4e660628a850a1d Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sun, 11 Feb 2018 16:49:50 -0800 Subject: [PATCH] various bug fixes. --- desktop/src-common/advent/actions.clj | 3 ++- desktop/src-common/advent/screens/rooms/common.clj | 5 +++-- desktop/src-common/advent/screens/rooms/space.clj | 4 ++-- desktop/src-common/advent/screens/rooms/tongue_fight.clj | 4 ++-- desktop/src-common/advent/screens/scene.clj | 8 ++++---- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 649086cf..719e17b2 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -728,7 +728,7 @@ (as-> entities e (assoc-in e [:tweens :fade-out] (tween/tween :fade-out screen [type :opacity] 0.0 1.0 time)) (if music-changed? - (assoc-in e [:tweens :fade-out-music] (tween/tween :fade-out-music screen [:volume :value] 1.0 0.0 time)) + (assoc-in e [:tweens :fade-out-music] (tween/tween :fade-out-music screen [:volume :value] (get-in entities [:volume :value]) 0.0 time)) e))) (continue [this screen entities] @@ -843,6 +843,7 @@ (defn glad [entities] (actions/run-action entities (begin [this screen entities] + (println "ORIGIN" (get-in entities [:room :entities :ego :origin-x])) (let [current-y (get-in entities [:room :entities :ego :y]) to-y (+ current-y 15)] (-> entities diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index 2eacda95..0cfb5ae4 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -482,7 +482,7 @@ (assoc-in [:room :entities :penultimate-wall :opacity] 1) (assoc-in [:room :entities :bloodclot-swallow-top :opacity] 1) (assoc-in [:room :entities :bloodclot-swallow-bottom :opacity] 1) - (assoc-in [:cam :paused?] true) + (update-in [:cam ] assoc :paused? true :x 160 :y 120) (update-in [:room :entities :ego ] assoc :x 200 :y 166 :baseline 4) (update-in [:room :entities] dissoc :tongue) (update-in [:room :entities :ego] actions/start-animation :fall-small)))) @@ -531,8 +531,9 @@ (println "doing screen shake?") (actions/camera-shake entities 8.0) (println "doing screen shake?") + (actions/update-entities entities (fn [e] (update-in e [:cam ] assoc :paused? true :x 160 :y 120))) - (actions/transition-background entities :space [55 90] + (actions/transition-background entities :space [55 80] :time 4.0 :transition-music? false :type :white-fade diff --git a/desktop/src-common/advent/screens/rooms/space.clj b/desktop/src-common/advent/screens/rooms/space.clj index 14feddff..2623de16 100644 --- a/desktop/src-common/advent/screens/rooms/space.clj +++ b/desktop/src-common/advent/screens/rooms/space.clj @@ -216,10 +216,10 @@ :baseline 240 :opacity 0.0) :grow-explode (assoc grow-explode - :x 240 :y 240 + :x 300 :y 240 :baseline 200) :blowup (assoc blowup-effect - :x 300 :y 240 + :x 225 :y 181 :baseline 241) :lightning (assoc lightning-effect :x 225 :y 160 diff --git a/desktop/src-common/advent/screens/rooms/tongue_fight.clj b/desktop/src-common/advent/screens/rooms/tongue_fight.clj index ca7d82d4..dc968f27 100644 --- a/desktop/src-common/advent/screens/rooms/tongue_fight.clj +++ b/desktop/src-common/advent/screens/rooms/tongue_fight.clj @@ -184,8 +184,8 @@ :entities (into {:penultimate (assoc (utils/atlas->texture atlas "penultimate") :x 0 :y 0 :baseline 2 :scale-x 1 :scale-y 1 :opacity 0) :penultimate-wall (assoc (utils/atlas->texture atlas "penultimate-wall") :x 0 :y 0 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0) :penultimate-black (assoc (utils/atlas->texture atlas "penultimate-black") :x 0 :y 0 :baseline 6 :scale-x 1 :scale-y 1 :opacity 0) - :bloodclot-swallow-top (assoc (animation->texture screen bloodclot-swallow-top) :x 167 :y 118 :baseline 3 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-top :uhoh bloodclot-swallow-top-uhoh) - :bloodclot-swallow-bottom (assoc (animation->texture screen bloodclot-swallow-bottom) :x 167 :y 118 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-bottom :uhoh bloodclot-swallow-bottom-uhoh) + :bloodclot-swallow-top (assoc (utils/atlas->texture atlas "bloodclot-swallow-top" 0) :x 167 :y 118 :baseline 3 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-top :uhoh bloodclot-swallow-top-uhoh) + :bloodclot-swallow-bottom (assoc (utils/atlas->texture atlas "bloodclot-swallow-bottom" 0) :x 167 :y 118 :baseline 5 :scale-x 1 :scale-y 1 :opacity 0 :swallow bloodclot-swallow-bottom :uhoh bloodclot-swallow-bottom-uhoh) :black-blowup (assoc black-blowup :x 222 :y 85 :baseline 241) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 5da4542a..e06092c5 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -773,9 +773,9 @@ (get-in ego [:right :climb]) {:origin-x 11} (get-in ego [:left :whistle]) {:origin-x 7} (get-in ego [:right :standup]) {:origin-x 32} - (get-in ego [:right :crawl]) {:origin-x 32} + (get-in ego [:right :crawl]) {:origin-x 32 :origin-y 0} (get-in ego [:right :crawl-hide]) {:origin-x 32} - (get-in ego [:right :crawl-stand]) {:origin-x 32} + (get-in ego [:right :crawl-stand]) {:origin-x 32 :origin-y 0} (get-in ego [:right :axe]) {:origin-x 17} (get-in ego [:right :axe-wood]) {:origin-x 17} (get-in ego [:left :love]) {:origin-x 41} @@ -784,7 +784,7 @@ (get-in ego [:right :suspended]) {:origin-x 0 :origin-y 0} (get-in ego [:left :suspended-talk]) {:origin-x 0 :origin-y 0} (get-in ego [:right :suspended-talk]) {:origin-x 0 :origin-y 0} - :default {:origin-x 9}})] + :default {:origin-x 9 :origin-y 0}})] (actions/start-animation screen (merge (animation->texture screen (:stand (:right ego))) ego) :stand))) @@ -1275,7 +1275,7 @@ :ending :dream :castle-gate {:day :town-2 :night :night} :outside-jail {:day :town-1 :night :night :sunrise :night} - :outside-castle {:day :town-2 :night :night} } + :outside-castle {:day :town-2 :night :night :sunrise :night} } :step-particles (assoc (particle-effect "particles/step") :x 100 :y 100 :baseline 241) :cam {:zoom utils/min-zoom :ideal-x 160