diff --git a/desktop/resources/ending-castle/ending-castle2-assets/background.png b/desktop/resources/ending-castle/ending-castle2-assets/background.png index 25ae5820..db728c9f 100644 Binary files a/desktop/resources/ending-castle/ending-castle2-assets/background.png and b/desktop/resources/ending-castle/ending-castle2-assets/background.png differ diff --git a/desktop/resources/ending-castle/ending-castle2-assets/collision.png b/desktop/resources/ending-castle/ending-castle2-assets/collision.png new file mode 100644 index 00000000..04b85262 Binary files /dev/null and b/desktop/resources/ending-castle/ending-castle2-assets/collision.png differ diff --git a/desktop/resources/ending-castle/ending-castle2-assets/errors.txt b/desktop/resources/ending-castle/ending-castle2-assets/errors.txt deleted file mode 100644 index 9f0e5f33..00000000 --- a/desktop/resources/ending-castle/ending-castle2-assets/errors.txt +++ /dev/null @@ -1 +0,0 @@ -[Wed Aug 26 2015 23:10:15 GMT-0700 (PDT)] Layer "foreground.png copy": Expected end of input but "c" found. diff --git a/desktop/resources/ending-castle/ending-castle2-assets/foreground.png b/desktop/resources/ending-castle/ending-castle2-assets/foreground.png new file mode 100644 index 00000000..8c9eb838 Binary files /dev/null and b/desktop/resources/ending-castle/ending-castle2-assets/foreground.png differ diff --git a/desktop/resources/ending-castle/ending-castle2.psd b/desktop/resources/ending-castle/ending-castle2.psd index 82c7776b..b6a50439 100644 Binary files a/desktop/resources/ending-castle/ending-castle2.psd and b/desktop/resources/ending-castle/ending-castle2.psd differ diff --git a/desktop/src-common/advent/screens/rooms/ending.clj b/desktop/src-common/advent/screens/rooms/ending.clj new file mode 100644 index 00000000..c0593525 --- /dev/null +++ b/desktop/src-common/advent/screens/rooms/ending.clj @@ -0,0 +1,73 @@ +(ns advent.screens.rooms.ending + (:require + [clojure.core.async :as a] + [advent.screens.rooms :as rooms] + [advent.screens.rooms.common :as common] + [advent.actions :as actions] + [advent.screens.items :as items] + [advent.tween :as tween] + [advent.utils :as utils] + [clojure.zip :as zip] + [clojure.set :as set] + [clojure.string :as str] + [play-clj.core :refer :all] + [play-clj.math :refer :all] + [play-clj.ui :refer :all] + [play-clj.utils :refer :all] + [play-clj.g2d :refer :all])) + + +(defn make [screen] + (let [ + peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36) + peddler-stand (utils/flip (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 8 0) 6 (repeat 5 0) 4 5 4 5 4 5])] + (aget peddler-sheet 0 i)))) + warden-sheet (texture! (texture "inside-jail/warden.png") :split 43 58) + warden-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 2 (repeat 20 0) 2])] + (aget warden-sheet 0 i))) + game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44) + game-player-stand-up (animation 0.15 (for [i [0 0 0 0 0 0 0 0 0 0 0 1]] + (aget game-player-talk-sheet 0 i))) + ladder-guard-stand-1 (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")]) + ladder-guard-stand-2 (utils/flip (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")])) + scaler (utils/scaler-fn-with-baseline 110 0.10 1.00)] + (rooms/make :music :dream + :interactions {} + :layers [(assoc (texture "ending-castle/ending-castle2-assets/background.png") :x 0 :y 0 :origin-x 0 :origin-y 0 :baseline 0) + (assoc (texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)] + :entities {:peddler (assoc (animation->texture screen peddler-stand) + :x 245 :y 46 :baseline 200 + :anim peddler-stand + :anim-start 0 + :scaled true + ) + #_#_:warden (assoc (animation->texture screen warden-stand) + :x 49 :y 72 :baseline (- 240 72) + :anim warden-stand + :anim-start 0 + :scaled true + :scale-x 0.5 + :scale-y 0.5 + ) + :ladder-guard-1 (assoc (animation->texture screen ladder-guard-stand-1) + :x 75 :y 69 :baseline (- 240 69) + :anim ladder-guard-stand-1 + :anim-start 0 + :scaled true + :scale-x (scaler [71 150]) + :scale-y (scaler [71 150])) + :ladder-guard-2 (assoc (animation->texture screen ladder-guard-stand-2) + :x 179 :y 69 :baseline (- 240 69) + :anim ladder-guard-stand-2 + :anim-start 0 + :scaled true + :scale-x (scaler [179 150]) + :scale-y (scaler [179 150])) + :game-player (assoc (animation->texture screen game-player-stand-up) + :x 216 :y 69 :baseline (- 240 69) + :anim game-player-stand-up + :anim-start 0 + :scaled true)} + :collision "ending-castle/ending-castle2-assets/collision.png" + :scale-fn scaler + :start-pos [140 55]))) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 4cf44786..c815cf35 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -18,6 +18,7 @@ [advent.screens.fade :refer [fade-screen]] [advent.screens.items :as items] [advent.screens.rooms.dream :as rooms.dream] + [advent.screens.rooms.ending :as rooms.ending] [advent.screens.rooms.castle-gate :as rooms.castle-gate] [advent.screens.rooms.common :as common] [advent.screens.rooms.outside-house :as rooms.outside-house] @@ -878,6 +879,7 @@ void main() :inside-antique (rooms.inside-antique/make screen) :inside-jail (rooms.inside-jail/make screen) :dream (rooms.dream/make screen) + :ending (rooms.ending/make screen) :castle-gate (rooms.castle-gate/make screen) :outside-jail (rooms.outside-jail/make screen) :outside-castle (rooms.outside-castle/make screen)}