diff --git a/desktop/project.clj b/desktop/project.clj index 29c48a93..714f4852 100644 --- a/desktop/project.clj +++ b/desktop/project.clj @@ -2,7 +2,7 @@ (def packs (into ["do"] (mapcat (fn [directory] ["run" "-m" "com.badlogic.gdx.tools.texturepacker.TexturePacker" (str "asset-work/" directory) "resources/packed/" (str directory ",")]) - ["global"] + ["outside-jail"] #_["behindhouse" "dream" "georgia" "inside-cafeteria" "inside-jail" "outsidehouse" "safe-song" "title" "castle-gate" "ego" "held" "inside-castle" "inside-stash" "outside-castle" "screenshots" "wizard" "cat-tree" "ending-castle" "inside-antique" "inside-house" "outside-jail" "space" ]))) diff --git a/desktop/resources/packed/outside-jail.atlas b/desktop/resources/packed/outside-jail.atlas index c5abe649..b2f1eaa0 100644 --- a/desktop/resources/packed/outside-jail.atlas +++ b/desktop/resources/packed/outside-jail.atlas @@ -34,14 +34,14 @@ background index: -1 bent-bar-window rotate: false - xy: 866, 430 + xy: 866, 368 size: 17, 33 orig: 17, 33 offset: 0, 0 index: -1 candle rotate: false - xy: 866, 465 + xy: 942, 465 size: 80, 25 orig: 80, 25 offset: 0, 0 @@ -81,6 +81,13 @@ fountain orig: 320, 240 offset: 0, 0 index: -1 +guard + rotate: false + xy: 866, 403 + size: 74, 87 + orig: 74, 87 + offset: 0, 0 + index: -1 guard-sleep rotate: false xy: 294, 77 diff --git a/desktop/resources/packed/outside-jail.png b/desktop/resources/packed/outside-jail.png index 7bf2259a..52f8989d 100644 Binary files a/desktop/resources/packed/outside-jail.png and b/desktop/resources/packed/outside-jail.png differ diff --git a/desktop/src-common/advent/screens/rooms/outside_jail.clj b/desktop/src-common/advent/screens/rooms/outside_jail.clj index 86a9b038..8091d787 100644 --- a/desktop/src-common/advent/screens/rooms/outside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/outside_jail.clj @@ -94,14 +94,15 @@ (actions/talk entities :ego "This must be Frankie Rockfist's secret stash!"))) (defn make [screen] - (let [guard-sheet (texture! (utils/get-texture "inside-cafeteria/ladder-guard.png") :split 37 87) + (let [[screen atlas] (utils/acquire-atlas screen "packed/outside-jail.atlas") + guard-sheet (texture! (utils/atlas->texture atlas "guard") :split 37 87) guard-stand (animation 0.1 [(aget guard-sheet 0 0)]) guard-talk (animation 0.2 (for [i [0 0 0 0 1 0 0 1]] (aget guard-sheet 0 i))) - guard-sleep (utils/make-anim "outside-jail/guard-sleep.png" [43 67] 0.1 (range 4)) - open-stash (utils/make-anim "outside-jail/open-stash.png" [58 41] 0.075 (reverse (range 5))) - close-stash (utils/make-anim "outside-jail/open-stash.png" [58 41] 0.075 (range 5)) - candle-flame (utils/make-anim "outside-jail/candle.png" [20 25] 0.075 (range 4)) - candle-aura (utils/make-anim "outside-jail/candle-aura2.png" [135 135] 0.3 [0 1 2 1] )] + guard-sleep (utils/make-anim atlas "guard-sleep" [43 67] 0.1 (range 4)) + open-stash (utils/make-anim atlas "open-stash" [58 41] 0.075 (reverse (range 5))) + close-stash (utils/make-anim atlas "open-stash" [58 41] 0.075 (range 5)) + candle-flame (utils/make-anim atlas "candle" [20 25] 0.075 (range 4)) + candle-aura (utils/make-anim atlas "candle-aura2" [135 135] 0.3 [0 1 2 1] )] (rooms/make :music {:day :town-1 :night :night} :name "Fountain" :interactions {:down-dir {:box [30 0 227 40] @@ -235,10 +236,10 @@ (actions/remove-item entities :flask-2 :quiet? true) (actions/give entities :flask-water) (actions/talk entities :ego "Filled up with water, just as Gandarf wanted."))}}} - :layers {:day [(assoc (utils/get-texture "outside-jail/background.png") :x 0 :y 0 :baseline 0) - (assoc (utils/get-texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)] - :night [(assoc (utils/get-texture "outside-jail/background.png") :x 0 :y 0 :baseline 0) - (assoc (utils/get-texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)]} + :layers {:day [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0) + (assoc (utils/atlas->texture atlas "fountain") :x 0 :y 0 :baseline 114)] + :night [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0) + (assoc (utils/atlas->texture atlas "fountain") :x 0 :y 0 :baseline 114)]} :entities {:warden {:object nil :x 36 :y 86 @@ -260,8 +261,8 @@ :x 172 :y 140 :baseline 114) - :axe (assoc (utils/get-texture "outside-jail/axe.png") :x 213 :y 63 :baseline 176 :night-profile :sprite) - :bent-bar-window (assoc (utils/get-texture "outside-jail/bent-bar-window.png") + :axe (assoc (utils/atlas->texture atlas "axe") :x 213 :y 63 :baseline 176 :night-profile :sprite) + :bent-bar-window (assoc (utils/atlas->texture atlas "bent-bar-window") :x 69 :y (- 240 63) :baseline 2) :outside-particles (common/make-outside-particles)} :fountain-sound {:sound (utils/load-sound "outside-jail/fountain-2.ogg") @@ -280,15 +281,15 @@ :cursor :hand :script (actions/get-script entities (search-guard entities)) :night-profile :sprite)) - :rope (rooms/make-entity :rope (assoc (utils/get-texture "outside-jail/rope.png") + :rope (rooms/make-entity :rope (assoc (utils/atlas->texture atlas "rope") :x 14 :y 20 :baseline 1 :night-profile :sprite)) - :spear (rooms/make-entity :spear (assoc (utils/get-texture "outside-jail/spear.png") + :spear (rooms/make-entity :spear (assoc (utils/atlas->texture atlas "spear") :night-profile :none :x 60 :y 65 :baseline 180 :label "Spear" :cursor :hand :script (actions/get-script entities (grab-spear entities)))) - :alarm-clock (rooms/make-entity :alarm-clock (assoc (utils/get-texture "outside-jail/alarm-clock.png") + :alarm-clock (rooms/make-entity :alarm-clock (assoc (utils/atlas->texture atlas "alarm-clock") :x 217 :y 83 :baseline 160 :label "Broken clock" :cursor :hand