antique shop.

This commit is contained in:
Bryce Covert
2017-05-28 18:12:18 -07:00
parent 645ee8cc26
commit 12ee651ea5

View File

@@ -197,15 +197,16 @@
(assoc-in [:room :entities :glow :opacity] 0.0))))
(defn make [screen]
(let [shopkeep-sheet (texture! (utils/get-texture "inside-antique/shopkeep-talk.png") :split 18 21)
(let [[screen atlas] (utils/acquire-atlas screen "packed/inside-antique.atlas")
shopkeep-sheet (texture! (utils/atlas->texture atlas "shopkeep-talk") :split 18 21)
shopkeep-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 1 (repeat 50 0) 1 0 1 0])]
(aget shopkeep-sheet 0 i)))
shopkeep-talk (animation 0.15 (for [i [0 2 0 2 0 3 1 0]]
(aget shopkeep-sheet 0 i)))
shopkeep-sigh (utils/make-anim "inside-antique/antique-sigh.png" [24 21] 0.12 (flatten [ (range 9) 0 0 ]))
shopkeep-sigh (utils/make-anim atlas "antique-sigh" [24 21] 0.12 (flatten [ (range 9) 0 0 ]))
beard (utils/make-anim "inside-antique/beard.png" [28 54] 0.5 [0 1 0 2])
teddy (assoc (utils/get-texture "inside-antique/teddy.png")
beard (utils/make-anim atlas "beard" [28 54] 0.5 [0 1 0 2])
teddy (assoc (utils/atlas->texture atlas "teddy")
:x 255
:y 95
:baseline 160
@@ -342,10 +343,10 @@
:ego "It's a tapestry of Rupert the Lion!"
:ego "He's the town of Remington's mascot."))}
}
:layers [(assoc (utils/get-texture "inside-antique/background.png") :x 0 :y 0 :baseline 0)
(assoc (utils/get-texture "inside-antique/desk.png") :x 0 :y 0 :baseline 113)
:layers [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0)
(assoc (utils/atlas->texture atlas "desk") :x 0 :y 0 :baseline 113)
(assoc (utils/get-texture "inside-antique/fg.png") :x 0 :y 0 :baseline 320 :parallax 1.5)
(assoc (utils/atlas->texture atlas "fg") :x 0 :y 0 :baseline 320 :parallax 1.5)
]
:entities {:shopkeep (actions/start-animation screen (assoc (animation->texture screen shopkeep-stand) :x 148 :y 122 :baseline 112
:label "Shopkeeper"
@@ -381,10 +382,10 @@
(actions/get-script entities
(actions/talk entities :shopkeep "No thanks, sonny."))))
:stand)
:glow (assoc (utils/get-texture "inside-antique/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)
:closed-blinds (assoc (utils/get-texture "inside-antique/closed-blinds.png") :x 0 :y 0 :baseline 0 :opacity 1.0)
:open-blinds (assoc (utils/get-texture "inside-antique/open-blinds.png") :x 0 :y 0 :baseline 0 :opacity 0.0)
:darken (assoc (utils/get-texture "inside-antique/darken.png") :x 0 :y 0 :baseline 321 :opacity 0.4 )
:glow (assoc (utils/atlas->texture atlas "glow") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)
:closed-blinds (assoc (utils/atlas->texture atlas "closed-blinds") :x 0 :y 0 :baseline 1 :opacity 1.0)
:open-blinds (assoc (utils/atlas->texture atlas "open-blinds") :x 0 :y 0 :baseline 1 :opacity 0.0)
:darken (assoc (utils/atlas->texture atlas "darken") :x 0 :y 0 :baseline 321 :opacity 0.4 )
:beard (assoc (animation->texture screen beard)
:anim beard
:anim-start 0
@@ -397,11 +398,11 @@
:fire-particle (doto (assoc (particle-effect "particles/fire-particle") :x 162 :y 104
:baseline 240)
(particle-effect! :set-position 162 104))
:bowl (assoc (utils/get-texture "inside-antique/bowl.png")
:images [(utils/get-texture "inside-antique/bowl-0.png")
(utils/get-texture "inside-antique/bowl-1.png")
(utils/get-texture "inside-antique/bowl-2.png")
(utils/get-texture "inside-antique/bowl-3.png")]
:bowl (assoc (utils/atlas->texture atlas "bowl")
:images [(utils/atlas->texture atlas "bowl-0")
(utils/atlas->texture atlas "bowl-1")
(utils/atlas->texture atlas "bowl-2")
(utils/atlas->texture atlas "bowl-3")]
:x 165
:y 110
:baseline 125
@@ -450,7 +451,7 @@
:shopkeep "Pronto!"))))))
:teddy teddy}
:portrait (rooms/make-entity :portrait
(assoc (utils/get-texture "inside-antique/portrait.png")
(assoc (utils/atlas->texture atlas "portrait")
:x 112
:y 114
:baseline 120