working on getting everything working again.
This commit is contained in:
@@ -1121,7 +1121,7 @@ void main ()
|
||||
(log/info "Initializing scene.")
|
||||
|
||||
(let [screen (assoc screen :total-time 0)]
|
||||
(let [[^OrthographicCamera cam] (utils/setup-viewport screen 320 240)]
|
||||
(let [{cam :camera} (utils/setup-viewport screen 320 240)]
|
||||
(set! (. cam zoom) 0.95)
|
||||
(let [shader (ShaderProgram. ^String v-shader ^String pix-shader)
|
||||
_ (log/info "shader log:" (.getLog shader))
|
||||
@@ -1793,7 +1793,7 @@ void main ()
|
||||
:on-render
|
||||
(fn [{:keys [^FitViewport viewport] :as screen} entities options]
|
||||
(.apply viewport)
|
||||
#_(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
(let [entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
entities (update-in entities [:inventory] animate screen )
|
||||
hud-interactable? (hud-interactable?)
|
||||
entities (if hud-interactable?
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
:z 8
|
||||
:opacity 1.0)))
|
||||
|
||||
(defn main-menu []
|
||||
(defn main-menu [screen]
|
||||
(let [start-playing-label (quest-label)
|
||||
is-starting? (= "Begin Quest" start-playing-label)]
|
||||
(make-table [[(make-button start-playing-label :key :continue-or-start) :height 56 :pad-bottom 4 :width 250]
|
||||
@@ -338,77 +338,80 @@
|
||||
(defscreen title-screen
|
||||
:on-show
|
||||
(fn [screen entities options]
|
||||
(utils/setup-viewport screen 1280 960)
|
||||
(log/info "Starting title screen.")
|
||||
|
||||
(let [font (utils/get-font "ego/font.fnt")
|
||||
music (utils/make-music "music/intro.ogg")
|
||||
balloon (utils/make-anim "title/balloon.png" [15 30] 0.45 (range 4))
|
||||
banner-back (utils/make-anim "title/banner-back.png" [180 42] 0.2 [0 1 2 1 0 1 2 1])]
|
||||
(let [screen (utils/setup-viewport screen 1280 960)]
|
||||
(log/info "Starting title screen.")
|
||||
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
|
||||
|
||||
(let [entities {:background (assoc (utils/get-texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 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 :z 2)
|
||||
:banner-back (assoc (animation->texture (assoc screen :total-time 0.0) banner-back) :x 580 :y 400 :scale-x 4 :scale-y 4
|
||||
:anim banner-back
|
||||
:z 3)
|
||||
:quill (doto (assoc (image-button (BaseDrawable.)) :x 1150 :y 4 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10 :key :quill)
|
||||
|
||||
(image-button! :add (doto (Group. )
|
||||
(.addActor (:object (doto (image (utils/get-texture "title/quill.png"))
|
||||
(image! :set-scale 4))))))
|
||||
|
||||
save-object)
|
||||
:logo (assoc (utils/get-texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 6)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 1.0
|
||||
:origin-x 0
|
||||
:origin-y 0
|
||||
:z 100)
|
||||
: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
|
||||
:origin-y 0
|
||||
:path (catmull-rom-spline (map #(apply vector-2* %) [[-800 450] [1280 450] [2000 100] [0 100] [-800 300] [1280 300] [2000 450]]) true)
|
||||
:x 450
|
||||
:y 650
|
||||
:z 5)
|
||||
:balloon (assoc (animation->texture (assoc screen :total-time 0.0) balloon) :x 100 :y 100 :scale-x 4 :scale-y 4
|
||||
:anim balloon
|
||||
: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)
|
||||
:z 3)
|
||||
:particle-clouds (assoc (particle-effect "particles/particle-clouds" :reset :start) :x 640 :y 480 :z 1)
|
||||
:ego-jet (assoc (particle-effect "particles/jet" :reset :start) :x 450 :y 650 :z 4)
|
||||
(let [font (utils/get-font "ego/font.fnt")
|
||||
music (utils/make-music "music/intro.ogg")
|
||||
balloon (utils/make-anim "title/balloon.png" [15 30] 0.45 (range 4))
|
||||
banner-back (utils/make-anim "title/banner-back.png" [180 42] 0.2 [0 1 2 1 0 1 2 1])]
|
||||
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :hourglass))
|
||||
|
||||
(let [entities {:background (assoc (utils/get-texture "title/background.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 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 :z 2)
|
||||
:banner-back (assoc (animation->texture (assoc screen :total-time 0.0) banner-back) :x 580 :y 400 :scale-x 4 :scale-y 4
|
||||
:anim banner-back
|
||||
:z 3)
|
||||
:quill (doto (assoc (image-button (BaseDrawable.)) :x 1150 :y 4 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 10 :key :quill)
|
||||
|
||||
(image-button! :add (doto (Group. )
|
||||
(.addActor (:object (doto (image (utils/get-texture "title/quill.png"))
|
||||
(image! :set-scale 4))))))
|
||||
|
||||
save-object
|
||||
(#(utils/add-actor-to-stage screen %)))
|
||||
:logo (assoc (utils/get-texture "title/logo.png" ) :x 0 :y 0 :scale-x 4 :scale-y 4 :origin-x 0 :origin-y 0 :z 6)
|
||||
:fade (assoc (utils/get-texture "black.png")
|
||||
:scale-x 80
|
||||
:scale-y 80
|
||||
:opacity 1.0
|
||||
:origin-x 0
|
||||
:origin-y 0
|
||||
:z 100)
|
||||
: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
|
||||
:origin-y 0
|
||||
:path (catmull-rom-spline (map #(apply vector-2* %) [[-800 450] [1280 450] [2000 100] [0 100] [-800 300] [1280 300] [2000 450]]) true)
|
||||
:x 450
|
||||
:y 650
|
||||
:z 5)
|
||||
:balloon (assoc (animation->texture (assoc screen :total-time 0.0) balloon) :x 100 :y 100 :scale-x 4 :scale-y 4
|
||||
:anim balloon
|
||||
: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)
|
||||
:z 3)
|
||||
:particle-clouds (assoc (particle-effect "particles/particle-clouds" :reset :start) :x 640 :y 480 :z 1)
|
||||
:ego-jet (assoc (particle-effect "particles/jet" :reset :start) :x 450 :y 650 :z 4)
|
||||
|
||||
#_#_:toolbox (-> (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 297
|
||||
:z 7)
|
||||
center)
|
||||
:main-menu (main-menu)
|
||||
:saves-list (utils/snapshot-screenshots)
|
||||
:save-index 0
|
||||
:font font
|
||||
:music music
|
||||
:volume 1.0
|
||||
:copyright (make-label (str "© Digital Bounce House 2016 - v" (advent.version/version)) label-color)
|
||||
:tweens {:fade-in (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.0
|
||||
:finish #(do
|
||||
#_#_:toolbox (-> (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 297
|
||||
:z 7)
|
||||
center)
|
||||
:main-menu (->> (main-menu screen)
|
||||
(utils/add-actor-to-stage screen))
|
||||
:saves-list (utils/snapshot-screenshots)
|
||||
:save-index 0
|
||||
:font font
|
||||
:music music
|
||||
:volume 1.0
|
||||
:copyright (->> (make-label (str "© Digital Bounce House 2016 - v" (advent.version/version)) label-color)
|
||||
(utils/add-actor-to-stage screen))
|
||||
:tweens {:fade-in (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 1.0
|
||||
:finish #(do
|
||||
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :main))
|
||||
(utils/play-music (:music %)) %)
|
||||
:ease tween/ease-in-quadratic)}}
|
||||
]
|
||||
(merge entities (:main-menu entities)))))
|
||||
(graphics! :set-cursor (utils/cursor "cursor.png" :main))
|
||||
(utils/play-music (:music %)) %)
|
||||
:ease tween/ease-in-quadratic)}}
|
||||
]
|
||||
(merge entities (:main-menu entities))))))
|
||||
|
||||
|
||||
:on-render
|
||||
@@ -478,7 +481,7 @@
|
||||
(dissoc :save-menu)
|
||||
(dissoc :chapters-menu)
|
||||
(dissoc :settings-menu)
|
||||
(assoc :main-menu (main-menu)))
|
||||
(assoc :main-menu (main-menu screen)))
|
||||
|
||||
(#{:dont-delete-button } actor-key)
|
||||
(as-> entities entities
|
||||
|
||||
Reference in New Issue
Block a user