all rooms now!

This commit is contained in:
Bryce Covert
2017-05-29 09:31:28 -07:00
parent ad1f73ef9d
commit f0bce2180f
19 changed files with 825 additions and 634 deletions

View File

@@ -80,7 +80,7 @@
(skip-type [this screen entities]
:none)))
(defn swing-at-blergh [entities]
(defn swing-at-blergh [entities atlas]
(let [jump-path (bezier (map #(apply vector-2* %) [[35 45] [110 145] [195 180]]))
swing-path (bezier (map #(apply vector-2* %) [[195 180] [205 45]]))
jump-dist (utils/dist 35 45 205 45)
@@ -94,7 +94,7 @@
(utils/play-sound! screen entities :jump (constantly 0.9))
(-> entities
(assoc-in [:room :entities :cloud] (assoc (utils/get-texture "space/cloud.png")
(assoc-in [:room :entities :cloud] (assoc (utils/atlas->texture atlas "cloud")
:x (- (get-in entities [:room :entities :ego :x]) 10)
:y (get-in entities [:room :entities :ego :y])
:origin-x 7
@@ -183,13 +183,14 @@
(* 0.3 (get-in entities [:room :entities :bloodclot :opacity])))
(defn make [screen]
(let [bloodclot-head-talk-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [0 0 1 1 2 2 1 1 0 0 1 1 2 2 1 1 0 0 3 4 4 4 3 0 0 1 1 2 2 1 1 0 0 0 0 5 5 5 6 6 6 7 7 7])
bloodclot-head-stand-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 3])
bloodclot-head-shoot-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 10 11 10 11 10 11 10 11 10 11 10 11])
bloodclot-head-keep-shoot-anim (utils/make-anim-seq "space/bloodclot-head-talk" [82 75] 0.05 [12 13])
blergh-stand-anim (utils/make-anim "space/bloodclot-stand.png" [106 165] 0.9 [0 1])
bloodclot-explode (utils/make-anim-seq "space/bloodclot-explode" [106 165] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 7 7 7 7 8 8 8 8 8 7 7 7 7 8 8 7 7 7 7 8 8 8 7 8 8 8 8 8 8 8 8 9 8 8 8 8 9 9 8 8 8 8 8 8 8 9 9 9 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 10 9 10 10 8 9 9 9 9 9 10 10 10 10 9 9 9 9 9 9 9 9 9 9 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 12 13 14 15 16 17 18 19 20 21 22])
bullet (utils/make-anim "space/bullet.png" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7])
(let [[screen atlas] (utils/acquire-atlas screen "packed/space.atlas")
bloodclot-head-talk-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [0 0 1 1 2 2 1 1 0 0 1 1 2 2 1 1 0 0 3 4 4 4 3 0 0 1 1 2 2 1 1 0 0 0 0 5 5 5 6 6 6 7 7 7])
bloodclot-head-stand-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 4 3])
bloodclot-head-shoot-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 8 9 10 11 10 11 10 11 10 11 10 11 10 11])
bloodclot-head-keep-shoot-anim (utils/make-anim-seq atlas "bloodclot-head-talk" [82 75] 0.05 [12 13])
blergh-stand-anim (utils/make-anim atlas "bloodclot-stand" [106 165] 0.9 [0 1])
bloodclot-explode (utils/make-anim-seq atlas "bloodclot-explode" [106 165] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 5 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 7 7 7 7 8 8 8 8 8 7 7 7 7 8 8 7 7 7 7 8 8 8 7 8 8 8 8 8 8 8 8 9 8 8 8 8 9 9 8 8 8 8 8 8 8 9 9 9 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 10 9 10 10 8 9 9 9 9 9 10 10 10 10 9 9 9 9 9 9 9 9 9 9 10 10 10 10 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 12 13 14 15 16 17 18 19 20 21 22])
bullet (utils/make-anim atlas "bullet" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7])
effect (particle-effect "particles/appear")
blowup-effect (particle-effect "particles/blowup")
lightning-effect (particle-effect "particles/lightning")
@@ -202,13 +203,13 @@
:swing-sword (utils/load-sound "space/swingsword.ogg")}
:interactions
{}
:layers [(assoc (utils/get-texture "space/background.png") :x 0 :y 0 :baseline 0)]
:layers [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0)]
:timers {:taunt [10.0 8.0 taunt]
:shock [5.0 15.0 shock]}
:entities {:appear (assoc effect
:x 240 :y 50
:baseline 200)
:later (assoc (utils/get-texture "space/later.png")
:later (assoc (utils/atlas->texture atlas "later")
:x 0 :y 0
:baseline 240
:opacity 0.0)
@@ -273,7 +274,7 @@
(if (actions/has-item? entities :magic-slingshot)
(if (get-in @entities [:state :broke-jewel?])
(do
(swing-at-blergh entities)
(swing-at-blergh entities atlas)
(actions/do-dialogue entities
:bloodclot-head "Ha ha ha! Still a weakling, I see."
:bloodclot-head "But you'll not best me!")
@@ -286,7 +287,7 @@
(actions/update-entity entities :ego (fn [e]
(dissoc e :stand-override :talk-override)))
(actions/update-entity entities :ego #(assoc % :get-script (:original-get-script %)))
(swing-at-blergh entities)
(swing-at-blergh entities atlas)
(actions/do-dialogue entities :bloodclot-head "Ha ha ha! Is that the best you can do?"
:bloodclot-head "Take this!")
@@ -338,7 +339,7 @@
:bullet (assoc (animation->texture screen bullet)
:x 37 :y 85 :baseline 241
:walk bullet)
:broken-jewel (assoc (utils/get-texture "space/broken-jewel.png")
:broken-jewel (assoc (utils/atlas->texture atlas "broken-jewel")
:x 225 :y 170 :baseline 240)
:collision "space/collision.png"
:scale-fn (constantly 1.5)