jail too.

This commit is contained in:
Bryce Covert
2017-05-29 08:43:34 -07:00
parent 5a3ec9a94a
commit a03872beaa
5 changed files with 28 additions and 20 deletions

View File

@@ -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)}}