diff --git a/desktop/resources/ego/talk.png b/desktop/resources/ego/talk.png new file mode 100644 index 00000000..f3ac2f3b Binary files /dev/null and b/desktop/resources/ego/talk.png differ diff --git a/desktop/resources/ego/talk.pxa/0.pxi b/desktop/resources/ego/talk.pxa/0.pxi new file mode 100644 index 00000000..54154a51 Binary files /dev/null and b/desktop/resources/ego/talk.pxa/0.pxi differ diff --git a/desktop/resources/ego/talk.pxa/1.pxi b/desktop/resources/ego/talk.pxa/1.pxi new file mode 100644 index 00000000..5a512d07 Binary files /dev/null and b/desktop/resources/ego/talk.pxa/1.pxi differ diff --git a/desktop/resources/ego/talk.pxa/2.pxi b/desktop/resources/ego/talk.pxa/2.pxi new file mode 100644 index 00000000..54154a51 Binary files /dev/null and b/desktop/resources/ego/talk.pxa/2.pxi differ diff --git a/desktop/resources/ego/talk.pxa/3.pxi b/desktop/resources/ego/talk.pxa/3.pxi new file mode 100644 index 00000000..83fd44ef Binary files /dev/null and b/desktop/resources/ego/talk.pxa/3.pxi differ diff --git a/desktop/resources/ego/talk.pxa/4.pxi b/desktop/resources/ego/talk.pxa/4.pxi new file mode 100644 index 00000000..54154a51 Binary files /dev/null and b/desktop/resources/ego/talk.pxa/4.pxi differ diff --git a/desktop/resources/ego/talk.pxa/5.pxi b/desktop/resources/ego/talk.pxa/5.pxi new file mode 100644 index 00000000..83fd44ef Binary files /dev/null and b/desktop/resources/ego/talk.pxa/5.pxi differ diff --git a/desktop/resources/ego/talk.pxa/6.pxi b/desktop/resources/ego/talk.pxa/6.pxi new file mode 100644 index 00000000..83fc4c44 Binary files /dev/null and b/desktop/resources/ego/talk.pxa/6.pxi differ diff --git a/desktop/resources/ego/talk.pxa/7.pxi b/desktop/resources/ego/talk.pxa/7.pxi new file mode 100644 index 00000000..83fd44ef Binary files /dev/null and b/desktop/resources/ego/talk.pxa/7.pxi differ diff --git a/desktop/resources/ego/talk.pxa/CelData.plist b/desktop/resources/ego/talk.pxa/CelData.plist new file mode 100644 index 00000000..c97686f0 --- /dev/null +++ b/desktop/resources/ego/talk.pxa/CelData.plist @@ -0,0 +1,38 @@ + + + + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + duration + 0.20000000298023224 + + + diff --git a/desktop/resources/player.png b/desktop/resources/player.png index eb2cfc3a..337ab98f 100644 Binary files a/desktop/resources/player.png and b/desktop/resources/player.png differ diff --git a/desktop/resources/town-music.mp3 b/desktop/resources/town-music.mp3 new file mode 100644 index 00000000..75045f31 Binary files /dev/null and b/desktop/resources/town-music.mp3 differ diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index f305f9d9..3e318110 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -59,7 +59,8 @@ (defn talk [target-id text] (fn [screen entities] (run! dialogue/talking-screen :on-talk :text text - :x (get-in entities [target-id :x]) :y (+ (get-in entities [target-id :y]) 25) + :x (get-in entities [target-id :x]) :y (+ (get-in entities [target-id :y]) 35) :target-id target-id) (-> entities - (update-in [target-id :actions] rest)))) + (update-in [target-id :actions] rest) + (assoc-in [target-id :anim] (get-in entities [target-id :talk]))))) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 9a32a45b..bb2cc73e 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -56,10 +56,13 @@ (defn get-ego [screen] (let [player-sheet (texture! (texture "player.png") :split 18 36) + talk-sheet (texture! (texture "ego/talk.png") :split 16 36) ego {:right (animation 0.075 (for [i (range 8)] (texture (aget player-sheet 0 i)))) :left (animation 0.075 (for [i (range 8)] (texture (aget player-sheet 1 i)))) + :talk (animation 0.2 (for [i (range 8)] + (texture (aget talk-sheet 0 i)))) :baseline 95 :origin-x 9 @@ -94,8 +97,8 @@ background-trees (texture "background-trees.png") house (texture "house.png") overdirt (texture "overdirt.png") - music (sound "outside-house.mp3") - ;; _ (sound! music :loop) + music (sound "town-music.mp3") + _ (sound! music :loop) ] { :cursor {:id "cursor" :cursor-index 0 } @@ -114,7 +117,8 @@ :interactions [{:mouse-in? (zone/box 258 100 281 160) :click-fn (fn [screen entities [x y]] (assoc-in entities [:ego :actions] [(actions/stop :ego) - (actions/talk :ego "Looking at the house.")]))}] + (actions/talk :ego (str "The last time I went through that door, \n" + "Fangald turned me into a frog."))]))}] :scale-fn (scaler-fn-with-baseline 110 0.10 1.00) :layers [(assoc background :x 0 :y 0 :baseline 0) (assoc house :x 0 :y 0 :baseline 122)