diff --git a/desktop/gametodos.txt b/desktop/gametodos.txt index 7f8dbe19..da8d3692 100644 --- a/desktop/gametodos.txt +++ b/desktop/gametodos.txt @@ -1,8 +1,6 @@ + Grandma cry? + More ways to burn paper + drool icon -++ antique position -+ origins are still messed up when scaling + loop sounds update every frame instead of each play + door open and close animations + shitty plates diff --git a/desktop/resources/outsidehouse/door.png b/desktop/resources/outsidehouse/door.png new file mode 100644 index 00000000..7fb42fb7 Binary files /dev/null and b/desktop/resources/outsidehouse/door.png differ diff --git a/desktop/resources/outsidehouse/door.pxa/0.pxi b/desktop/resources/outsidehouse/door.pxa/0.pxi new file mode 100644 index 00000000..38426df6 Binary files /dev/null and b/desktop/resources/outsidehouse/door.pxa/0.pxi differ diff --git a/desktop/resources/outsidehouse/door.pxa/1.pxi b/desktop/resources/outsidehouse/door.pxa/1.pxi new file mode 100644 index 00000000..989fec2c Binary files /dev/null and b/desktop/resources/outsidehouse/door.pxa/1.pxi differ diff --git a/desktop/resources/outsidehouse/door.pxa/2.pxi b/desktop/resources/outsidehouse/door.pxa/2.pxi new file mode 100644 index 00000000..950f8113 Binary files /dev/null and b/desktop/resources/outsidehouse/door.pxa/2.pxi differ diff --git a/desktop/resources/outsidehouse/door.pxa/3.pxi b/desktop/resources/outsidehouse/door.pxa/3.pxi new file mode 100644 index 00000000..71619ffd Binary files /dev/null and b/desktop/resources/outsidehouse/door.pxa/3.pxi differ diff --git a/desktop/resources/outsidehouse/door.pxa/CelData.plist b/desktop/resources/outsidehouse/door.pxa/CelData.plist new file mode 100644 index 00000000..f0b74d60 --- /dev/null +++ b/desktop/resources/outsidehouse/door.pxa/CelData.plist @@ -0,0 +1,22 @@ + + + + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index 945fbfc2..031aac4c 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -324,6 +324,7 @@ lamb-walk-sheet (texture! (texture "outsidehouse/lamb-walk.png") :split 27 28) sheep-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 9 10 (repeat 25 11) (repeat 15 12)])] (aget sheep-stand-sheet 0 i))) + door (utils/make-anim "outsidehouse/door.png" [22 58] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3])) sheep-walk (animation 0.05 (for [i (range 6)] (aget sheep-walk-sheet 0 i))) butterfly-stand (utils/make-anim "butterfly.png" [7 7] 0.1 [0 1]) @@ -341,11 +342,11 @@ entities (actions/walk-to entities :ego [257 90] :face :right) (actions/talk entities :ego (str "Anyone home?")) - (sound! (sound "door.ogg") :play (utils/current-sound-volume)) (actions/play-animation entities :ego :reach) (if (= :night (get-in @entities [:state :time])) (actions/talk entities :ego "It's locked.") - (do (actions/transition-background entities :inside-house [237 0] :between (fn [s e] + (do (actions/play-animation entities :door :open) + (actions/transition-background entities :inside-house [237 0] :between (fn [s e] (if (= 1 (rand-int 10)) (assoc-in e [:room :entities :experiment] (get-in e [:room :experiment])) e))) @@ -457,6 +458,12 @@ :x 153 :y 105 :baseline 238) + :door (assoc (animation->texture screen door) + :x 253 :y 88 :baseline 122 + :open door + :door-sound (sound "door.ogg") + :anim-sound-frames {door {1 [:door-sound 1.0]}} + ) :lamb (assoc (texture "outsidehouse/lamb.png") :x 10 :y 163 :baseline 77 :right {:stand (animation 0.1 [lamb-stand])