perf improvements, mobile working on i4s
This commit is contained in:
@@ -128,15 +128,19 @@
|
||||
|
||||
(defonce selected-save (atom nil))
|
||||
|
||||
(defn current-music-volume [& [^double factor]]
|
||||
(-> (Math/pow (unchecked-multiply (:music-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.25)
|
||||
(unchecked-multiply (or factor 1.0))))
|
||||
(defn current-music-volume
|
||||
([] (current-music-volume 1.0))
|
||||
([^double factor]
|
||||
(-> (Math/pow (unchecked-multiply (:music-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.25)
|
||||
(unchecked-multiply (double factor)))))
|
||||
|
||||
(defn current-sound-volume [& [factor]]
|
||||
(-> (Math/pow (unchecked-multiply (:sound-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.5)
|
||||
(unchecked-multiply (or factor 1.0))))
|
||||
(defn current-sound-volume
|
||||
([] (current-sound-volume 1.0))
|
||||
([^double factor]
|
||||
(-> (Math/pow (unchecked-multiply (:sound-volume @settings) 0.01) 2)
|
||||
(unchecked-multiply 0.5)
|
||||
(unchecked-multiply (double factor)))))
|
||||
|
||||
(defn cursor [filename which]
|
||||
(let [scale 4
|
||||
@@ -700,7 +704,7 @@
|
||||
entities)))
|
||||
|
||||
(defn stop-all-sounds! [entities]
|
||||
(doseq [snd (get-in entities [:current-sounds :value])]
|
||||
(doseq [snd (get-in entities [:current-sounds :value] [])]
|
||||
(sound! (:sound snd) :stop (:id snd))))
|
||||
|
||||
(defn translate-depressed [cursor depressed?]
|
||||
@@ -714,3 +718,6 @@
|
||||
(min (- length (* length 0.5 zoom ))
|
||||
(max (* length 0.5 zoom )
|
||||
x)))
|
||||
|
||||
(defn get-entity [entities id]
|
||||
((:entities (:room entities)) id))
|
||||
|
||||
Reference in New Issue
Block a user