diff --git a/desktop/resources/cat-tree/Untitled.png b/desktop/resources/cat-tree/Untitled.png new file mode 100644 index 00000000..d7aa4bf6 Binary files /dev/null and b/desktop/resources/cat-tree/Untitled.png differ diff --git a/desktop/resources/cat-tree/grandma.png b/desktop/resources/cat-tree/grandma.png new file mode 100644 index 00000000..7d954840 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.png differ diff --git a/desktop/resources/cat-tree/grandma.pxa/0.pxi b/desktop/resources/cat-tree/grandma.pxa/0.pxi new file mode 100644 index 00000000..877f0472 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/0.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/1.pxi b/desktop/resources/cat-tree/grandma.pxa/1.pxi new file mode 100644 index 00000000..9d0da782 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/1.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/2.pxi b/desktop/resources/cat-tree/grandma.pxa/2.pxi new file mode 100644 index 00000000..073f432b Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/2.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/3.pxi b/desktop/resources/cat-tree/grandma.pxa/3.pxi new file mode 100644 index 00000000..7745afe3 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/3.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/4.pxi b/desktop/resources/cat-tree/grandma.pxa/4.pxi new file mode 100644 index 00000000..672fed4e Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/4.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/5.pxi b/desktop/resources/cat-tree/grandma.pxa/5.pxi new file mode 100644 index 00000000..e0cae98e Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/5.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/6.pxi b/desktop/resources/cat-tree/grandma.pxa/6.pxi new file mode 100644 index 00000000..bc0f6c14 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/6.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/7.pxi b/desktop/resources/cat-tree/grandma.pxa/7.pxi new file mode 100644 index 00000000..b2eba581 Binary files /dev/null and b/desktop/resources/cat-tree/grandma.pxa/7.pxi differ diff --git a/desktop/resources/cat-tree/grandma.pxa/CelData.plist b/desktop/resources/cat-tree/grandma.pxa/CelData.plist new file mode 100644 index 00000000..3cc9cf5c --- /dev/null +++ b/desktop/resources/cat-tree/grandma.pxa/CelData.plist @@ -0,0 +1,38 @@ + + + + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + diff --git a/desktop/resources/cat-tree/pounce.png b/desktop/resources/cat-tree/pounce.png new file mode 100644 index 00000000..d7aa4bf6 Binary files /dev/null and b/desktop/resources/cat-tree/pounce.png differ diff --git a/desktop/resources/inside-castle/hands-1.png b/desktop/resources/inside-castle/hands-1.png index 90780529..83201612 100644 Binary files a/desktop/resources/inside-castle/hands-1.png and b/desktop/resources/inside-castle/hands-1.png differ diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index d9a36ea5..64131e29 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -89,7 +89,7 @@ ~@forms)) (reset! ~entities (texture screen cat-stand) :x 184 :y 173 :baseline 1000 + :walk cat-walk + :stand cat-stand :script (actions/get-script entities (actions/talk entities :ego "Here kitty, kitty, kitty.") (actions/talk entities :ego "Kitty's not so interested in me.")) @@ -64,13 +71,35 @@ (actions/play-animation entities :ego :cat-toy) (if (get-in @entities [:room :entities :ladder]) (do (actions/talk entities :ego "I think he's going for it!") - (actions/play-animation entities :ego :cat-toy) + (actions/play-animation entities :ego :cat-toy-first-half :stop? false) + (actions/walk-straight-to entities :cat [138 40] :update-baseline? false :speed 3) + (actions/play-animation entities :ego :cat-toy-last-half) + (swap! entities #(assoc-in % [:room :entities :grandma :stand] + (get-in % [:room :entities :grandma :cat-stand]))) + (actions/play-animation entities :grandma :squat) (actions/remove-entity entities :cat) (get-down entities) + (actions/do-dialogue entities + :grandma "Thank you for rescuing my furry friend, young man!" + :ego "It's nothing." + :grandma "You are so brave!" + :grandma "Here's a certificate of bravery!") (actions/talk entities :ego "TODO: get award from little old lady in this room") (actions/give entities :certificate)) (actions/talk entities :ego "I guess I'm too far away.")))}) - cat-stand)} + cat-stand) + :grandma (assoc (animation->texture screen grandma-stand) + :x 130 :y 37 :baseline 200 + :anim grandma-stand + :anim-start 0 + :talk grandma-talk + :cat-stand grandma-cat-stand + :stand grandma-stand + :squat grandma-squat + :origin-x 12 + :origin-y 0 + :scale-x 1.45 + :scale-y 1.45)} :collision "cat-tree/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20) :apply-state (fn [entities] diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index 0e31842f..c33dddff 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -109,6 +109,10 @@ (texture (aget reach-sheet 0 i)))) cat-toy-anim (animation 0.1 (for [i [0 0 1 1 2 2 3 4 3 2 3 4 3 2 3 4 3 2 3 4 3 2 2 1 1 0 0]] (texture (aget cat-toy-sheet 0 i)))) + cat-toy-first-half (animation 0.1 (for [i [0 0 1 1 2 2 3]] + (texture (aget cat-toy-sheet 0 i)))) + cat-toy-last-half (animation 0.1 (for [i [3 3 3 2 1 1 0 0]] + (texture (aget cat-toy-sheet 0 i)))) fire-1-anim (animation 0.1 (for [i [0 1 2 2 2 3 2 3 2 2 2 1 0]] (texture (aget fire-sheet 0 i)))) fire-2-anim (animation 0.1 (for [i [0 1 2 2 2 2 3 2 3 2 2 2 4 5 6 7 2 2 2 2 2 2 2 2 1 0]] @@ -126,6 +130,8 @@ :end-squat end-squat :reach reach-anim :cat-toy cat-toy-anim + :cat-toy-first-half cat-toy-first-half + :cat-toy-last-half cat-toy-last-half :grow grow :hold-up-to-window hold-up-to-window [:fire 1] fire-1-anim @@ -139,6 +145,8 @@ :squat (utils/flip squat-anim) :reach (utils/flip reach-anim) :cat-toy (utils/flip cat-toy-anim) + :cat-toy-first-half (utils/flip cat-toy-first-half) + :cat-toy-last-half (utils/flip cat-toy-last-half) :grow (utils/flip grow) :hold-up-to-window (utils/flip hold-up-to-window) [:fire 1] (utils/flip fire-1-anim)