diff --git a/desktop/asset-work/outside-castle/bird.png b/desktop/asset-work/outside-castle/bird.png deleted file mode 100644 index d1877fd3..00000000 Binary files a/desktop/asset-work/outside-castle/bird.png and /dev/null differ diff --git a/desktop/project.clj b/desktop/project.clj index b902d3a6..29c48a93 100644 --- a/desktop/project.clj +++ b/desktop/project.clj @@ -2,7 +2,7 @@ (def packs (into ["do"] (mapcat (fn [directory] ["run" "-m" "com.badlogic.gdx.tools.texturepacker.TexturePacker" (str "asset-work/" directory) "resources/packed/" (str directory ",")]) - ["inside-castle"] + ["global"] #_["behindhouse" "dream" "georgia" "inside-cafeteria" "inside-jail" "outsidehouse" "safe-song" "title" "castle-gate" "ego" "held" "inside-castle" "inside-stash" "outside-castle" "screenshots" "wizard" "cat-tree" "ending-castle" "inside-antique" "inside-house" "outside-jail" "space" ]))) diff --git a/desktop/resources/packed/global.atlas b/desktop/resources/packed/global.atlas index 67fa3e05..c29ecfb6 100644 --- a/desktop/resources/packed/global.atlas +++ b/desktop/resources/packed/global.atlas @@ -4,6 +4,13 @@ size: 1024,1024 format: RGBA4444 filter: Nearest,Nearest repeat: none +bird + rotate: false + xy: 466, 630 + size: 2, 2 + orig: 2, 2 + offset: 0, 0 + index: -1 black rotate: false xy: 94, 17 diff --git a/desktop/resources/packed/global.png b/desktop/resources/packed/global.png index d613ad09..71ad6b61 100644 Binary files a/desktop/resources/packed/global.png and b/desktop/resources/packed/global.png differ diff --git a/desktop/src-common/advent/screens/rooms/behind_house.clj b/desktop/src-common/advent/screens/rooms/behind_house.clj index 0d4a2b6b..4e2b298e 100644 --- a/desktop/src-common/advent/screens/rooms/behind_house.clj +++ b/desktop/src-common/advent/screens/rooms/behind_house.clj @@ -29,7 +29,9 @@ (fn [state] (assoc state :safe-listen-count (inc (:safe-listen-count state 0)))))) (defn make [screen] - (let [[screet atlas] (utils/acquire-atlas screen "packed/behindhouse.atlas")] + (let [[screet atlas] (utils/acquire-atlas screen "packed/behindhouse.atlas") + [screet global-atlas] (utils/acquire-atlas screen "packed/global.atlas")] + (rooms/make :music {:day :town-2 :night :night} :name "Behind house" :interactions @@ -157,7 +159,7 @@ (actions/do-dialogue entities :ego "I should be careful with this sword." :ego "It's sharp!"))}) - :bird (utils/make-bird screen [[50 235] [80 220] [100 239] [180 235] [85 225]]) + :bird (utils/make-bird screen global-atlas [[50 235] [80 220] [100 239] [180 235] [85 225]]) :outside-particles (common/make-outside-particles)} :collision "behindhouse/collision.png" :scale-fn (utils/scaler-fn-with-baseline 110 0.10 1.00) diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index f12dca33..e710c4ca 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -521,14 +521,14 @@ (particle-effect! magic :allow-completion) entities) entities))}] - :entities {:bird-1 (utils/make-bird screen (as-> [[185 235] + :entities {:bird-1 (utils/make-bird screen global-atlas (as-> [[185 235] [220 225] [210 230] [250 235]] p (concat p (reverse p)))) :sign (assoc (animation->texture screen sign ) :anim sign :anim-start 0 :x 125 :y 138 :baseline 239) - :bird-2 (utils/make-bird screen (as-> [[220 225] [195 235] [210 230] [250 225]] p + :bird-2 (utils/make-bird screen global-atlas (as-> [[220 225] [195 235] [210 230] [250 225]] p (concat p (reverse p)))) :outside-particles (common/make-outside-particles) diff --git a/desktop/src-common/advent/screens/rooms/outside_castle.clj b/desktop/src-common/advent/screens/rooms/outside_castle.clj index 98384f97..af8c4667 100644 --- a/desktop/src-common/advent/screens/rooms/outside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/outside_castle.clj @@ -328,6 +328,7 @@ (defn make [screen] (let [[screen atlas] (utils/acquire-atlas screen "packed/outside-castle.atlas") + [screen global-atlas] (utils/acquire-atlas screen "packed/global.atlas") peddler-sheet (texture! (utils/atlas->texture atlas "peddler-talk" ) :split 18 36) peddler-talk (animation 0.18 (for [i (flatten [2 3 2 3 2 3 6 1 0 1 0 1 0 1 0 1 2 3 2 3 2 3 6 4 5 4 5 4 5 4 5])] (aget peddler-sheet 0 i))) @@ -473,7 +474,7 @@ :script (actions/get-script entities (actions/talk entities :ego "Those look like the choicest of balloons."))) :stand) - :bird (utils/make-bird screen (as-> [[82 235] [134 215] [185 235] [165 238] + :bird (utils/make-bird screen global-atlas (as-> [[82 235] [134 215] [185 235] [165 238] [220 225] [210 230] [250 235]] p (concat p (reverse p)))) diff --git a/desktop/src-common/advent/utils.clj b/desktop/src-common/advent/utils.clj index ec56e673..032c6eb8 100644 --- a/desktop/src-common/advent/utils.clj +++ b/desktop/src-common/advent/utils.clj @@ -393,8 +393,8 @@ (animation speed (split-texture atlas file [w h] frames)))) -(defn make-bird [screen p] - (let [bird-sheet (texture! (get-texture "outside-castle/bird.png") :split 1 2) +(defn make-bird [screen global-atlas p] + (let [bird-sheet (texture! (atlas->texture global-atlas "bird") :split 1 2) bird-stand (animation 0.15 (for [i [0 1]] (aget bird-sheet 0 i)))] (assoc (animation->texture screen bird-stand)