This commit is contained in:
2015-02-19 23:22:28 -08:00
parent d8af16b82a
commit 843fde014d
10 changed files with 28 additions and 4 deletions

Binary file not shown.

Binary file not shown.

BIN
desktop/resources/blink.ogg Normal file

Binary file not shown.

BIN
desktop/resources/blink.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -323,6 +323,7 @@
:game-player (assoc (texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
`:talk-color (color 1.0 0.3 0.2 1.0)
:script (actions/get-script entities (do-game-player-dialogue entities))
:blink (sound "blink-other.ogg")
:scripts #(condp = %
:wool (actions/get-script entities
(walk-to-player entities)
@@ -371,6 +372,7 @@
:anim game-player-stand
:anim-start 0
:stand game-player-stand
:anim-sound-frames {game-player-stand {11 [:blink 0.3] }}
:flex game-player-flex
:talk game-player-talk)}
:monocle (rooms/make-entity :monocle (assoc (animation->texture screen monocle)

View File

@@ -295,8 +295,9 @@
:sunrise [(assoc (texture "outside-castle/background-sunrise.png") :x 0 :y 0 :baseline 0)]}
:entities {:peddler (actions/start-animation screen
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}}
:scratch (sound "scratch.ogg")
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}
peddler-talk {23 [:scratch 1.0]}}
:scratch (sound "outside-castle/scratch.ogg")
:talk peddler-talk :stand peddler-stand
:talk-color (color 1.0 0.9 0.4 1.0)
:script (actions/get-script

View File

@@ -135,6 +135,7 @@
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
walk-right (animation 0.075 (for [i (range 8)]
(texture (aget player-sheet 0 i))))
stand-anim (animation 0.1 (for [i (flatten [(repeat 6 [(repeat 10 0) (repeat 3 1) (repeat 20 0)]) 3 4 5 5 5 6 5 6 5 6 5 4 3 ])]
(texture (aget stand-sheet 0 i))))
reach-up (animation 0.1 (for [i [0 3 4 5]]
@@ -247,6 +248,7 @@
:scaled true
:step-sound-1 (sound "ego/step-1.ogg")
:step-sound-2 (sound "ego/step-2.ogg")
:blink (sound "blink.ogg")
:scale-x start-scale
:scale-y start-scale
:talk-color (color 0.6 1.0 1.0 1.0)
@@ -298,7 +300,23 @@
ego (assoc ego :anim-sound-frames {(get-in ego [:left :walk]) {2 [:step-sound-1 1.0]
6 [:step-sound-2 0.8]}
(get-in ego [:right :walk]) {2 [:step-sound-1 1.0]
6 [:step-sound-2 0.8]}}
6 [:step-sound-2 0.8]}
(get-in ego [:left :talk] ) {2 [:blink 0.2]}
(get-in ego [:right :talk] ) {2 [:blink 0.2]}
(get-in ego [:left :stand]) {11 [:blink 0.20]
44 [:blink 0.20]
77 [:blink 0.20]
110 [:blink 0.20]
143 [:blink 0.20]
176 [:blink 0.20]}
(get-in ego [:right :stand]) {11 [:blink 0.20]
44 [:blink 0.20]
77 [:blink 0.20]
110 [:blink 0.20]
143 [:blink 0.20]
176 [:blink 0.20]}}
:anim-merges {(get-in ego [:right :shock]) {:origin-x 15}
:default {:origin-x 9}})]
(actions/start-animation screen
@@ -374,6 +392,7 @@
(when (and (not= previous-frame-index current-frame-index)
((set (keys anim-sound-frames)) anim))
(when-let [[snd vol-scale] (get-in anim-sound-frames [anim current-frame-index])]
(let [vol (if (= target :ego)
(* (/ (get-in entities [:ego :scale-x]) 1.5) 0.75)
(max 0.0
@@ -508,7 +527,9 @@
(set! (.. (:value (:cam entities)) position x) (:x (:cam entities) 160.0))
(set! (.. (:value (:cam entities)) position y) (:y (:cam entities) 120.0))
(play-key-sounds (get-in entities [:room :entities]))
(when (= (get-in entities [:fade :opacity])
0.0)
(play-key-sounds (get-in entities [:room :entities])))
(doseq [m (vals (get-in entities [:musics]))]
(when m
(music! m :set-volume (get-in entities [:volume :value]))))