diff --git a/desktop/asset-work/inside-castle/sign-1.png b/desktop/asset-work/inside-castle/sign_0.png similarity index 100% rename from desktop/asset-work/inside-castle/sign-1.png rename to desktop/asset-work/inside-castle/sign_0.png diff --git a/desktop/asset-work/inside-castle/sign-2.png b/desktop/asset-work/inside-castle/sign_1.png similarity index 100% rename from desktop/asset-work/inside-castle/sign-2.png rename to desktop/asset-work/inside-castle/sign_1.png diff --git a/desktop/asset-work/inside-castle/sign-3.png b/desktop/asset-work/inside-castle/sign_2.png similarity index 100% rename from desktop/asset-work/inside-castle/sign-3.png rename to desktop/asset-work/inside-castle/sign_2.png diff --git a/desktop/project.clj b/desktop/project.clj index 4ffa1285..b902d3a6 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 ",")]) - ["cat-tree"] + ["inside-castle"] #_["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/inside-castle.atlas b/desktop/resources/packed/inside-castle.atlas index d2dc3486..961468f9 100644 --- a/desktop/resources/packed/inside-castle.atlas +++ b/desktop/resources/packed/inside-castle.atlas @@ -102,13 +102,13 @@ sign1 orig: 44, 20 offset: 0, 0 index: -1 -sign-1 +sign rotate: false xy: 224, 460 size: 44, 20 orig: 44, 20 offset: 0, 0 - index: -1 + index: 0 sign2 rotate: false xy: 270, 460 @@ -116,13 +116,13 @@ sign2 orig: 44, 20 offset: 0, 0 index: -1 -sign-2 +sign rotate: false xy: 270, 460 size: 44, 20 orig: 44, 20 offset: 0, 0 - index: -1 + index: 1 sign3 rotate: false xy: 316, 460 @@ -130,13 +130,13 @@ sign3 orig: 44, 20 offset: 0, 0 index: -1 -sign-3 +sign rotate: false xy: 316, 460 size: 44, 20 orig: 44, 20 offset: 0, 0 - index: -1 + index: 2 sword rotate: false xy: 12, 464 diff --git a/desktop/src-common/advent/screens/rooms/inside_castle.clj b/desktop/src-common/advent/screens/rooms/inside_castle.clj index 6f4b1b8f..f12dca33 100644 --- a/desktop/src-common/advent/screens/rooms/inside_castle.clj +++ b/desktop/src-common/advent/screens/rooms/inside_castle.clj @@ -361,23 +361,26 @@ nil))) (defn make [screen] - (let [sign (utils/make-anim-seq "inside-castle/sign" [44 20] 0.3 (flatten [(repeat 20 0) 1 0 2 0 1 0 2 0 1 0 2 0 1])) - game-player-talk-sheet (texture! (utils/get-texture "inside-castle/game-player-talk.png") :split 40 44) + (let [[screet atlas] (utils/acquire-atlas screen "packed/inside-castle.atlas") + [screet global-atlas] (utils/acquire-atlas screen "packed/global.atlas") + + sign (utils/make-anim-seq atlas "sign" [44 20] 0.3 (flatten [(repeat 20 0) 1 0 2 0 1 0 2 0 1 0 2 0 1])) + game-player-talk-sheet (texture! (utils/atlas->texture atlas "game-player-talk") :split 40 44) game-player-talk-up (animation 0.15 (for [i [0 2 0 2 0 2 0 3 0 2 0 1 0 0 0 0 2 0 2 0 3 0 1 0 1 0 0 1 0 2 0 3 0]] (aget game-player-talk-sheet 0 i))) game-player-stand-up (animation 0.15 (for [i [0 0 0 0 0 0 0 0 0 0 0 1]] (aget game-player-talk-sheet 0 i))) - game-player-stand-down (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.1 (flatten (repeat 4 [0 1 1 2 0 2 2 1 0 2 2 2 2 2 1 1 ]))) - game-player-talk-down (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.2 [2 3 2 2 3 2 3 2]) - game-player-pause-from-work (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.15 [2 3 4 5 6 7]) - game-player-get-to-work (utils/make-anim "inside-castle/brian-working.png" [40 44] 0.15 (reverse [2 3 4 5 6 7])) + game-player-stand-down (utils/make-anim atlas "brian-working" [40 44] 0.1 (flatten (repeat 4 [0 1 1 2 0 2 2 1 0 2 2 2 2 2 1 1 ]))) + game-player-talk-down (utils/make-anim atlas "brian-working" [40 44] 0.2 [2 3 2 2 3 2 3 2]) + game-player-pause-from-work (utils/make-anim atlas "brian-working" [40 44] 0.15 [2 3 4 5 6 7]) + game-player-get-to-work (utils/make-anim atlas "brian-working" [40 44] 0.15 (reverse [2 3 4 5 6 7])) game-player-flex (animation 0.075 (for [i [0 0 4 4 5 5 5 5 5 5 5 6 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 9 7 8 7 6 5 5 5 5 5 5 5 5 5 5 4 4 0 0 0 0]] (aget game-player-talk-sheet 0 i))) - trophy (utils/make-anim "inside-castle/trophy.png" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1])) - pull-sword-anim (utils/make-anim "inside-castle/pull-sword.png" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ])) - monocle (utils/make-anim "inside-castle/monocle.png" [19 19] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1])) - door (utils/make-anim "inside-castle/door.png" [21 49] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3])) + trophy (utils/make-anim atlas "trophy" [16 16] 0.1 (flatten [(repeat 50 0) 1 2 3 3 3 3 2 1])) + pull-sword-anim (utils/make-anim atlas "pull-sword" [95 190] 0.10 (flatten [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 3 2 3 2 3 3 2 3 2 2 3 3 2 3 2 3 2 3 2 3 2 3 2 2 3 3 3 2 3 2 3 3 2 3 2 3 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ])) + monocle (utils/make-anim atlas "monocle" [19 19] 0.05 (flatten [(repeat 70 0) 1 2 3 3 3 2 1])) + door (utils/make-anim atlas "door" [21 49] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3])) ] (rooms/make :music {:day :town-1 :night :night :sunrise :night} :name "Inside castle" @@ -472,17 +475,17 @@ :ego "One day, when I'm a knight, she'll say...") (actions/georgia-say entities "Kiss me, brave Sir Tick!") #_(actions/in-love entities))}} - :layers {:day [(assoc (utils/get-texture "inside-castle/background.png") :x 0 :y 0 :baseline 0) - (assoc (utils/get-texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97) - (assoc (utils/get-texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5) - (assoc (utils/get-texture "inside-castle/bookstack.png") :x 244 :y 67 :baseline 190 :origin-x 0 :origin-y 0)] - :night [(assoc (utils/get-texture "inside-castle/background.png") :x 0 :y 0 :baseline 0) - (assoc (utils/get-texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97) - (assoc (utils/get-texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)] - :sunrise [(assoc (utils/get-texture "inside-castle/background.png") :x 0 :y 0 :baseline 0) - (assoc (utils/get-texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97) - (assoc (utils/get-texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]} - :blackout (assoc (utils/get-texture "black.png") + :layers {:day [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0) + (assoc (utils/atlas->texture atlas "way-back-tree") :x 0 :y 0 :baseline 97) + (assoc (utils/atlas->texture atlas "roof") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5) + (assoc (utils/atlas->texture atlas "bookstack") :x 244 :y 67 :baseline 190 :origin-x 0 :origin-y 0)] + :night [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0) + (assoc (utils/atlas->texture atlas "way-back-tree") :x 0 :y 0 :baseline 97) + (assoc (utils/atlas->texture atlas "roof") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)] + :sunrise [(assoc (utils/atlas->texture atlas "background") :x 0 :y 0 :baseline 0) + (assoc (utils/atlas->texture atlas "way-back-tree") :x 0 :y 0 :baseline 97) + (assoc (utils/atlas->texture atlas "roof") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]} + :blackout (assoc (utils/atlas->texture global-atlas "black") :x -10 :y -10 :width 340 :height 260 :opacity 0.8 @@ -535,11 +538,11 @@ :door-sound (utils/load-sound "door.ogg") :anim-sound-frames {door {1 [:door-sound 0.1]}} ) - :sword (assoc (utils/get-texture "inside-castle/sword.png") + :sword (assoc (utils/atlas->texture atlas "sword") :x 22 :y 110 :baseline 95) - :walkie-talkie (assoc (utils/get-texture "inside-castle/walkie-talkie.png") + :walkie-talkie (assoc (utils/atlas->texture atlas "walkie-talkie") :label "Walkie-talkie" :cursor :talk :x 257 @@ -570,14 +573,14 @@ (brian-get-to-work entities)) (actions/do-dialogue entities :ego "Can't you give me your trophy of wisdom?" :game-player "If you want my trophy, you'll have to help me with my riddles.")))) - :books (assoc (utils/get-texture "inside-castle/books.png") + :books (assoc (utils/atlas->texture atlas "books") :label "Books" :cursor :hand :x 230 :y 30 :baseline 191 :script (actions/get-script entities (walk-to-player entities) (actions/talk entities :game-player "Don't touch my books!"))) - :game-player (assoc (utils/get-texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191 + :game-player (assoc (utils/atlas->texture atlas "gameplayer") :x 266 :y 49 :baseline 191 :label "Brian O'Brainy" :cursor :talk :talk-color (color 1.0 0.3 0.4 1.0)