packing.
This commit is contained in:
Binary file not shown.
36
desktop/resources/pack.json
Normal file
36
desktop/resources/pack.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
pot: true,
|
||||
paddingX: 2,
|
||||
paddingY: 2,
|
||||
bleed: true,
|
||||
edgePadding: true,
|
||||
duplicatePadding: false,
|
||||
rotation: false,
|
||||
minWidth: 16,
|
||||
minHeight: 16,
|
||||
maxWidth: 4096,
|
||||
maxHeight: 4096,
|
||||
square: false,
|
||||
stripWhitespaceX: false,
|
||||
stripWhitespaceY: false,
|
||||
alphaThreshold: 0,
|
||||
filterMin: Nearest,
|
||||
filterMag: Nearest,
|
||||
wrapX: ClampToEdge,
|
||||
wrapY: ClampToEdge,
|
||||
format: RGBA8888,
|
||||
alias: true,
|
||||
outputFormat: png,
|
||||
jpegQuality: 0.9,
|
||||
ignoreBlankImages: true,
|
||||
fast: false,
|
||||
debug: false,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: false,
|
||||
premultiplyAlpha: false,
|
||||
useIndexes: true,
|
||||
limitMemory: true,
|
||||
grid: false,
|
||||
scale: [ 1 ],
|
||||
scaleSuffix: [ "" ]
|
||||
}
|
||||
2464
desktop/resources/packed/pack.atlas
Normal file
2464
desktop/resources/packed/pack.atlas
Normal file
File diff suppressed because it is too large
Load Diff
BIN
desktop/resources/packed/pack.png
Normal file
BIN
desktop/resources/packed/pack.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
@@ -725,7 +725,7 @@
|
||||
:y (get-in entities [:room :entities :ego :y])
|
||||
:baseline (get-in entities [:room :entities :ego :baseline]))
|
||||
(particle-effect! :reset) (particle-effect! :start)))
|
||||
(assoc-in [:room :entities :cloud] (assoc (texture "space/cloud.png")
|
||||
(assoc-in [:room :entities :cloud] (assoc (utils/get-texture "space/cloud.png")
|
||||
:x (get-in entities [:room :entities :ego :x])
|
||||
:y (get-in entities [:room :entities :ego :y])
|
||||
:origin-x 7
|
||||
|
||||
@@ -94,14 +94,14 @@
|
||||
(input! :set-cursor-image (utils/cursor "cursor.png" :main) 0 0)
|
||||
(let [font (bitmap-font "ego/font.fnt" )]
|
||||
{:font font
|
||||
:fade (assoc (texture "black.png")
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 0.0
|
||||
:origin-x 0
|
||||
:origin-y 0)
|
||||
:remaining-messages credit-messages
|
||||
:the-end (assoc (texture "the-end.png") :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:the-end (assoc (utils/get-texture "the-end.png") :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:tweens {:fade-in
|
||||
(tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 5.0 :ease tween/ease-out-cubic)}}))
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
:on-talk
|
||||
(fn [{:keys [create-talk target-id color text x y scale scene-viewport] :as screen} [entities]]
|
||||
(let [font (bitmap-font "ego/font.fnt" )
|
||||
p (nine-patch {:region (:object (texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
p (nine-patch {:region (:object (utils/get-texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
_ (nine-patch! p :set-padding 25 25 5 15)
|
||||
|
||||
bg (drawable :nine-patch (:object p))
|
||||
@@ -122,7 +122,7 @@
|
||||
:choices []
|
||||
:last-pos [0 0]
|
||||
:font font
|
||||
:np (assoc (nine-patch {:region (:object (texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
:np (assoc (nine-patch {:region (:object (utils/get-texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
:x 5 :y 5 :width 1270)}}))
|
||||
|
||||
:on-render
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
(fn [screen entities]
|
||||
(utils/setup-viewport screen 320 240)
|
||||
|
||||
{:fade (assoc (texture "black.png")
|
||||
{:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 0.0
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
(let [highlighted-text (assoc (label "Hello" (style :label (utils/get-font "ego/font.fnt") (color :white))) :x 0 :y 850 :width 1280 )]
|
||||
(label! highlighted-text :set-alignment Align/center)
|
||||
{:overlay (assoc (texture "inventory-overlay.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :opacity 0.0)
|
||||
:fade (assoc (texture "black.png")
|
||||
{:overlay (assoc (utils/get-texture "inventory-overlay.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :opacity 0.0)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 0.7
|
||||
@@ -93,7 +93,7 @@
|
||||
offset-y (+ y (/ item-width 2))
|
||||
padding (/ item-width 2)
|
||||
padding (* 4 padding)]]
|
||||
(assoc (texture (aget (:all-items entities) 0 (.indexOf utils/+all-cursors+ (:cursor item))))
|
||||
(assoc (utils/get-texture (aget (:all-items entities) 0 (.indexOf utils/+all-cursors+ (:cursor item))))
|
||||
:x x :y y
|
||||
:scale-x 4
|
||||
:scale-y 4
|
||||
|
||||
@@ -46,17 +46,17 @@
|
||||
(actions/do-dialogue entities
|
||||
:ego "I can see Gandarf moving around in the corner of the room."
|
||||
:ego "It's hard to make out from this angle.")))}}
|
||||
:layers {:day [(assoc (texture "behindhouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "behindhouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)
|
||||
(assoc (texture "behindhouse/fgleft.png") :x -10 :y 0 :baseline 240 :parallax 1.5)
|
||||
(assoc (texture "behindhouse/fg2.png") :x (- 320 122) :y 0 :baseline 240 :parallax 1.5)]
|
||||
:night [(assoc (texture "behindhouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "behindhouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)
|
||||
(assoc (texture "behindhouse/fgleft.png") :x -10 :y 0 :baseline 240 :parallax 1.5)
|
||||
(assoc (texture "behindhouse/fg2.png") :x (- 320 122) :y 0 :baseline 240 :parallax 1.5)]}
|
||||
:entities {:stick (assoc (texture "behindhouse/stick.png")
|
||||
:layers {:day [(assoc (utils/get-texture "behindhouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "behindhouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (utils/get-texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)
|
||||
(assoc (utils/get-texture "behindhouse/fgleft.png") :x -10 :y 0 :baseline 240 :parallax 1.5)
|
||||
(assoc (utils/get-texture "behindhouse/fg2.png") :x (- 320 122) :y 0 :baseline 240 :parallax 1.5)]
|
||||
:night [(assoc (utils/get-texture "behindhouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "behindhouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (utils/get-texture "behindhouse/brush.png") :x 0 :y 0 :baseline 240)
|
||||
(assoc (utils/get-texture "behindhouse/fgleft.png") :x -10 :y 0 :baseline 240 :parallax 1.5)
|
||||
(assoc (utils/get-texture "behindhouse/fg2.png") :x (- 320 122) :y 0 :baseline 240 :parallax 1.5)]}
|
||||
:entities {:stick (assoc (utils/get-texture "behindhouse/stick.png")
|
||||
:x 26 :y 80 :baseline 160
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [50 80])
|
||||
@@ -64,7 +64,7 @@
|
||||
(actions/remove-entity entities :stick)
|
||||
(actions/give entities :stick)
|
||||
(actions/talk entities :ego "This stick might be useful.")))
|
||||
:peeling (assoc (texture "behindhouse/house-cover.png")
|
||||
:peeling (assoc (utils/get-texture "behindhouse/house-cover.png")
|
||||
:x 60 :y 92 :baseline 148
|
||||
:script (actions/get-script entities
|
||||
(cond (= :night (get-in @entities [:state :time]))
|
||||
|
||||
@@ -271,10 +271,10 @@
|
||||
(Thread/sleep 2000)
|
||||
(actions/walk-straight-to entities :ego [285 71]))}}}
|
||||
|
||||
:layers {:day [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]
|
||||
:night [(assoc (texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]}
|
||||
:layers {:day [(assoc (utils/get-texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]
|
||||
:night [(assoc (utils/get-texture "castle-gate/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "castle-gate/overlay.png") :x 0 :y 0 :baseline 240)]}
|
||||
:entities {:frankie (make-frankie screen)
|
||||
:goon-1 (make-goon-1 screen)
|
||||
:goon-2 (make-goon-2 screen)
|
||||
|
||||
@@ -208,12 +208,12 @@
|
||||
(actions/give entities :feather))
|
||||
|
||||
(defn make [screen]
|
||||
(let [cat-stand-sheet (texture! (texture "cat-tree/cat-stand.png") :split 22 10)
|
||||
(let [cat-stand-sheet (texture! (utils/get-texture "cat-tree/cat-stand.png") :split 22 10)
|
||||
cat-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0])]
|
||||
(aget cat-stand-sheet 0 i)))
|
||||
cat-walk (animation 0.2 [(texture "cat-tree/pounce.png")])
|
||||
cat-walk (animation 0.2 [(utils/get-texture "cat-tree/pounce.png")])
|
||||
destroy-ladder (utils/make-anim "cat-tree/destroy-ladder.png" [29 38] 0.1 (range 18))
|
||||
ladder-entity (assoc (texture "inside-cafeteria/ladder.png") :x 130 :y 60 :baseline 162
|
||||
ladder-entity (assoc (utils/get-texture "inside-cafeteria/ladder.png") :x 130 :y 60 :baseline 162
|
||||
:origin-x 0
|
||||
:destroy-ladder destroy-ladder)
|
||||
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
@@ -290,14 +290,14 @@
|
||||
(actions/walk-to entities :ego [165 45] :face :left)
|
||||
(actions/do-dialogue entities :grandma "No thank you, handsome.")))
|
||||
}}
|
||||
:layers {:day [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
|
||||
(assoc (texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
|
||||
(assoc (texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
|
||||
:night [(assoc (texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
|
||||
(assoc (texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
|
||||
(assoc (texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
|
||||
:layers {:day [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
|
||||
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
|
||||
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]
|
||||
:night [(assoc (utils/get-texture "cat-tree/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "cat-tree/tree-and-rock.png") :x 0 :y 0 :baseline 161)
|
||||
(assoc (utils/get-texture "cat-tree/brush-l.png") :x -5 :y -5 :parallax 1.3 :baseline 240)
|
||||
(assoc (utils/get-texture "cat-tree/tree-r.png") :x 270 :y 0 :scale-x 1.1 :scale-y 1.1 :parallax 1.5 :baseline 240)]}
|
||||
:entities {
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:cat (actions/start-animation screen
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
(actions/play-animation entities :ego :standup))
|
||||
|
||||
(defn make-wizard [screen wizard-spec]
|
||||
(let [wizard-sheet (texture! (texture "wizard/talk.png") :split 20 46)
|
||||
(let [wizard-sheet (texture! (utils/get-texture "wizard/talk.png") :split 20 46)
|
||||
wizard-stand (animation 0.2 (for [i (flatten [(repeat 10 0) 1])]
|
||||
(aget wizard-sheet 0 i)))
|
||||
wizard-talk-angry (utils/make-anim "wizard/talk-angry.png" [20 50] 0.2 [0 2 0 2 1 2 0 3 0 2 0 1 0 2])
|
||||
|
||||
@@ -367,19 +367,19 @@
|
||||
:ego "It seems like misery!"
|
||||
:ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?"))}}}
|
||||
:timers {:return [15.0 15.0 return-from-island]}
|
||||
:layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2)
|
||||
(assoc (texture "dream/background.png") :x 0 :y 0 :baseline 2)
|
||||
(assoc (texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
|
||||
(assoc (texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
|
||||
(assoc (texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
|
||||
:layers [(assoc (utils/get-texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (utils/get-texture "dream/island.png") :x 180 :y 180 :baseline 0 :parallax 0.3 :scale-x 1.1 :scale-y 1.1)
|
||||
(assoc (utils/get-texture "dream/cliff.png") :x 50 :y 133 :baseline 1 :parallax 0.6 :scale-x 1.2 :scale-y 1.2)
|
||||
(assoc (utils/get-texture "dream/background.png") :x 0 :y 0 :baseline 2)
|
||||
(assoc (utils/get-texture "dream/corner-l.png") :x -10 :y -10 :baseline 240 :parallax 2.0 )
|
||||
(assoc (utils/get-texture "dream/corner-r.png") :x (- 320 80) :y -20 :baseline 240 :parallax 3.2)
|
||||
(assoc (utils/get-texture "dream/pedestals.png") :x 0 :y 0 :baseline 139)]
|
||||
:wind-sound {:sound (sound "dream/wind.ogg")
|
||||
:id nil}
|
||||
:entities {:magic (assoc (particle-effect "dream/magic") :x 160 :y 80 :baseline 240)
|
||||
|
||||
:clouds (assoc (particle-effect "dream/cloudy2") :x 160 :y 120 :baseline 241)
|
||||
:case (assoc (texture "dream/case.png")
|
||||
:case (assoc (utils/get-texture "dream/case.png")
|
||||
:x 144 :y 122 :baseline 139
|
||||
:script (actions/get-script entities
|
||||
(read-sword-plaque entities))
|
||||
@@ -416,11 +416,11 @@
|
||||
(do (actions/walk-to entities :ego [148 76] :face :right)
|
||||
(actions/do-dialogue entities
|
||||
:fairy-godfather "What are you doing?" :ego "Erm... Nothing."))))})
|
||||
:sword (assoc (texture "dream/sword.png")
|
||||
:sword (assoc (utils/get-texture "dream/sword.png")
|
||||
:x 144 :y 122 :baseline 139)
|
||||
|
||||
:explode (assoc (particle-effect "dream/explode") :x 150 :y 138 :baseline 240)
|
||||
:broom (assoc (texture "dream/broom.png") :x 286 :y 122
|
||||
:broom (assoc (utils/get-texture "dream/broom.png") :x 286 :y 122
|
||||
:path (catmull-rom-spline (map #(apply vector-2* %) [[286 122] [286 128]]) true)
|
||||
|
||||
:update-fn (partial utils/update-path-location 0.30)
|
||||
@@ -435,7 +435,7 @@
|
||||
(actions/give entities :broom))
|
||||
|
||||
(read-broom-plaque entities))))
|
||||
:shovel (assoc (texture "dream/shovel.png") :x 33 :y 122
|
||||
:shovel (assoc (utils/get-texture "dream/shovel.png") :x 33 :y 122
|
||||
:path (catmull-rom-spline (map #(apply vector-2* %) [[22 122] [22 128]]) true)
|
||||
:update-fn (partial utils/update-path-location 0.33)
|
||||
|
||||
@@ -450,10 +450,10 @@
|
||||
(actions/give entities :shovel))
|
||||
|
||||
(read-shovel-plaque entities))))
|
||||
:sign (assoc (texture "dream/sign.png") :x 229 :y 33 :baseline 207)
|
||||
:plaque-1 (assoc (texture "dream/plaque1.png") :x 39 :y 99 :baseline 139 :script (actions/get-script entities (read-shovel-plaque entities)))
|
||||
:plaque-2 (assoc (texture "dream/plaque2.png") :x 147 :y 104 :baseline 139 :script (actions/get-script entities (read-sword-plaque entities)))
|
||||
:plaque-3 (assoc (texture "dream/plaque3.png") :x 283 :y 98 :baseline 139 :script (actions/get-script entities (read-broom-plaque entities)))
|
||||
:sign (assoc (utils/get-texture "dream/sign.png") :x 229 :y 33 :baseline 207)
|
||||
:plaque-1 (assoc (utils/get-texture "dream/plaque1.png") :x 39 :y 99 :baseline 139 :script (actions/get-script entities (read-shovel-plaque entities)))
|
||||
:plaque-2 (assoc (utils/get-texture "dream/plaque2.png") :x 147 :y 104 :baseline 139 :script (actions/get-script entities (read-sword-plaque entities)))
|
||||
:plaque-3 (assoc (utils/get-texture "dream/plaque3.png") :x 283 :y 98 :baseline 139 :script (actions/get-script entities (read-broom-plaque entities)))
|
||||
:outside-particles (common/make-outside-particles)
|
||||
:fairy-godfather (assoc (animation->texture screen fairy-godfather-anim)
|
||||
:x 200 :y 130
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
|
||||
(defn make [screen]
|
||||
(let [
|
||||
peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
peddler-sheet (texture! (utils/get-texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
peddler-stand (utils/flip (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 8 0) 6 (repeat 5 0) 4 5 4 5 4 5])]
|
||||
(aget peddler-sheet 0 i))))
|
||||
warden-stand (utils/make-anim "ending-castle/warden-2.png" [21 41] 0.21 (flatten [(repeat 7 0) 1]))
|
||||
|
||||
game-player-stand (utils/make-anim "ending-castle/game-player.png" [14 39] 0.2 (flatten [(repeat 5 0) 1] ))
|
||||
|
||||
ladder-guard-stand-1 (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-stand-2 (utils/flip (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")]))
|
||||
ladder-guard-stand-1 (animation 0.1 [(utils/get-texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-stand-2 (utils/flip (animation 0.1 [(utils/get-texture "inside-cafeteria/ladder-guard-2.png")]))
|
||||
grandma-stand (utils/make-anim "cat-tree/grandma.png" [25 36] 0.2 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1])
|
||||
cat-stand (utils/make-anim "cat-tree/cat-stand.png" [22 10] 0.15 (flatten [(repeat 10 0) 1 1 (repeat 10 0) 2 3 4 3 0 0 2 3 4 3 (repeat 10 0) 1 1 (repeat 10 0) 5 5 6 6 7 (repeat 10 [7 8]) 6 5 0]))
|
||||
duke-stand (utils/make-anim "ending-castle/duke.png" [40 48] 0.23 (flatten [(repeat 4 0) 1]))
|
||||
@@ -37,8 +37,8 @@
|
||||
scaler (utils/scaler-fn-with-baseline 20 0.01 1.20)]
|
||||
(rooms/make :music :dream
|
||||
:interactions {}
|
||||
:layers [(assoc (texture "ending-castle/ending-castle2-assets/background.png") :x 0 :y 0 :origin-x 0 :origin-y 0 :baseline 0)
|
||||
(assoc (texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
|
||||
:layers [(assoc (utils/get-texture "ending-castle/ending-castle2-assets/background.png") :x 0 :y 0 :origin-x 0 :origin-y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "ending-castle/ending-castle2-assets/foreground.png") :x 160 :y 0 :origin-x 165 :origin-y 5 :baseline 240 :parallax 1.4)]
|
||||
:apply-state (fn [screen e]
|
||||
(update-in e [:room :entities :ego] dissoc :talk-override ))
|
||||
:entities {:peddler (assoc (animation->texture screen peddler-stand)
|
||||
|
||||
@@ -78,8 +78,8 @@
|
||||
(actions/talk entities :bloodclot-head "Don't make me laugh kid!")))
|
||||
}}
|
||||
:timers {:taunt [5.0 1.0 add-second]}
|
||||
:layers [(assoc (texture "held/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "held/hand.png") :x 0 :y 0 :baseline 240)]
|
||||
:layers [(assoc (utils/get-texture "held/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "held/hand.png") :x 0 :y 0 :baseline 240)]
|
||||
:entities {:bloodclot-head (assoc (animation->texture screen bloodclot-stand)
|
||||
:x 211 :y 115 :baseline 240
|
||||
:origin-x 57 :origin-y 0
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
(assoc-in [:room :entities :glow :opacity] 0.0))))
|
||||
|
||||
(defn make [screen]
|
||||
(let [shopkeep-sheet (texture! (texture "inside-antique/shopkeep-talk.png") :split 18 21)
|
||||
(let [shopkeep-sheet (texture! (utils/get-texture "inside-antique/shopkeep-talk.png") :split 18 21)
|
||||
shopkeep-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 1 (repeat 50 0) 1 0 1 0 1])]
|
||||
(aget shopkeep-sheet 0 i)))
|
||||
shopkeep-talk (animation 0.15 (for [i [0 2 0 2 0 3 1 0]]
|
||||
@@ -171,7 +171,7 @@
|
||||
shopkeep-sigh (utils/make-anim "inside-antique/antique-sigh.png" [22 21] 0.12 (flatten [ (range 9) 0 0 ]))
|
||||
|
||||
beard (utils/make-anim "inside-antique/beard.png" [26 52] 0.5 [0 1 0 2])
|
||||
teddy (assoc (texture "inside-antique/teddy.png")
|
||||
teddy (assoc (utils/get-texture "inside-antique/teddy.png")
|
||||
:x 255
|
||||
:y 95
|
||||
:baseline 160
|
||||
@@ -268,10 +268,10 @@
|
||||
:ego "It's a tapestry of Rupert the Lion!"
|
||||
:ego "He's the town of Remington's mascot."))}
|
||||
}
|
||||
:layers [(assoc (texture "inside-antique/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-antique/desk.png") :x 0 :y 0 :baseline 113)
|
||||
:layers [(assoc (utils/get-texture "inside-antique/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "inside-antique/desk.png") :x 0 :y 0 :baseline 113)
|
||||
|
||||
(assoc (texture "inside-antique/fg.png") :x 0 :y 0 :baseline 320 :parallax 1.5)
|
||||
(assoc (utils/get-texture "inside-antique/fg.png") :x 0 :y 0 :baseline 320 :parallax 1.5)
|
||||
]
|
||||
:entities {:shopkeep (actions/start-animation screen (assoc (animation->texture screen shopkeep-stand) :x 148 :y 122 :baseline 112
|
||||
:stand shopkeep-stand
|
||||
@@ -299,10 +299,10 @@
|
||||
(actions/get-script entities
|
||||
(actions/talk entities :shopkeep "No thanks, sonny."))))
|
||||
:stand)
|
||||
:glow (assoc (texture "inside-antique/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)
|
||||
:closed-blinds (assoc (texture "inside-antique/closed-blinds.png") :x 0 :y 0 :baseline 0 :opacity 1.0)
|
||||
:open-blinds (assoc (texture "inside-antique/open-blinds.png") :x 0 :y 0 :baseline 0 :opacity 0.0)
|
||||
:darken (assoc (texture "inside-antique/darken.png") :x 0 :y 0 :baseline 321 :opacity 0.4 )
|
||||
:glow (assoc (utils/get-texture "inside-antique/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.3)
|
||||
:closed-blinds (assoc (utils/get-texture "inside-antique/closed-blinds.png") :x 0 :y 0 :baseline 0 :opacity 1.0)
|
||||
:open-blinds (assoc (utils/get-texture "inside-antique/open-blinds.png") :x 0 :y 0 :baseline 0 :opacity 0.0)
|
||||
:darken (assoc (utils/get-texture "inside-antique/darken.png") :x 0 :y 0 :baseline 321 :opacity 0.4 )
|
||||
:beard (assoc (animation->texture screen beard)
|
||||
:anim beard
|
||||
:anim-start 0
|
||||
@@ -315,7 +315,7 @@
|
||||
:fire-particle (doto (assoc (particle-effect "inside-antique/fire-particle") :x 162 :y 108
|
||||
:baseline 240)
|
||||
(particle-effect! :set-position 162 108))
|
||||
:bowl (assoc (texture "inside-antique/bowl.png")
|
||||
:bowl (assoc (utils/get-texture "inside-antique/bowl.png")
|
||||
:x 165
|
||||
:y 110
|
||||
:baseline 125
|
||||
@@ -352,7 +352,7 @@
|
||||
:shopkeep "Pronto!"))))))
|
||||
:teddy teddy}
|
||||
:portrait (rooms/make-entity :portrait
|
||||
(assoc (texture "inside-antique/portrait.png")
|
||||
(assoc (utils/get-texture "inside-antique/portrait.png")
|
||||
:x 112
|
||||
:y 114
|
||||
:baseline 120
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
[play-clj.g2d :refer :all]))
|
||||
|
||||
(defn make-fight-entity []
|
||||
(assoc (texture "inside-cafeteria/fight.png")
|
||||
(assoc (utils/get-texture "inside-cafeteria/fight.png")
|
||||
:x 0
|
||||
:y 0
|
||||
:baseline 1000))
|
||||
@@ -165,13 +165,13 @@
|
||||
{:run #(actions/respond entities % "Goodbye.")}]}))
|
||||
|
||||
(defn make [screen]
|
||||
(let [#_#_warriors-stand-sheet (texture! (texture "inside-cafeteria/warriors-stand.png") :split 66 126)
|
||||
(let [#_#_warriors-stand-sheet (texture! (utils/get-texture "inside-cafeteria/warriors-stand.png") :split 66 126)
|
||||
#_#_warriors-stand (animation 0.2 (for [i [0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 2 2 2 2 3 3 3 0 0 0 2 2 2 ]]
|
||||
(aget warriors-stand-sheet 0 i)))
|
||||
#_#_ladder-guard-sheet (texture! (texture "inside-cafeteria/ladder-guard.png") :split 37 87)
|
||||
#_#_ladder-guard-sheet (texture! (utils/get-texture "inside-cafeteria/ladder-guard.png") :split 37 87)
|
||||
#_#_ladder-guard-stand (animation 0.1 [(aget ladder-guard-sheet 0 0)])
|
||||
ladder-guard-stand (animation 0.1 [(texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-talk (animation 0.1 [ (texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-stand (animation 0.1 [(utils/get-texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
ladder-guard-talk (animation 0.1 [ (utils/get-texture "inside-cafeteria/ladder-guard-2.png")])
|
||||
warriors-stand (utils/make-anim "inside-cafeteria/knights-stand.png" [49 80] 0.6 (take 100 (repeatedly #(rand-int 10))))
|
||||
knight-a-stand (utils/make-anim "inside-cafeteria/knight-a.png" [70 85] 0.2 (flatten [(repeat 3 [(repeat 7 0) (repeat 7 1) (repeat 7 0) (repeat 7 2)]) [3 4 5 6 7 8 9]]))
|
||||
|
||||
@@ -194,10 +194,10 @@
|
||||
(actions/walk-to entities :ego [126 80] :skip-type :end))
|
||||
:cursor :right}
|
||||
}
|
||||
:layers [(assoc (texture "inside-cafeteria/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-cafeteria/doorway.png") :x 306 :y 34 :baseline 202)
|
||||
(assoc (texture "inside-cafeteria/glow.png") :y 0 :baseline 240 :additive? true :opacity 0.3)
|
||||
(assoc (texture "inside-cafeteria/fg.png") :x 10 :y 0 :scale-x 1.1 :scale-y 1.0 :baseline 320 :parallax 1.5)
|
||||
:layers [(assoc (utils/get-texture "inside-cafeteria/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "inside-cafeteria/doorway.png") :x 306 :y 34 :baseline 202)
|
||||
(assoc (utils/get-texture "inside-cafeteria/glow.png") :y 0 :baseline 240 :additive? true :opacity 0.3)
|
||||
(assoc (utils/get-texture "inside-cafeteria/fg.png") :x 10 :y 0 :scale-x 1.1 :scale-y 1.0 :baseline 320 :parallax 1.5)
|
||||
]
|
||||
:entities {:warriors (actions/start-animation screen (assoc (animation->texture screen warriors-stand) :x 31 :y 36 :baseline 180
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
"Do not durst telleth a soul about that ladder!"
|
||||
"No thank you, young sire."))))
|
||||
:stand)
|
||||
:ladder (assoc (texture "inside-cafeteria/ladder.png") :x 205 :y 70 :baseline 170
|
||||
:ladder (assoc (utils/get-texture "inside-cafeteria/ladder.png") :x 205 :y 70 :baseline 170
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ladder-guard "Do not toucheth, young sire.")))}
|
||||
:collision "inside-cafeteria/collision.png"
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
add-monocle-if-necessary))
|
||||
|
||||
(defn make [screen]
|
||||
(let [game-player-talk-sheet (texture! (texture "inside-castle/game-player-talk.png") :split 40 44)
|
||||
(let [game-player-talk-sheet (texture! (utils/get-texture "inside-castle/game-player-talk.png") :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)))
|
||||
|
||||
@@ -429,17 +429,17 @@
|
||||
:ego "That's Georgia McGorgeous' house."
|
||||
:ego "One day, when I'm a knight, I'll ask her to be my girlfriend.")
|
||||
(actions/in-love entities))}}
|
||||
:layers {:day [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97)
|
||||
(assoc (texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)
|
||||
(assoc (texture "inside-castle/bookstack.png") :x 244 :y 67 :baseline 190 :origin-x 0 :origin-y 0)]
|
||||
:night [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97)
|
||||
(assoc (texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]
|
||||
:sunrise [(assoc (texture "inside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-castle/way-back-tree.png") :x 0 :y 0 :baseline 97)
|
||||
(assoc (texture "inside-castle/roof.png") :x (- 320 57) :y 0 :baseline 240 :parallax 1.5)]}
|
||||
:blackout (assoc (texture "black.png")
|
||||
: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")
|
||||
:x 0 :y 0
|
||||
:width 320
|
||||
:height 240 :opacity 0.8
|
||||
@@ -488,11 +488,11 @@
|
||||
:door-sound (sound "door.ogg")
|
||||
:anim-sound-frames {door {1 [:door-sound 1.0]}}
|
||||
)
|
||||
:sword (assoc (texture "inside-castle/sword.png")
|
||||
:sword (assoc (utils/get-texture "inside-castle/sword.png")
|
||||
:x 22
|
||||
:y 110
|
||||
:baseline 95)
|
||||
:walkie-talkie (assoc (texture "inside-castle/walkie-talkie.png")
|
||||
:walkie-talkie (assoc (utils/get-texture "inside-castle/walkie-talkie.png")
|
||||
:x 257
|
||||
:y 135
|
||||
:baseline 0
|
||||
@@ -519,12 +519,12 @@
|
||||
(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 (texture "inside-castle/books.png")
|
||||
:books (assoc (utils/get-texture "inside-castle/books.png")
|
||||
: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 (texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
|
||||
:game-player (assoc (utils/get-texture "inside-castle/gameplayer.png") :x 266 :y 49 :baseline 191
|
||||
:talk-color (color 1.0 0.3 0.2 1.0)
|
||||
:script (actions/get-script entities (do-game-player-dialogue entities))
|
||||
:facing :left
|
||||
|
||||
@@ -130,12 +130,12 @@
|
||||
{:run #(actions/do-dialogue entities :ego %)}]}))
|
||||
|
||||
(defn make [screen]
|
||||
(let [safelock-sheet (texture! (texture "inside-house/safe-lock.png") :split 9 2)
|
||||
(let [safelock-sheet (texture! (utils/get-texture "inside-house/safe-lock.png") :split 9 2)
|
||||
safe-lock (animation 0.1 (for [i (flatten [(repeat 20 0) 1 2 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 (range 3 20) 20 20 20 20 21 21 21 21 21 20 20 21 21 21 21 21 20 20 20 ])]
|
||||
(aget safelock-sheet 0 i)))
|
||||
candle (utils/make-anim (texture "inside-house/candle.png") [34 32] 0.2 [1 0 1 2])
|
||||
candle-aura (utils/make-anim (texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1] )
|
||||
experiment-left (utils/flip (utils/make-anim (texture "wizard/experiment.png" ) [45 55] 0.075 [0 0 0 0 0 0 0 0 0 0 1 1 2 2 2 2 3 3 3 4 4 5 5 6 6 6 6 6 6 7 8 9 9 10 10 11 11 12 12 12 12 12 12 12 12 12 12 12 13 13 14 14 14 14 14 15 15 16 16 17 17 18 18 18 18 19 20 21 21 21 21 21 21 22 23 22 23 22 23 22 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 25 26 27 37 38 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29 29 29 28 28 28 28 29 29 28 28 28 28 28 28 28 28 30 30 30 30 31 32 33 31 31 31 31 31 31 31 31 34 35 36 36 36 36 36 36 36 36 36] ))]
|
||||
candle (utils/make-anim (utils/get-texture "inside-house/candle.png") [34 32] 0.2 [1 0 1 2])
|
||||
candle-aura (utils/make-anim (utils/get-texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1] )
|
||||
experiment-left (utils/flip (utils/make-anim (utils/get-texture "wizard/experiment.png" ) [45 55] 0.075 [0 0 0 0 0 0 0 0 0 0 1 1 2 2 2 2 3 3 3 4 4 5 5 6 6 6 6 6 6 7 8 9 9 10 10 11 11 12 12 12 12 12 12 12 12 12 12 12 13 13 14 14 14 14 14 15 15 16 16 17 17 18 18 18 18 19 20 21 21 21 21 21 21 22 23 22 23 22 23 22 23 23 23 23 23 23 23 23 24 24 24 24 24 24 24 24 24 25 26 27 37 38 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29 29 29 28 28 28 28 29 29 28 28 28 28 28 28 28 28 30 30 30 30 31 32 33 31 31 31 31 31 31 31 31 34 35 36 36 36 36 36 36 36 36 36] ))]
|
||||
(rooms/make :music :inside-fangald
|
||||
:interactions {:down-dir {:box [151 0 320 40]
|
||||
:script (actions/get-script entities
|
||||
@@ -159,10 +159,10 @@
|
||||
:window {:box [119 120 203 190]
|
||||
:script (actions/get-script entities
|
||||
(actions/talk entities :ego "It's a really big window!"))}}
|
||||
:layers [(assoc (texture "inside-house/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "inside-house/desk.png") :x 0 :y 0 :baseline 200)
|
||||
(assoc (texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240 :parallax 2.0)
|
||||
(assoc (texture "inside-house/glow.png") :x 0 :y 0 :baseline 199 :additive? true)]
|
||||
:layers [(assoc (utils/get-texture "inside-house/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "inside-house/desk.png") :x 0 :y 0 :baseline 200)
|
||||
(assoc (utils/get-texture "inside-house/sillhoute.png") :x 0 :y 0 :baseline 240 :parallax 2.0)
|
||||
(assoc (utils/get-texture "inside-house/glow.png") :x 0 :y 0 :baseline 199 :additive? true)]
|
||||
:entities {
|
||||
:wizard (common/make-wizard screen {:x 228 :y 60 :baseline 160 :scale-x 1.75 :scale-y 1.75 :origin-x 0 :origin-y 0
|
||||
:script (actions/get-script entities (do-wizard-dialogue entities))
|
||||
@@ -211,7 +211,7 @@
|
||||
:magic-frog-particle (doto (assoc (particle-effect "inside-house/magic-frog") :x 230 :y 0
|
||||
:baseline 241)
|
||||
(particle-effect! :set-position 237 0))
|
||||
:flask (assoc (texture "inside-house/flask.png")
|
||||
:flask (assoc (utils/get-texture "inside-house/flask.png")
|
||||
:x 265 :y 80 :baseline 240
|
||||
:script (actions/get-script entities
|
||||
(actions/remove-entity entities :flask)
|
||||
@@ -219,7 +219,7 @@
|
||||
(when (get-in @entities [:room :entities :wizard])
|
||||
(actions/do-dialogue entities :ego "Hey you think I could have this flask?"
|
||||
:wizard "Sure."))))
|
||||
:frog-legs (assoc (texture "inside-house/frog-legs.png")
|
||||
:frog-legs (assoc (utils/get-texture "inside-house/frog-legs.png")
|
||||
:x 180 :y 77 :baseline 240
|
||||
:script (actions/get-script entities
|
||||
(if (get-in @entities [:room :entities :wizard])
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
|
||||
(defn make [screen]
|
||||
(let [warden-sheet (texture! (texture "inside-jail/warden.png") :split 43 58)
|
||||
(let [warden-sheet (texture! (utils/get-texture "inside-jail/warden.png") :split 43 58)
|
||||
warden-talk (animation 0.2 (for [i [1 0 1 0 1 0 1 0 0 0 2 0]]
|
||||
(aget warden-sheet 0 i)))
|
||||
warden-stand (animation 0.1 (for [i (flatten [(repeat 30 0) 2 (repeat 20 0) 2])]
|
||||
@@ -219,7 +219,7 @@
|
||||
warden-sleep (animation 0.25 (for [i (flatten [ 3 4 3 4 3 4 3 4 3 4 5 5 2 2 2 2 2 2])]
|
||||
(aget warden-sheet 0 i)))
|
||||
candle (utils/make-anim "inside-jail/candle.png" [20 25] 0.1 (range 4))
|
||||
candle-aura (utils/make-anim (texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1])]
|
||||
candle-aura (utils/make-anim (utils/get-texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1])]
|
||||
(rooms/make :music :inside-antique
|
||||
:interactions {
|
||||
:lock {:box [172 102 190 124]
|
||||
@@ -305,10 +305,10 @@
|
||||
:door {:box [257 62 301 152]
|
||||
:cursor :down
|
||||
:script (actions/get-script entities (leave entities))}}
|
||||
:layers [(assoc (texture "inside-jail/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)
|
||||
(assoc (texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165 :night-profile :none)
|
||||
(assoc (texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35 :night-profile :none)
|
||||
(assoc (texture "inside-jail/fg.png") :x 0 :y 5 :baseline 241 :parallax 1.5 :night-profile :none)]
|
||||
:layers [(assoc (utils/get-texture "inside-jail/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)
|
||||
(assoc (utils/get-texture "inside-jail/bars.png") :x 0 :y 0 :baseline 165 :night-profile :none)
|
||||
(assoc (utils/get-texture "inside-jail/glow.png") :x 0 :y 0 :baseline 240 :additive? true :opacity 0.35 :night-profile :none)
|
||||
(assoc (utils/get-texture "inside-jail/fg.png") :x 0 :y 5 :baseline 241 :parallax 1.5 :night-profile :none)]
|
||||
:hotspots [{:box [121 40 258 44]
|
||||
:fn (fn [screen entities]
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
(actions/begin-animation entities :warden :sleep)) entities)
|
||||
entities)
|
||||
entities)))}]
|
||||
:entities {:warden (assoc (texture "inside-jail/warden.png" )
|
||||
:entities {:warden (assoc (utils/get-texture "inside-jail/warden.png" )
|
||||
:x 40 :y 60 :baseline 166
|
||||
:stand warden-stand
|
||||
:talk warden-talk
|
||||
@@ -367,13 +367,13 @@
|
||||
:ego "I can't kill him just for doing his job."))
|
||||
:rope (actions/get-script entities (tie-up-warden entities "I'll tie him up."))
|
||||
:ball-n-chain (actions/get-script entities (tie-up-warden entities "I'll lock him up."))})
|
||||
:chest-top (assoc (texture "inside-jail/chest-top.png")
|
||||
:chest-top (assoc (utils/get-texture "inside-jail/chest-top.png")
|
||||
:x 193 :y (- 240 165) :baseline 166
|
||||
:origin-x 0 :origin-y 0
|
||||
:night-profile :none
|
||||
:open (animation 0.8 [(texture "inside-jail/chest-top-open.png")])
|
||||
:close (animation 0.8 [(texture "inside-jail/chest-top.png")]))
|
||||
:ball-n-chain (assoc (texture "inside-jail/ball-n-chain.png")
|
||||
:open (animation 0.8 [(utils/get-texture "inside-jail/chest-top-open.png")])
|
||||
:close (animation 0.8 [(utils/get-texture "inside-jail/chest-top.png")]))
|
||||
:ball-n-chain (assoc (utils/get-texture "inside-jail/ball-n-chain.png")
|
||||
:x 80 :y 80 :baseline 160
|
||||
:night-profile :none
|
||||
:script (actions/get-script entities
|
||||
@@ -381,7 +381,7 @@
|
||||
(actions/play-animation entities :ego :squat)
|
||||
(actions/remove-entity entities :ball-n-chain)
|
||||
(actions/give entities :ball-n-chain)))
|
||||
:moveable-bars (assoc (texture "inside-jail/moveable-bars.png")
|
||||
:moveable-bars (assoc (utils/get-texture "inside-jail/moveable-bars.png")
|
||||
:night-profile :none
|
||||
:x 132 :y 77 :baseline 163)
|
||||
:candle (assoc (animation->texture screen candle)
|
||||
@@ -396,7 +396,7 @@
|
||||
:candle-smoke (doto (assoc (particle-effect "inside-jail/candle") :x 215 :y 130
|
||||
:baseline 200)
|
||||
(particle-effect! :set-position 215 130))
|
||||
:crowbar (assoc (texture "inside-jail/crowbar.png")
|
||||
:crowbar (assoc (utils/get-texture "inside-jail/crowbar.png")
|
||||
:x 304 :y 65 :baseline 175
|
||||
:night-profile :none
|
||||
:script (actions/get-script entities
|
||||
@@ -407,7 +407,7 @@
|
||||
(actions/give entities :crowbar)
|
||||
(actions/talk entities :ego "It's a crowbar."))
|
||||
(actions/talk entities :ego "I can't reach it."))))
|
||||
:closed-window (assoc (texture "inside-jail/window.png")
|
||||
:closed-window (assoc (utils/get-texture "inside-jail/window.png")
|
||||
:night-profile :none
|
||||
:x 99 :y 111 :baseline 128)}
|
||||
:collision "inside-jail/collision-locked.png"
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
(defn make [screen]
|
||||
(let [candle-flame (utils/make-anim "inside-stash/candle.png" [4 4] 0.1 (range 4))
|
||||
candle-aura (utils/make-anim (texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1] )
|
||||
candle-aura (utils/make-anim (utils/get-texture "inside-house/candle-aura.png") [27 27] 0.2 [0 1 2 3 2 1] )
|
||||
]
|
||||
(rooms/make :music {:day :secret-hideout :night :secret-hideout}
|
||||
:interactions
|
||||
@@ -81,8 +81,8 @@
|
||||
:scripts {:sword (actions/get-script entities (actions/talk entities :ego "There's not enough room to swing my sword here."))
|
||||
:crowbar (actions/get-script entities
|
||||
(bust-chest entities))}}}
|
||||
:layers [(assoc (texture "inside-stash/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)]
|
||||
:entities {:lid (assoc (texture "inside-stash/lid.png")
|
||||
:layers [(assoc (utils/get-texture "inside-stash/background.png") :x 0 :y 0 :baseline 0 :night-profile :none)]
|
||||
:entities {:lid (assoc (utils/get-texture "inside-stash/lid.png")
|
||||
:x 156 :y 116 :baseline 125 :night-profile :none)
|
||||
:candle-flame (assoc (animation->texture screen candle-flame)
|
||||
:x 165 :y 135 :baseline 1
|
||||
|
||||
@@ -275,16 +275,16 @@
|
||||
add-note-if-necessary))
|
||||
|
||||
(defn make [screen]
|
||||
(let [peddler-sheet (texture! (texture "outside-castle/peddler-talk.png" ) :split 18 36)
|
||||
(let [peddler-sheet (texture! (utils/get-texture "outside-castle/peddler-talk.png" ) :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)))
|
||||
peddler-stand (animation 0.2 (for [i (flatten [(repeat 8 0) 6 (repeat 8 0) 6 (repeat 5 0) 4 5 4 5 4 5])]
|
||||
(aget peddler-sheet 0 i)))
|
||||
balloon-sheet (texture! (texture "outside-castle/balloons.png") :split 20 36)
|
||||
balloon-sheet (texture! (utils/get-texture "outside-castle/balloons.png") :split 20 36)
|
||||
balloon-stand (animation 0.25 (for [i [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 1 2]]
|
||||
(aget balloon-sheet 0 i)))
|
||||
|
||||
steer-sheet (texture! (texture "outside-castle/steer.png") :split 50 35)
|
||||
steer-sheet (texture! (utils/get-texture "outside-castle/steer.png") :split 50 35)
|
||||
steer-stand (animation 0.2 (for [i [0 0 0 0 0 0 0 0 0 1 0 2 0 1 0 2 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 3 3 3 3 3 3 0 0 0 0]]
|
||||
(aget steer-sheet 0 i)))
|
||||
flies-stand (utils/make-anim "outside-castle/flies.png" [15 15] 0.075 (flatten (repeat 2 [0 1 2 1])))]
|
||||
@@ -322,18 +322,18 @@
|
||||
(actions/give entities :carrot))))}}
|
||||
:flies-sound {:sound (sound "outside-castle/flies2.ogg")
|
||||
:id nil}
|
||||
:layers {:day [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-castle/blanket.png") :x 60 :y (- 240 173) :baseline 1)
|
||||
(assoc (texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]
|
||||
:night [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]
|
||||
:sunrise [(assoc (texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]}
|
||||
:layers {:day [(assoc (utils/get-texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outside-castle/blanket.png") :x 60 :y (- 240 173) :baseline 1)
|
||||
(assoc (utils/get-texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (utils/get-texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]
|
||||
:night [(assoc (utils/get-texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (utils/get-texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]
|
||||
:sunrise [(assoc (utils/get-texture "outside-castle/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outside-castle/brush.png") :origin-x 0 :origin-y 0 :scale-x 1.0 :scale-y 1.0 :x 15 :y 0 :baseline 240 :parallax 1.2)
|
||||
(assoc (utils/get-texture "outside-castle/walk-behind.png") :x 0 :y 0 :baseline 69)]}
|
||||
:entities {:peddler (actions/start-animation screen
|
||||
(assoc (texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
||||
(assoc (utils/get-texture "outside-castle/peddler.png") :x 110 :y 90 :baseline 150 :anim nil
|
||||
:anim-sound-frames {peddler-stand {23 [:scratch 1.0]}
|
||||
peddler-talk {23 [:scratch 1.0]}}
|
||||
:scratch (sound "outside-castle/scratch.ogg")
|
||||
@@ -419,7 +419,7 @@
|
||||
(actions/give entities :flies)
|
||||
(actions/talk entities :ego "Hopefully they won't fly out of my backpack."))}
|
||||
)}
|
||||
:note (rooms/make-entity :note (assoc (texture "outside-castle/note.png")
|
||||
:note (rooms/make-entity :note (assoc (utils/get-texture "outside-castle/note.png")
|
||||
:x 198 :y 66 :baseline 174
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [210 79] :face :left)
|
||||
|
||||
@@ -564,9 +564,9 @@
|
||||
|
||||
|
||||
(defn make [screen]
|
||||
(let [sheep-stand-sheet (texture! (texture "outsidehouse/sheep-anim.png") :split 33 21)
|
||||
sheep-walk-sheet (texture! (texture "outsidehouse/sheep-walk.png") :split 33 21)
|
||||
lamb-walk-sheet (texture! (texture "outsidehouse/lamb-walk.png") :split 27 28)
|
||||
(let [sheep-stand-sheet (texture! (utils/get-texture "outsidehouse/sheep-anim.png") :split 33 21)
|
||||
sheep-walk-sheet (texture! (utils/get-texture "outsidehouse/sheep-walk.png") :split 33 21)
|
||||
lamb-walk-sheet (texture! (utils/get-texture "outsidehouse/lamb-walk.png") :split 27 28)
|
||||
sheep-stand (animation 0.15 (for [i (flatten [(repeat 10 0) 1 2 3 4 5 6 7 4 5 6 7 8 9 10 (repeat 25 11) (repeat 15 12)])]
|
||||
(aget sheep-stand-sheet 0 i)))
|
||||
door (utils/make-anim "outsidehouse/door.png" [22 58] 0.15 (flatten [(range 4) 3 3 3 3 3 3 3]))
|
||||
@@ -624,20 +624,20 @@
|
||||
entities
|
||||
(walk-to-castle entities))
|
||||
:cursor :left}}
|
||||
:layers {:day [(assoc (texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (texture "outsidehouse/fence.png") :x 0 :y 0 :baseline 93)
|
||||
:layers {:day [(assoc (utils/get-texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (utils/get-texture "outsidehouse/fence.png") :x 0 :y 0 :baseline 93)
|
||||
|
||||
(assoc (texture "outsidehouse/background-trees.png") :x 0 :y 0 :baseline 44)
|
||||
(assoc (texture "outsidehouse/fg1.png") :x 0 :y 0 :baseline 1000 :parallax 1.5)
|
||||
(assoc (texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]
|
||||
:night [(assoc (texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (texture "outsidehouse/fence.png") :x 0 :y 0 :baseline 93)
|
||||
(assoc (utils/get-texture "outsidehouse/background-trees.png") :x 0 :y 0 :baseline 44)
|
||||
(assoc (utils/get-texture "outsidehouse/fg1.png") :x 0 :y 0 :baseline 1000 :parallax 1.5)
|
||||
(assoc (utils/get-texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]
|
||||
:night [(assoc (utils/get-texture "outsidehouse/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outsidehouse/house.png") :x 0 :y 0 :baseline 122)
|
||||
(assoc (utils/get-texture "outsidehouse/fence.png") :x 0 :y 0 :baseline 93)
|
||||
|
||||
(assoc (texture "outsidehouse/background-trees.png") :x 0 :y 0 :baseline 44)
|
||||
(assoc (texture "outsidehouse/fg1.png") :x 0 :y 0 :baseline 1000 :parallax 1.5)
|
||||
(assoc (texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]}
|
||||
(assoc (utils/get-texture "outsidehouse/background-trees.png") :x 0 :y 0 :baseline 44)
|
||||
(assoc (utils/get-texture "outsidehouse/fg1.png") :x 0 :y 0 :baseline 1000 :parallax 1.5)
|
||||
(assoc (utils/get-texture "outsidehouse/fg2.png") :x (- 320 55) :y 0 :baseline 1000 :parallax 1.5)]}
|
||||
:entities {:sheep (actions/start-animation screen
|
||||
(assoc (animation->texture screen sheep-stand) :x 38 :y 160 :baseline 80
|
||||
:scale-x (scaler [38 160])
|
||||
@@ -719,7 +719,7 @@
|
||||
:door-sound (sound "door.ogg")
|
||||
:anim-sound-frames {door {1 [:door-sound 1.0]}}
|
||||
)
|
||||
:lamb (assoc (texture "outsidehouse/lamb.png")
|
||||
:lamb (assoc (utils/get-texture "outsidehouse/lamb.png")
|
||||
:x 10 :y 163 :baseline 77
|
||||
:right {:stand (animation 0.1 [lamb-stand])
|
||||
:walk lamb-walk}
|
||||
@@ -761,7 +761,7 @@
|
||||
:sword (actions/get-script entities (actions/do-dialogue entities
|
||||
:wizard "The Sword of Blergh!"
|
||||
:wizard "Good job, Tick."))}}))
|
||||
:note (rooms/make-entity :note (assoc (texture "outsidehouse/note.png")
|
||||
:note (rooms/make-entity :note (assoc (utils/get-texture "outsidehouse/note.png")
|
||||
:x 277 :y 74 :baseline 160
|
||||
:night-profile :none
|
||||
:script (actions/get-script entities
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
(utils/proximity-volume entities [172 120] :scale 0.5))
|
||||
|
||||
(defn make [screen]
|
||||
(let [guard-sheet (texture! (texture "inside-cafeteria/ladder-guard.png") :split 37 87)
|
||||
(let [guard-sheet (texture! (utils/get-texture "inside-cafeteria/ladder-guard.png") :split 37 87)
|
||||
guard-stand (animation 0.1 [(aget guard-sheet 0 0)])
|
||||
guard-talk (animation 0.2 (for [i [0 0 0 0 1 0 0 1]] (aget guard-sheet 0 i)))
|
||||
guard-sleep (utils/make-anim "outside-jail/guard-sleep.png" [43 67] 0.1 (range 4))
|
||||
open-stash (utils/make-anim "outside-jail/open-stash.png" [58 41] 0.075 (reverse (range 5)))
|
||||
close-stash (utils/make-anim "outside-jail/open-stash.png" [58 41] 0.075 (range 5))
|
||||
candle-flame (utils/make-anim "outside-jail/candle.png" [20 25] 0.075 (range 4))
|
||||
candle-aura (utils/make-anim (texture "outside-jail/candle-aura2.png") [135 135] 0.3 [0 1 2 1] )]
|
||||
candle-aura (utils/make-anim (utils/get-texture "outside-jail/candle-aura2.png") [135 135] 0.3 [0 1 2 1] )]
|
||||
(rooms/make :music {:day :town-1 :night :night}
|
||||
:interactions {:down-dir {:box [30 0 227 40]
|
||||
:script (actions/get-script entities
|
||||
@@ -215,10 +215,10 @@
|
||||
(actions/remove-item entities :flask-2)
|
||||
(actions/give entities :flask-water)
|
||||
(actions/talk entities :ego "Filled up with water, just as Gandarf wanted."))}}}
|
||||
:layers {:day [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)]
|
||||
:night [(assoc (texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)]}
|
||||
:layers {:day [(assoc (utils/get-texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)]
|
||||
:night [(assoc (utils/get-texture "outside-jail/background.png") :x 0 :y 0 :baseline 0)
|
||||
(assoc (utils/get-texture "outside-jail/fountain.png") :x 0 :y 0 :baseline 114)]}
|
||||
:entities {:warden {:object nil
|
||||
:x 36
|
||||
:y 86
|
||||
@@ -240,8 +240,8 @@
|
||||
:x 172
|
||||
:y 140
|
||||
:baseline 114)
|
||||
:axe (assoc (texture "outside-jail/axe.png") :x 213 :y 63 :baseline 176 :night-profile :sprite)
|
||||
:bent-bar-window (assoc (texture "outside-jail/bent-bar-window.png")
|
||||
:axe (assoc (utils/get-texture "outside-jail/axe.png") :x 213 :y 63 :baseline 176 :night-profile :sprite)
|
||||
:bent-bar-window (assoc (utils/get-texture "outside-jail/bent-bar-window.png")
|
||||
:x 69 :y (- 240 63) :baseline 2)
|
||||
:outside-particles (common/make-outside-particles)}
|
||||
:fountain-sound {:sound (sound "outside-jail/fountain-2.ogg")
|
||||
@@ -258,13 +258,13 @@
|
||||
:sleep guard-sleep
|
||||
:script (actions/get-script entities (search-guard entities))
|
||||
:night-profile :sprite))
|
||||
:rope (rooms/make-entity :rope (assoc (texture "outside-jail/rope.png")
|
||||
:rope (rooms/make-entity :rope (assoc (utils/get-texture "outside-jail/rope.png")
|
||||
:x 14 :y 20 :baseline 1 :night-profile :sprite))
|
||||
:spear (rooms/make-entity :spear (assoc (texture "outside-jail/spear.png")
|
||||
:spear (rooms/make-entity :spear (assoc (utils/get-texture "outside-jail/spear.png")
|
||||
:night-profile :none
|
||||
:x 60 :y 65 :baseline 180
|
||||
:script (actions/get-script entities (grab-spear entities))))
|
||||
:alarm-clock (rooms/make-entity :alarm-clock (assoc (texture "outside-jail/alarm-clock.png")
|
||||
:alarm-clock (rooms/make-entity :alarm-clock (assoc (utils/get-texture "outside-jail/alarm-clock.png")
|
||||
:x 217 :y 83 :baseline 160
|
||||
:script (actions/get-script entities
|
||||
(actions/walk-to entities :ego [189 65] :face :right)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
(sound! (sound "space/jump.ogg") :play (utils/current-sound-volume))
|
||||
(-> entities
|
||||
(assoc-in [:room :entities :cloud] (assoc (texture "space/cloud.png")
|
||||
(assoc-in [:room :entities :cloud] (assoc (utils/get-texture "space/cloud.png")
|
||||
:x (- (get-in entities [:room :entities :ego :x]) 10)
|
||||
:y (get-in entities [:room :entities :ego :y])
|
||||
:origin-x 7
|
||||
@@ -188,13 +188,13 @@
|
||||
(rooms/make :music :fight
|
||||
:interactions
|
||||
{}
|
||||
:layers [(assoc (texture "space/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:layers [(assoc (utils/get-texture "space/background.png") :x 0 :y 0 :baseline 0)]
|
||||
:timers {:taunt [10.0 8.0 taunt]
|
||||
:shock [5.0 15.0 shock]}
|
||||
:entities {:appear (assoc effect
|
||||
:x 240 :y 50
|
||||
:baseline 200)
|
||||
:later (assoc (texture "space/later.png")
|
||||
:later (assoc (utils/get-texture "space/later.png")
|
||||
:x 0 :y 0
|
||||
:baseline 240
|
||||
:opacity 0.0)
|
||||
@@ -285,7 +285,7 @@
|
||||
:bullet (assoc (animation->texture screen bullet)
|
||||
:x 37 :y 85 :baseline 241
|
||||
:walk bullet)
|
||||
:broken-jewel (assoc (texture "space/broken-jewel.png")
|
||||
:broken-jewel (assoc (utils/get-texture "space/broken-jewel.png")
|
||||
:x 225 :y 170 :baseline 240)
|
||||
:collision "space/collision.png"
|
||||
:scale-fn (constantly 1.5)
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
(fn [screen entities]
|
||||
(utils/setup-viewport screen 320 240)
|
||||
|
||||
(let [inputed-key (texture "inside-house/inputed-key.png")]
|
||||
{:fade (assoc (texture "black.png")
|
||||
(let [inputed-key (utils/get-texture "inside-house/inputed-key.png")]
|
||||
{:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 0.7
|
||||
:origin-x 0
|
||||
:origin-y 0)
|
||||
:safe (assoc (texture "inside-house/safe-screen.png") :x start-x :y start-y)
|
||||
:safe (assoc (utils/get-texture "inside-house/safe-screen.png") :x start-x :y start-y)
|
||||
:entered-keys (doall (for [i (range 5)]
|
||||
(assoc inputed-key
|
||||
:x (+ start-x 10 (* i 12))
|
||||
|
||||
@@ -493,14 +493,14 @@ void main()
|
||||
nil))
|
||||
|
||||
(defn get-ego [screen start-pos start-scale]
|
||||
(let [player-sheet (texture! (texture "player.png") :split 18 36)
|
||||
talk-sheet (texture! (texture "ego/talk.png") :split 18 36)
|
||||
stand-sheet (texture! (texture "ego/stand.png") :split 18 36)
|
||||
squat-sheet (texture! (texture "ego/squat.png") :split 18 36)
|
||||
reach-sheet (texture! (texture "ego/reach.png") :split 18 36)
|
||||
grow-sheet (texture! (texture "ego/grow.png") :split 18 36)
|
||||
cat-toy-sheet (texture! (texture "ego/cat-toy.png") :split 41 50)
|
||||
fire-sheet (texture! (texture "ego/fire.png") :split 18 36)
|
||||
(let [player-sheet (texture! (utils/get-texture "player.png") :split 18 36)
|
||||
talk-sheet (texture! (utils/get-texture "ego/talk.png") :split 18 36)
|
||||
stand-sheet (texture! (utils/get-texture "ego/stand.png") :split 18 36)
|
||||
squat-sheet (texture! (utils/get-texture "ego/squat.png") :split 18 36)
|
||||
reach-sheet (texture! (utils/get-texture "ego/reach.png") :split 18 36)
|
||||
grow-sheet (texture! (utils/get-texture "ego/grow.png") :split 18 36)
|
||||
cat-toy-sheet (texture! (utils/get-texture "ego/cat-toy.png") :split 41 50)
|
||||
fire-sheet (texture! (utils/get-texture "ego/fire.png") :split 18 36)
|
||||
walk-right (animation 0.075 (for [i (range 8)]
|
||||
(texture (aget player-sheet 0 i))))
|
||||
|
||||
@@ -1002,7 +1002,7 @@ void main()
|
||||
:object nil}
|
||||
:fade {:object nil
|
||||
:opacity 0.0}
|
||||
:white-fade (assoc (texture "white.png")
|
||||
:white-fade (assoc (utils/get-texture "white.png")
|
||||
:scale-x 20
|
||||
:scale-y 20
|
||||
:baseline 9500
|
||||
@@ -1250,12 +1250,12 @@ void main()
|
||||
(let [screen (assoc screen :total-time 0)]
|
||||
(utils/setup-viewport screen 320 240)
|
||||
|
||||
{:close (assoc (texture "close.png")
|
||||
{:close (assoc (utils/get-texture "close.png")
|
||||
:x 304 :y 224
|
||||
:width 16 :height 16
|
||||
:baseline 9000
|
||||
:opacity 0.8)
|
||||
:inventory (assoc (texture "inventory.png") :x 278 :y 0 :baseline 9000
|
||||
:inventory (assoc (utils/get-texture "inventory.png") :x 278 :y 0 :baseline 9000
|
||||
:mouse-in? (zone/box 278 0 320 42)
|
||||
:opacity 0.8)
|
||||
:fps (assoc (label "" (color :white) ) :x 5 :baseline 0 :opacity 0.1)}))
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
(utils/setup-viewport screen 320 240)
|
||||
|
||||
{:overlay (assoc (texture "testscreen/test.png" ) :x 0 :y 0 :origin-x 0 :origin-y 0)
|
||||
:subject (assoc (texture "testscreen/subject.png" ) :x 160 :y 120 :origin-x 7 :origin-y 7 :scale-x 5 :scale-y 5 )})
|
||||
{:overlay (assoc (utils/get-texture "testscreen/test.png" ) :x 0 :y 0 :origin-x 0 :origin-y 0)
|
||||
:subject (assoc (utils/get-texture "testscreen/subject.png" ) :x 160 :y 120 :origin-x 7 :origin-y 7 :scale-x 5 :scale-y 5 )})
|
||||
|
||||
:on-render
|
||||
(fn [screen [entities]]
|
||||
|
||||
@@ -106,18 +106,18 @@
|
||||
(label! fullscreen :set-alignment Align/center)
|
||||
(input! :set-cursor-image (utils/cursor "cursor.png" :hourglass) 0 0)
|
||||
|
||||
{:background (assoc (texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:cloud-background (assoc (texture "title/clouds.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:logo (assoc (texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:fade (assoc (texture "black.png")
|
||||
{:background (assoc (utils/get-texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:cloud-background (assoc (utils/get-texture "title/clouds.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:logo (assoc (utils/get-texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 1.0
|
||||
:origin-x 0
|
||||
:origin-y 0)
|
||||
:flying-ego (assoc (texture "ego/flying.png")
|
||||
:left (flip (texture "ego/flying.png"))
|
||||
:right (texture "ego/flying.png")
|
||||
:flying-ego (assoc (utils/get-texture "ego/flying.png")
|
||||
:left (flip (utils/get-texture "ego/flying.png"))
|
||||
:right (utils/get-texture "ego/flying.png")
|
||||
:scale-x 5
|
||||
:scale-y 5
|
||||
:origin-x 2
|
||||
@@ -130,7 +130,7 @@
|
||||
:path (catmull-rom-spline (map #(apply vector-2* %) [[50 50] [70 100] [100 200] [151 206] [300 225] [480 300] [560 400] [650 440] [700 550] [750 600] [860 650] [950 700] [1030 800] [1280 960] [1300 1000] [-50 1000] [-50 -50]]) true))
|
||||
:particle-clouds (assoc (particle-effect "title/particle-clouds" :reset :start) :x 640 :y 480 )
|
||||
:ego-jet (assoc (particle-effect "ego/jet" :reset :start) :x 450 :y 650 )
|
||||
:toolbox (center (assoc (nine-patch {:region (:object (texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
:toolbox (center (assoc (nine-patch {:region (:object (utils/get-texture "talk-bg-2.png")) :left 9 :top 9 :right 9 :bottom 9})
|
||||
:y 58 :width 500 :height 282))
|
||||
|
||||
:music-label (-> (label "Music" (style :label font (color 1.0 1.0 1.0 1.0)))
|
||||
|
||||
@@ -53,6 +53,11 @@
|
||||
(.putString "save-1" (pr-str (entities :state)))
|
||||
.flush))
|
||||
|
||||
(defn get-texture [path]
|
||||
(let [atlas-name (str/replace path #".png" "")
|
||||
atlas (texture-atlas "packed/pack.atlas")]
|
||||
(texture (texture-atlas! atlas :find-region atlas-name))))
|
||||
|
||||
(defn has-save? []
|
||||
(-> (.getPreferences (Gdx/app) "ticks-tales-saves")
|
||||
(.contains "save-1")))
|
||||
@@ -140,7 +145,7 @@
|
||||
|
||||
|
||||
(defn make-bird [screen p]
|
||||
(let [bird-sheet (texture! (texture "outside-castle/bird.png") :split 1 2)
|
||||
(let [bird-sheet (texture! (get-texture "outside-castle/bird.png") :split 1 2)
|
||||
bird-stand (animation 0.15 (for [i [0 1]]
|
||||
(aget bird-sheet 0 i)))]
|
||||
(assoc (animation->texture screen bird-stand)
|
||||
|
||||
Reference in New Issue
Block a user