flip tiles according to h-flip

This commit is contained in:
Travis Shears 2026-04-19 21:26:02 +02:00
parent bbbe7bfe8a
commit a457893d14
Signed by: travisshears
GPG key ID: CB9BF1910F3F7469
4 changed files with 11 additions and 32 deletions

View file

@ -81,21 +81,7 @@
extract-pos (fn [tag] {:x (round-num-str (get-in tag [:attrs :x]))
:y (round-num-str (get-in tag [:attrs :y]))})]
{:player-1 (extract-pos player-1)
:player-2 (extract-pos player-2)})
;; {:tag :objectgroup,
;; :attrs {:id "2", :name "spawns"},
;; {:player-1 nil
;; :player-2 nil}
;; (vec (reduce (fn [acc tag]
;; (if (= (:tag tag) :object)
;; (conj acc
;; (hash-map
;; :name (get-in tag [:attrs :name])
;; :x (Math/round (Double/parseDouble (get-in tag [:attrs :x])))
;; :y (Math/round (Double/parseDouble (get-in tag [:attrs :y])))))
;; acc)) '() (:content (first (filter #(= (get-in % [:attrs :name]) "spawns") tags))))))))
}))
:player-2 (extract-pos player-2)})}))
(def levels {:levels {:level-001 (parse-map level-001-map-tmx)
:tutorial (parse-map tutorial-map-tmx)}
:colliders colliders})