From ec51db0ee0488dd4a526040ef0e5e7d5306a603b Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Wed, 24 Dec 2014 13:43:24 -0800 Subject: [PATCH] music. --- desktop/src-common/advent/screens/rooms/inside_castle.clj | 6 ++++-- desktop/src-common/advent/screens/rooms/outside_castle.clj | 1 + desktop/src-common/advent/screens/scene.clj | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 65a76cbf..b596dccc 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -98,6 +98,7 @@ (defn pull-sword [entities] (actions/play-animation entities :ego :reach) + (actions/transition-music entities :town-1 :pull-sword) (actions/add-entity entities :blackout (get-in @entities [:room :blackout])) (actions/add-entity entities :pull-sword (get-in @entities [:room :pull-sword])) (actions/play-animation entities :pull-sword :pull-sword) @@ -105,6 +106,7 @@ (actions/remove-entity entities :sword) (actions/remove-entity entities :pull-sword) (actions/remove-entity entities :blackout) + (actions/transition-music entities :pull-sword :town-1) (actions/do-dialogue entities :ego "That was weird." :ego "I have to go show my friends!") (actions/walk-to entities :ego [85 145] :face :right) @@ -153,10 +155,10 @@ game-player-stand (animation 0.15 (for [i [0 0 0 0 0 0 0 0 0 0 0 1]] (aget game-player-talk-sheet 0 i))) - game-player-flex (animation 0.075 (for [i [0 0 4 4 5 5 5 5 5 5 5 6 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 6 5 5 5 5 5 5 5 5 5 5 4 4 0 0 0 0]] + game-player-flex (animation 0.075 (for [i [0 0 4 4 5 5 5 5 5 5 5 6 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 6 5 5 5 5 5 5 5 5 5 5 4 4 0 0 0 0]] (aget game-player-talk-sheet 0 i))) trophy (utils/make-anim "inside-castle/trophy.png" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1])) - pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [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 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]))] + pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]))] (rooms/make :music :town-1 :interactions {:right-door {:box [286 140 306 160] diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 6f86f766..2f2a9c62 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -118,6 +118,7 @@ (cond (actions/has-obtained? entities :balloon) (do-completed-peddler-conversation entities) (get-in @entities [:state :wants-toy]) (do-wants-toy-conversation entities) :else (do-initial-peddler-conversation entities))) + (defn make [screen] (let [peddler-sheet (texture! (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])] diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index e78b5dd0..63b78df0 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -314,7 +314,8 @@ :town-1 (make-music "town-music-1.ogg") :town-2 (make-music "town-music-2.ogg") :inside-fangald (make-music "inside-fangald.ogg") - :fight (make-music "megaboss.mp3")} + :fight (make-music "megaboss.mp3") + :pull-sword (make-music "pull-sword.ogg")} :state (get-state) :actions {:object nil :channel (chan)