(ns advent.screens.rooms.cat-tree
  (:require [advent.screens.rooms :as rooms]
            [advent.actions :as actions]
            [advent.utils :as utils]
            [clojure.zip :as zip]
            [play-clj.core :refer :all]
            [play-clj.ui :refer :all]
            [play-clj.utils :refer :all]
            [play-clj.g2d :refer :all]))

(defn make [screen]
  (rooms/make :interactions
              {:down-dir {:box [150 0 270 20]
                          :script (actions/get-script entities
                                                      (actions/walk-to entities :ego [203 1])
                                                      (actions/transition-background entities :outside-house [137 204])
                                                      (actions/walk-to entities :ego [195 140]))
                          :cursor :down}}
              :layers [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
                       (assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
                       (assoc (texture "cat-tree/sillhoute.png") :x 0 :y 0 :baseline 240)]
              :entities {}
              :collision "cat-tree/collision.png"
              :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.20)))
