diff --git a/desktop/asset-work/inside-jail/candle-aura.png b/desktop/asset-work/inside-jail/candle-aura.png new file mode 100644 index 00000000..d183821d Binary files /dev/null and b/desktop/asset-work/inside-jail/candle-aura.png differ diff --git a/desktop/project.clj b/desktop/project.clj index 841df43b..9a1ce4cd 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 ",")]) - ["inside-cafeteria"] + ["inside-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/inside-jail.atlas b/desktop/resources/packed/inside-jail.atlas index fab75da8..b9395cb5 100644 --- a/desktop/resources/packed/inside-jail.atlas +++ b/desktop/resources/packed/inside-jail.atlas @@ -34,11 +34,18 @@ bars- index: -1 candle rotate: false - xy: 646, 175 + xy: 646, 146 size: 80, 25 orig: 80, 25 offset: 0, 0 index: -1 +candle-aura + rotate: false + xy: 646, 173 + size: 108, 27 + orig: 108, 27 + offset: 0, 0 + index: -1 chest-top rotate: false xy: 906, 228 @@ -55,14 +62,14 @@ chest-top-open index: -1 crowbar rotate: false - xy: 646, 140 + xy: 646, 111 size: 64, 33 orig: 64, 33 offset: 0, 0 index: -1 dot rotate: false - xy: 728, 199 + xy: 756, 199 size: 1, 1 orig: 1, 1 offset: 0, 0 @@ -97,7 +104,7 @@ warden index: -1 window rotate: false - xy: 646, 109 + xy: 646, 80 size: 18, 29 orig: 18, 29 offset: 0, 0 diff --git a/desktop/resources/packed/inside-jail.png b/desktop/resources/packed/inside-jail.png index 482dae77..7dd80c5a 100644 Binary files a/desktop/resources/packed/inside-jail.png and b/desktop/resources/packed/inside-jail.png differ diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index d5a76500..a4d2cdb3 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -217,7 +217,8 @@ (defn make [screen] - (let [warden-sheet (texture! (utils/get-texture "inside-jail/warden.png") :split 43 58) + (let [[screen atlas] (utils/acquire-atlas screen "packed/inside-jail.atlas") + warden-sheet (texture! (utils/atlas->texture atlas "warden") :split 43 58) warden-talk (animation 0.2 (for [i [1 0 1 0 1 0 1 0 0 0 2 0]] (aget warden-sheet 0 i))) warden-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 2 (repeat 20 0) 2])] @@ -226,9 +227,9 @@ (aget warden-sheet 0 i))) warden-sleep (animation 0.25 (for [i (flatten [ 3 4 3 4 3 4 3 4 3 4 5 5 2 2 2 2 2 2])] (aget warden-sheet 0 i))) - candle (utils/make-anim "inside-jail/candle.png" [20 25] 0.1 (range 4)) - candle-aura (utils/make-anim "inside-house/candle-aura.png" [27 27] 0.2 [0 1 2 3 2 1]) - crowbar (utils/make-anim "inside-jail/crowbar.png" [16 33] 0.15 (flatten [(repeat 120 0) [1 2 3 3 2 1]]))] + candle (utils/make-anim atlas "candle" [20 25] 0.1 (range 4)) + candle-aura (utils/make-anim atlas "candle-aura" [27 27] 0.2 [0 1 2 3 2 1]) + crowbar (utils/make-anim atlas "crowbar" [16 33] 0.15 (flatten [(repeat 120 0) [1 2 3 3 2 1]]))] (rooms/make :music :inside-antique :name "In jail" :sounds { @@ -350,10 +351,10 @@ :only-script (actions/get-script entities (leave entities))} } - :layers [(assoc (utils/get-texture "inside-jail/background.png") :x 0 :y 0 :baseline 0 :night-profile :none) - (assoc (utils/get-texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165 :night-profile :none) - (assoc (utils/get-texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35 :night-profile :none) - (assoc (utils/get-texture "inside-jail/fg.png") :x 0 :y 5 :baseline 241 :parallax 1.5 :night-profile :none)] + :layers [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0 :night-profile :none) + (assoc (utils/atlas->texture atlas "bars") :x 0 :y 0 :baseline 165 :night-profile :none) + (assoc (utils/atlas->texture atlas "glow") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35 :night-profile :none) + (assoc (utils/atlas->texture atlas "fg") :x 0 :y 5 :baseline 241 :parallax 1.5 :night-profile :none)] :hotspots [{:box [121 40 258 44] :fn (fn [screen entities] @@ -373,7 +374,7 @@ (common/go-to-jail entities)) entities) entities) entities)))}] - :entities {:warden (assoc (utils/get-texture "inside-jail/warden.png" ) + :entities {:warden (assoc (utils/atlas->texture atlas "warden" ) :x 40 :y 60 :baseline 166 :stand warden-stand :talk warden-talk @@ -412,13 +413,13 @@ :ego "I can't kill him just for doing his job.")) :rope (actions/get-script entities (tie-up-warden entities "I'll tie him up.")) :ball-n-chain (actions/get-script entities (tie-up-warden entities "I'll lock him up."))}) - :chest-top (assoc (utils/get-texture "inside-jail/chest-top.png") + :chest-top (assoc (utils/atlas->texture atlas "chest-top") :x 193 :y (- 240 165) :baseline 166 :origin-x 0 :origin-y 0 :night-profile :none - :open (animation 0.8 [(utils/get-texture "inside-jail/chest-top-open.png")]) - :close (animation 0.8 [(utils/get-texture "inside-jail/chest-top.png")])) - :ball-n-chain (assoc (utils/get-texture "inside-jail/ball-n-chain.png") + :open (animation 0.8 [(utils/atlas->texture atlas "chest-top-open")]) + :close (animation 0.8 [(utils/atlas->texture atlas "chest-top")])) + :ball-n-chain (assoc (utils/atlas->texture atlas "ball-n-chain") :x 80 :y 80 :baseline 160 :night-profile :none :label "Ball-n-chain" @@ -428,7 +429,7 @@ (actions/play-animation entities :ego :squat) (actions/remove-entity entities :ball-n-chain) (actions/give entities :ball-n-chain))) - :moveable-bars (assoc (utils/get-texture "inside-jail/moveable-bars.png") + :moveable-bars (assoc (utils/atlas->texture atlas "moveable-bars") :night-profile :none :x 132 :y 77 :baseline 163) :candle (assoc (animation->texture screen candle) @@ -461,7 +462,7 @@ (actions/give entities :crowbar) (actions/talk entities :ego "It's a crowbar.")) (actions/talk entities :ego "I can't reach it.")))) - :closed-window (assoc (utils/get-texture "inside-jail/window.png") + :closed-window (assoc (utils/atlas->texture atlas "window") :night-profile :none :x 99 :y 111 :baseline 128) :guard { :object nil :width 100 :height 100 :x 70 :y 55 :talk-color (color 0.2 0.6 1.0 1.0)}}