           :configs (conj (subvec cfgs 0 (dec (count cfgs)))
                          (heval/recache-trs (:ha-defs wld)
                                             last-config)))))))
-
-(defonce key-states (atom {:on       #{}
-                           :pressed  #{}
-                           :released #{}}))
-
 (defn pair [a b]
   (map (fn [ai bi] [ai bi]) a b))
 

        defs (:ha-defs w)
        [obj-dict tr-caches] (heval/init-has
                               defs
                               (map (fn [{id :id state :state :as ha-desc}]
                                      (let [v0 (dissoc ha-desc :id :type :state)]
                                        (ha/init-ha (get defs id)
                                                    id

   :camera-height 240
   :scroll-x      0
   :scroll-y      0
   :walls         {0 {:type :white :x 0 :y 0 :w 256 :h 8}
                   1 {:type :white :x 0 :y 8 :w 8 :h 16}
                   2 {:type :white :x 96 :y 8 :w 8 :h 16}
                   3 {:type :white :x 160 :y 8 :w 8 :h 16}}
   :objects       {:ga {:type  :goomba
                        :state :right
                        :x     8 :y 8}
                   :gb {:type  :goomba
                        :state :right
                        :x     32 :y 8}
                   :gc {:type  :goomba
                        :state :right
                        :x     12 :y 35}
                   :gd {:type  :goomba
                        :state :right
                        :x     64 :y 8}
                   :ge {:type  :goomba
                        :state :right
                        :x     96 :y 32}
                   :m  {:type  :mario
                        :state :idle-right
                        :x     200 :y 8}}})

(set! heval/frame-length (/ 1 30))
(set! heval/time-units-per-frame 10000)
