more blinks.
This commit is contained in:
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
(defn make [screen]
|
(defn make [screen]
|
||||||
(let [shopkeep-sheet (texture! (utils/get-texture "inside-antique/shopkeep-talk.png") :split 18 21)
|
(let [shopkeep-sheet (texture! (utils/get-texture "inside-antique/shopkeep-talk.png") :split 18 21)
|
||||||
shopkeep-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 1 (repeat 50 0) 1 0 1 0 1])]
|
shopkeep-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 1 (repeat 50 0) 1 0 1 0])]
|
||||||
(aget shopkeep-sheet 0 i)))
|
(aget shopkeep-sheet 0 i)))
|
||||||
shopkeep-talk (animation 0.15 (for [i [0 2 0 2 0 3 1 0]]
|
shopkeep-talk (animation 0.15 (for [i [0 2 0 2 0 3 1 0]]
|
||||||
(aget shopkeep-sheet 0 i)))
|
(aget shopkeep-sheet 0 i)))
|
||||||
@@ -282,6 +282,10 @@
|
|||||||
:sigh shopkeep-sigh
|
:sigh shopkeep-sigh
|
||||||
:anim-merges {shopkeep-sigh {:origin-x 9}
|
:anim-merges {shopkeep-sigh {:origin-x 9}
|
||||||
:default {:origin-x 9}}
|
:default {:origin-x 9}}
|
||||||
|
:anim-sound-frames {shopkeep-stand {31 [:blink 0.5 1.5]
|
||||||
|
81 [:blink 0.5 1.5]
|
||||||
|
83 [:blink 0.5 1.5]}
|
||||||
|
shopkeep-talk {6 [:blink 0.5 1.5]}}
|
||||||
:script (actions/get-script entities (do-antique-dialogue entities))
|
:script (actions/get-script entities (do-antique-dialogue entities))
|
||||||
:scripts #(condp = %
|
:scripts #(condp = %
|
||||||
:teddy (actions/get-script entities
|
:teddy (actions/get-script entities
|
||||||
|
|||||||
@@ -606,7 +606,11 @@
|
|||||||
:talk game-player-talk-up}
|
:talk game-player-talk-up}
|
||||||
:get-to-work game-player-get-to-work
|
:get-to-work game-player-get-to-work
|
||||||
:pause-from-work game-player-pause-from-work
|
:pause-from-work game-player-pause-from-work
|
||||||
:anim-sound-frames {game-player-stand-up {11 [:blink 0.3] }
|
:anim-sound-frames {game-player-stand-up {11 [:blink 0.3 1.1] }
|
||||||
|
game-player-talk-up {11 [:blink 0.3 1.1]
|
||||||
|
22 [:blink 0.3 1.1]
|
||||||
|
24 [:blink 0.3 1.1]
|
||||||
|
27 [:blink 0.3 1.1]}
|
||||||
game-player-stand-down {1 [:writing-sound 0.07]}}
|
game-player-stand-down {1 [:writing-sound 0.07]}}
|
||||||
:flex game-player-flex)}
|
:flex game-player-flex)}
|
||||||
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
|
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)
|
||||||
|
|||||||
@@ -278,7 +278,7 @@
|
|||||||
(let [peddler-sheet (texture! (utils/get-texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
(let [peddler-sheet (texture! (utils/get-texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||||
peddler-talk (animation 0.18 (for [i (flatten [2 3 2 3 2 3 6 1 0 1 0 1 0 1 0 1 2 3 2 3 2 3 6 4 5 4 5 4 5 4 5])]
|
peddler-talk (animation 0.18 (for [i (flatten [2 3 2 3 2 3 6 1 0 1 0 1 0 1 0 1 2 3 2 3 2 3 6 4 5 4 5 4 5 4 5])]
|
||||||
(aget peddler-sheet 0 i)))
|
(aget peddler-sheet 0 i)))
|
||||||
peddler-stand (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 8 0) 6 (repeat 5 0) 4 5 4 5 4 5])]
|
peddler-stand (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 15 0) 6 (repeat 5 0) 4 5 4 5 4 5 (repeat 10 0)] )]
|
||||||
(aget peddler-sheet 0 i)))
|
(aget peddler-sheet 0 i)))
|
||||||
balloon-sheet (texture! (utils/get-texture "outside-castle/balloons.png") :split 20 36)
|
balloon-sheet (texture! (utils/get-texture "outside-castle/balloons.png") :split 20 36)
|
||||||
balloon-stand (animation 0.25 (for [i [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2]]
|
balloon-stand (animation 0.25 (for [i [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2]]
|
||||||
@@ -334,8 +334,12 @@
|
|||||||
(assoc (utils/get-texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]}
|
(assoc (utils/get-texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]}
|
||||||
:entities {:peddler (actions/start-animation screen
|
:entities {:peddler (actions/start-animation screen
|
||||||
(assoc (utils/get-texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
(assoc (utils/get-texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
||||||
:anim-sound-frames {peddler-stand {23 [:scratch 0.25]}
|
:anim-sound-frames {peddler-stand {8 [:blink 0.3 0.8]
|
||||||
peddler-talk {23 [:scratch 0.25]}}
|
24 [:blink 0.3 0.8]
|
||||||
|
30 [:scratch 0.15]}
|
||||||
|
peddler-talk {23 [:scratch 0.15]
|
||||||
|
6 [:blink 0.3 0.8]
|
||||||
|
22 [:blink 0.3 0.8]}}
|
||||||
:scratch (utils/load-sound "outside-castle/scratch.ogg")
|
:scratch (utils/load-sound "outside-castle/scratch.ogg")
|
||||||
:talk peddler-talk :stand peddler-stand
|
:talk peddler-talk :stand peddler-stand
|
||||||
:talk-color (color 1.0 0.9 0.4 1.0)
|
:talk-color (color 1.0 0.9 0.4 1.0)
|
||||||
|
|||||||
@@ -817,14 +817,16 @@ void main()
|
|||||||
(defn play-sound-if-necessary [screen entities target {:keys [previous-frame-index current-frame-index anim-sound-frames anim x y] :as e}]
|
(defn play-sound-if-necessary [screen entities target {:keys [previous-frame-index current-frame-index anim-sound-frames anim x y] :as e}]
|
||||||
(if (and (not= previous-frame-index current-frame-index)
|
(if (and (not= previous-frame-index current-frame-index)
|
||||||
((set (keys anim-sound-frames)) anim))
|
((set (keys anim-sound-frames)) anim))
|
||||||
(if-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
|
(if-let [[snd vol-scale pitch] (get-in anim-sound-frames [anim current-frame-index])]
|
||||||
(let [snd (if (fn? snd)
|
(let [snd (if (fn? snd)
|
||||||
(snd entities)
|
(snd entities)
|
||||||
snd)]
|
snd)]
|
||||||
(utils/play-sound! screen entities
|
(utils/play-sound! screen entities
|
||||||
(or (snd e) (snd (:sounds entities)))
|
(or (snd e) (snd (:sounds entities)))
|
||||||
(utils/sourced-volume-fn target vol-scale [x y])
|
(utils/sourced-volume-fn target vol-scale [x y])
|
||||||
(utils/get-sound-pan x)))
|
(utils/get-sound-pan x)
|
||||||
|
:once
|
||||||
|
pitch))
|
||||||
entities)
|
entities)
|
||||||
entities))
|
entities))
|
||||||
|
|
||||||
@@ -1014,7 +1016,7 @@ void main()
|
|||||||
|
|
||||||
:closing? {:object nil
|
:closing? {:object nil
|
||||||
:value false}
|
:value false}
|
||||||
:sounds {:blink (utils/load-sound "blink-other.ogg")
|
:sounds {:blink (utils/load-sound "ego/blink2.ogg")
|
||||||
:object nil}
|
:object nil}
|
||||||
:fade {:object nil
|
:fade {:object nil
|
||||||
:opacity 0.0}
|
:opacity 0.0}
|
||||||
|
|||||||
@@ -428,10 +428,13 @@
|
|||||||
(play-sound! screen entities snd volume-fn pan :once))
|
(play-sound! screen entities snd volume-fn pan :once))
|
||||||
|
|
||||||
([screen entities snd volume-fn pan type]
|
([screen entities snd volume-fn pan type]
|
||||||
|
(play-sound! screen entities snd volume-fn pan :once 1.0))
|
||||||
|
|
||||||
|
([screen entities snd volume-fn pan type pitch]
|
||||||
(let [vol (volume-fn entities)
|
(let [vol (volume-fn entities)
|
||||||
sound-id (if (= :once type)
|
sound-id (if (= :once type)
|
||||||
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) 1.0 pan)
|
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
|
||||||
(sound! snd :loop (scale-vol-from-fade entities (current-sound-volume vol)) 1.0 pan)) ]
|
(sound! snd :loop (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )) ]
|
||||||
(update-in entities [:current-sounds :value]
|
(update-in entities [:current-sounds :value]
|
||||||
conj {:id sound-id
|
conj {:id sound-id
|
||||||
:sound snd
|
:sound snd
|
||||||
|
|||||||
Reference in New Issue
Block a user