small tweaks

This commit is contained in:
Bryce Covert
2015-10-07 18:34:11 -07:00
parent 7423f991b0
commit 75b44709ae
3 changed files with 10 additions and 12 deletions

View File

@@ -400,21 +400,17 @@
(doto (.setAccessible true))
(.get Gdx/graphics))) 60))))
(defn get-sound-volume [entities target vol-scale [x y]]
(* (if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
(- 1.0 (get-in entities [:fade :opacity]))))
(defn get-sound-pan [x]
(/ (- x 160 ) 160))
(defn sourced-volume-fn [target vol-scale [x y]]
(fn [entities]
(get-sound-volume entities target vol-scale [x y])))
(* (if (= target :ego)
(-> (* (/ (get-in entities [:room :entities :ego :scale-x]) 1.5) 0.75)
(* (or vol-scale 1.0))
(clamp-volume))
(proximity-volume entities [x y] :scale vol-scale))
(- 1.0 (get-in entities [:fade :opacity])))))
(defn play-sound!