freeing resources for justice.
This commit is contained in:
@@ -92,9 +92,8 @@
|
||||
(defscreen splash-screen
|
||||
:on-show
|
||||
(fn [screen entities options]
|
||||
(let [splash-atlas (texture-atlas "packed/splash.atlas")
|
||||
global-atlas (texture-atlas "packed/global.atlas")
|
||||
screen (update! screen :resources ["packed/splash.atlas" "packed/global.atlas"])]
|
||||
(let [[screen splash-atlas] (utils/acquire-atlas screen "packed/splash.atlas")
|
||||
[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")]
|
||||
(utils/setup-viewport screen 1280 960)
|
||||
(log/info "Starting splash screen.")
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
|
||||
@@ -121,9 +120,7 @@
|
||||
entities)))
|
||||
|
||||
:on-hide (fn [screen entities options]
|
||||
(doseq [atlas (:resources screen)]
|
||||
(asset-manager! *asset-manager* :unload atlas)
|
||||
(log/info "cleared assets" (into [] (.getAssetNames *asset-manager*)) (.getDiagnostics *asset-manager*))))
|
||||
(utils/release-resources screen))
|
||||
|
||||
:on-render
|
||||
(fn [{:keys [^FitViewport viewport] :as screen} entities options]
|
||||
|
||||
Reference in New Issue
Block a user