smaller textures.

This commit is contained in:
Bryce Covert
2017-05-26 12:48:07 -07:00
parent d8a145bb67
commit 3ee134f062
34 changed files with 174 additions and 90 deletions

View File

@@ -1478,7 +1478,6 @@
(tween/tween :fade-out screen [:fade :opacity] 0.0 1.0 1.0
:finish #(do
(utils/stop-all-sounds! %)
(asset-manager! @(resolve 'advent.core/am) :clear)
(set-screen! @(resolve 'advent.core/advent) @(resolve 'advent.screens.title/title-screen))
%))))))
@@ -1848,7 +1847,8 @@
:on-show
(fn [screen entities options]
(let [screen (assoc screen :total-time 0)
(let [[screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas")
screen (assoc screen :total-time 0)
screen (utils/setup-viewport screen 320 240)]
@@ -1860,29 +1860,29 @@
:pending-states []}
:already-saved? false
:close (assoc (utils/get-texture "close.png")
:close (assoc (utils/atlas->texture global-atlas "close")
:x 320 :y 240
:origin-x 16 :origin-y 16
:width 16 :height 16
:scale-x utils/ui-scale :scale-y utils/ui-scale
:baseline 9000
:opacity 0.8)
:save (assoc (utils/get-texture "save.png")
:save (assoc (utils/atlas->texture global-atlas "save")
:x (- 320 (* utils/ui-scale 16) 4) :y 240
:origin-x 16 :origin-y 16
:width 16 :height 16
:baseline 9000
:opacity 0.8)
:inventory (assoc (utils/get-texture "inventory.png") :x (* 21 utils/ui-scale ) :y (* 27 utils/ui-scale ) :baseline 9000
:inventory (assoc (utils/atlas->texture global-atlas "inventory") :x (* 21 utils/ui-scale ) :y (* 27 utils/ui-scale ) :baseline 9000
:intersect-width 42 :intersect-height 48
:width 42 :height 56
:origin-x 21 :origin-y 27
:scale-x utils/ui-scale :scale-y utils/ui-scale
:open (utils/flip (doto (utils/make-anim-seq "open-inventory" [42 56] 0.055 (flatten [(range 6) 6 7 8 7 ]))
(animation! :set-play-mode (play-mode :normal))))
:anim (utils/flip (utils/make-anim "inventory.png" [42 56] 0.1 [0]))
:anim (utils/flip (utils/make-anim global-atlas "inventory" [42 56] 0.1 [0]))
:anim-loop? false
:default (utils/flip (utils/make-anim "inventory.png" [42 56] 0.1 [0]))
:default (utils/flip (utils/make-anim global-atlas "inventory" [42 56] 0.1 [0]))
:opened (utils/flip (utils/make-anim-seq "open-inventory" [42 56] 0.1 [7]))
:closing (utils/flip (doto (utils/make-anim-seq "open-inventory" [42 56] 0.055 [7 7 7 7 7 7 7 9 10 11 12 0])
(animation! :set-play-mode (play-mode :normal))))
@@ -2050,4 +2050,7 @@
(assoc entities :already-saved? true))
:else
nil)))))
nil))))
:on-hide
(fn [screen entities options]
(utils/release-resources screen)))