From adbdd2ee1d4d7f94781d91a953649f62453293ac Mon Sep 17 00:00:00 2001 From: Remington Covert Date: Fri, 17 Apr 2015 08:07:51 -0700 Subject: [PATCH] should make rendering work again. --- desktop/project.clj | 2 +- desktop/src-common/advent/screens/inventory.clj | 4 +++- desktop/src-common/advent/screens/rooms.clj | 3 ++- desktop/src-common/advent/screens/rooms/dream.clj | 3 ++- .../src-common/advent/screens/rooms/outside_castle.clj | 2 +- .../src-common/advent/screens/rooms/outside_house.clj | 10 ++++++---- desktop/src-common/advent/screens/safe.clj | 4 +++- desktop/src-common/advent/screens/scene.clj | 8 ++++++-- desktop/src-common/advent/screens/title.clj | 4 +++- 9 files changed, 27 insertions(+), 13 deletions(-) diff --git a/desktop/project.clj b/desktop/project.clj index c5941e2a..0a80be7e 100644 --- a/desktop/project.clj +++ b/desktop/project.clj @@ -14,7 +14,7 @@ :classifier "natives-desktop"] [org.clojure/clojure "1.6.0"] [org.clojure/tools.nrepl "0.2.7"] - [play-clj "0.4.2-SNAPSHOT"] + [play-clj "0.4.5-BRYCE"] [org.clojure/data.priority-map "0.0.5"] [org.clojure/core.async "0.1.338.0-5c5012-alpha"]] :source-paths ["src" "src-common"] diff --git a/desktop/src-common/advent/screens/inventory.clj b/desktop/src-common/advent/screens/inventory.clj index b9313666..eefcb0d4 100644 --- a/desktop/src-common/advent/screens/inventory.clj +++ b/desktop/src-common/advent/screens/inventory.clj @@ -32,7 +32,9 @@ :fade (assoc (texture "black.png") :scale-x 80 :scale-y 80 - :opacity 0.7) + :opacity 0.7 + :origin-x 0 + :origin-y 0) :all-items (texture! (texture (pixmap "cursor.png")) :split 16 16) :items [] :shown? false diff --git a/desktop/src-common/advent/screens/rooms.clj b/desktop/src-common/advent/screens/rooms.clj index 61d47df9..cc060b02 100644 --- a/desktop/src-common/advent/screens/rooms.clj +++ b/desktop/src-common/advent/screens/rooms.clj @@ -17,8 +17,9 @@ (or scale-x 1))) entity-y (- entity-y (* (or origin-y 0) (or scale-y 1)))] + ((zone/box entity-x entity-y - (+ entity-x (* width (or 1 scale-x))) + (+ entity-x (* width (or scale-x 1))) (+ entity-y (* height (or scale-y 1)))) x y)))} (when (or (:scripts entity) (:script entity)) {:get-script (fn [cursor [x y]] diff --git a/desktop/src-common/advent/screens/rooms/dream.clj b/desktop/src-common/advent/screens/rooms/dream.clj index 0d961109..3479371a 100644 --- a/desktop/src-common/advent/screens/rooms/dream.clj +++ b/desktop/src-common/advent/screens/rooms/dream.clj @@ -251,7 +251,7 @@ (actions/play-animation entities :ego :sigh) (actions/play-animation entities :ego :reach) (actions/talk entities :ego "Wait a second! If I become a janitor, I'll never win Georgia McGorgeous' heart!"))}}} - :timers {:return [1.0 10.0 return-from-island]} + :timers {:return [30.0 30.0 return-from-island]} :layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1) (assoc (texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1) (assoc (texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2) @@ -319,6 +319,7 @@ :baseline 240 :origin-x 31 :origin-y 0 + :test true :anim fairy-godfather-anim :anim-start 0 :path (catmull-rom-spline (map #(apply vector-2* %) [[200 130] [200 134]]) true) :scaled true diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 259a1215..c5f19d47 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -226,7 +226,7 @@ (if (should-block? entities) (block-entrance entities) (do - (actions/transition-background entities :inside-castle [280 145]) + (actions/transition-background entities :inside-castle [295 145]) (actions/walk-to entities :ego [245 90])))) diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index 3a03e55e..ff92a987 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -25,10 +25,12 @@ [:dawn :opacity] 1.0))) -(defn walk-to-castle [entities] +(defn walk-to-castle [entities dawn?] (actions/walk-to entities :ego [0 80]) (actions/walk-straight-to entities :ego [-20 80]) - (actions/transition-background entities :outside-castle [330 80] :between dawn-fade) + (if dawn? + (actions/transition-background entities :outside-castle [330 80] :between dawn-fade) + (actions/transition-background entities :outside-castle [330 80])) (actions/walk-straight-to entities :ego [310 80])) (def ego-sheep-loc @@ -94,7 +96,7 @@ :ego "I now have The Slinger's Shot." :ego "And just in time, too. It's getting light.") (actions/update-state entities #(assoc % :next-time :sunrise)) - (walk-to-castle entities) + (walk-to-castle entities true) (outside-castle/go-through-gate entities) (actions/update-state entities #(assoc % :next-time :day)) (inside-castle/walk-to-blergh entities) @@ -348,7 +350,7 @@ :left-dir {:box [0 40 20 140] :script (actions/get-script entities - (walk-to-castle entities)) + (walk-to-castle entities false)) :cursor :left}} :layers {:day [(assoc (texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0) (assoc (texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122) diff --git a/desktop/src-common/advent/screens/safe.clj b/desktop/src-common/advent/screens/safe.clj index 104e3fd9..19291d5e 100644 --- a/desktop/src-common/advent/screens/safe.clj +++ b/desktop/src-common/advent/screens/safe.clj @@ -46,7 +46,9 @@ {:fade (assoc (texture "black.png") :scale-x 80 :scale-y 80 - :opacity 0.7) + :opacity 0.7 + :origin-x 0 + :origin-y 0) :safe (assoc (texture "inside-house/safe-screen.png") :x start-x :y start-y) :entered-keys (doall (for [i (range 5)] (assoc inputed-key diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 885953f3..516f3155 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -577,12 +577,16 @@ :scale-x 20 :scale-y 20 :baseline 9500 - :opacity 0.0) + :opacity 0.0 + :origin-x 0 + :origin-y 0) :white-fade (assoc (texture "white.png") :scale-x 20 :scale-y 20 :baseline 9500 - :opacity 0.0) + :opacity 0.0 + :origin-x 0 + :origin-y 0) :dawn (assoc (texture "dawn.png") :x 0 :y 0 :baseline 240 :colorize? true diff --git a/desktop/src-common/advent/screens/title.clj b/desktop/src-common/advent/screens/title.clj index 3d03e50f..fe799094 100644 --- a/desktop/src-common/advent/screens/title.clj +++ b/desktop/src-common/advent/screens/title.clj @@ -50,7 +50,9 @@ :fade (assoc (texture "black.png") :scale-x 80 :scale-y 80 - :opacity 1.0) + :opacity 1.0 + :origin-x 0 + :origin-y 0) :music-volume-slider (assoc (slider {:min 0 :max 100 :step 1} ui-skin :set-value (:music-volume @utils/settings)) :x ( - (/ (game :width) 2) 150)