trimmed mobile.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
[play-clj.entities :as entities]
|
||||
[play-clj.g2d :refer :all]
|
||||
[clojure.zip :as zip]
|
||||
[clojure.pprint]
|
||||
|
||||
[clojure.java.io :as io]
|
||||
[clojure.tools.logging :as log]
|
||||
[advent.pathfind]
|
||||
@@ -41,7 +41,7 @@
|
||||
[advent.screens.dialogue :refer [talking-screen toast-screen tooltip-screen]]
|
||||
[advent.screens.inventory :refer [inventory-screen]]
|
||||
|
||||
[clojure.core.async :refer [put! <! <!! >! chan go thread take! alts!! poll! dropping-buffer]])
|
||||
[clojure.core.async :refer [put! <! <!! >! chan go thread take! alts!! dropping-buffer]])
|
||||
(:import [com.badlogic.gdx.graphics Pixmap$Format Pixmap Pixmap$Filter Texture Texture$TextureFilter GL20 GL30]
|
||||
[com.badlogic.gdx.graphics.g2d TextureRegion Animation Batch]
|
||||
[com.badlogic.gdx.math Vector3 Matrix4]
|
||||
@@ -53,8 +53,7 @@
|
||||
[java.lang Object]
|
||||
[com.badlogic.gdx Gdx]
|
||||
[com.badlogic.gdx.graphics Camera Color GL20 OrthographicCamera
|
||||
PerspectiveCamera Pixmap Pixmap$Format PixmapIO Texture
|
||||
VertexAttributes$Usage]
|
||||
PerspectiveCamera Pixmap Pixmap$Format PixmapIO Texture ]
|
||||
[com.badlogic.gdx.scenes.scene2d Actor Stage]))
|
||||
|
||||
#_(set! *unchecked-math* :warn-on-boxed)
|
||||
@@ -655,28 +654,28 @@
|
||||
:origin-x 9
|
||||
:origin-y 0
|
||||
:scaled true
|
||||
:drop-sound (utils/load-sound "ego/drop.ogg")
|
||||
:milk-sound (utils/load-sound "outsidehouse/milk.ogg")
|
||||
:step-sound-1 (utils/load-sound "ego/step-1.ogg")
|
||||
:step-sound-2 (utils/load-sound "ego/step-2.ogg")
|
||||
:step-sound-3 (utils/load-sound "ego/step-3.ogg")
|
||||
:step-sound-4 (utils/load-sound "ego/step-4.ogg")
|
||||
:shoot-sound (utils/load-sound "ego/slingshot.ogg")
|
||||
:glad-sound (utils/load-sound "ego/glad.ogg")
|
||||
#_#_:drop-sound (utils/load-sound "ego/drop.ogg")
|
||||
#_#_:milk-sound (utils/load-sound "outsidehouse/milk.ogg")
|
||||
#_#_:step-sound-1 (utils/load-sound "ego/step-1.ogg")
|
||||
#_#_:step-sound-2 (utils/load-sound "ego/step-2.ogg")
|
||||
#_#_:step-sound-3 (utils/load-sound "ego/step-3.ogg")
|
||||
#_#_:step-sound-4 (utils/load-sound "ego/step-4.ogg")
|
||||
#_#_:shoot-sound (utils/load-sound "ego/slingshot.ogg")
|
||||
#_#_:glad-sound (utils/load-sound "ego/glad.ogg")
|
||||
|
||||
:get-sick-sound (utils/load-sound "ego/get-sick.ogg")
|
||||
:scratch-sound (utils/load-sound "ego/scratch.ogg")
|
||||
:scared-step-sound (utils/load-sound "ego/scared-step.ogg")
|
||||
#_#_:get-sick-sound (utils/load-sound "ego/get-sick.ogg")
|
||||
#_#_:scratch-sound (utils/load-sound "ego/scratch.ogg")
|
||||
#_#_:scared-step-sound (utils/load-sound "ego/scared-step.ogg")
|
||||
|
||||
:inside-step-sound-1 (utils/load-sound "ego/inside-step-1.ogg")
|
||||
:inside-step-sound-2 (utils/load-sound "ego/inside-step-2.ogg")
|
||||
:inside-step-sound-3 (utils/load-sound "ego/inside-step-3.ogg")
|
||||
:inside-step-sound-4 (utils/load-sound "ego/inside-step-4.ogg")
|
||||
:crowbar-sound (utils/load-sound "ego/crowbar.ogg")
|
||||
:sigh-sound (utils/load-sound "ego/sigh.ogg")
|
||||
:axe-sound (utils/load-sound "ego/axe.ogg")
|
||||
:breakglass-sound (utils/load-sound "ego/breakglass.ogg")
|
||||
:idea-sound (utils/load-sound "ego/idea.ogg")
|
||||
#_#_:inside-step-sound-1 (utils/load-sound "ego/inside-step-1.ogg")
|
||||
#_#_:inside-step-sound-2 (utils/load-sound "ego/inside-step-2.ogg")
|
||||
#_#_:inside-step-sound-3 (utils/load-sound "ego/inside-step-3.ogg")
|
||||
#_#_:inside-step-sound-4 (utils/load-sound "ego/inside-step-4.ogg")
|
||||
#_#_:crowbar-sound (utils/load-sound "ego/crowbar.ogg")
|
||||
#_#_:sigh-sound (utils/load-sound "ego/sigh.ogg")
|
||||
#_#_:axe-sound (utils/load-sound "ego/axe.ogg")
|
||||
#_#_:breakglass-sound (utils/load-sound "ego/breakglass.ogg")
|
||||
#_#_:idea-sound (utils/load-sound "ego/idea.ogg")
|
||||
:scale-x start-scale
|
||||
:scale-y start-scale
|
||||
:talk-color (color 0.6 1.0 1.0 1.0)
|
||||
@@ -774,7 +773,7 @@
|
||||
(let [{{:keys [script-running? script-chan]} key} entities]
|
||||
(if script-running?
|
||||
entities
|
||||
(let [next-script (poll! script-chan)]
|
||||
(let [next-script (<! script-chan)]
|
||||
(if next-script
|
||||
(do
|
||||
(next-script entities)
|
||||
@@ -796,7 +795,7 @@
|
||||
(update-in terminated [key] assoc :current nil :started? false)
|
||||
key))
|
||||
(assoc-in entities [key :started?] true)))
|
||||
(let [current (poll! channel)]
|
||||
(let [current (<! channel)]
|
||||
|
||||
(-> entities
|
||||
(assoc-in [key :started?] false)
|
||||
@@ -1089,6 +1088,7 @@
|
||||
has-start-pos? (:x state)
|
||||
|
||||
_ (update! screen :shader shader)
|
||||
log-assets (fn [r] r)
|
||||
rooms {:inside-house (rooms.inside-house/make screen)
|
||||
:inside-stash (rooms.inside-stash/make screen)
|
||||
:outside-house (rooms.outside-house/make screen)
|
||||
@@ -1123,14 +1123,14 @@
|
||||
:inside-antique (utils/make-music "music/inside-antique.ogg")
|
||||
:town-1 (utils/make-music "music/town-music-1.ogg")
|
||||
:town-2 (utils/make-music "music/town-music-2.ogg")
|
||||
:love (utils/make-music "music/love.ogg")
|
||||
:inside-fangald (utils/make-music "music/inside-fangald.ogg")
|
||||
:fight (utils/make-music "music/megaboss.mp3")
|
||||
:pull-sword (utils/make-music "music/pull-sword.ogg")
|
||||
:night (utils/make-music "music/night.ogg")
|
||||
:dream (utils/make-music "dream/music.ogg")
|
||||
:secret-hideout (utils/make-music "music/secret-hideout.ogg")
|
||||
:wind (utils/make-music "music/wind.ogg")}
|
||||
#_#_:love (utils/make-music "music/love.ogg")
|
||||
#_#_:inside-fangald (utils/make-music "music/inside-fangald.ogg")
|
||||
#_#_:fight (utils/make-music "music/megaboss.mp3")
|
||||
#_#_:pull-sword (utils/make-music "music/pull-sword.ogg")
|
||||
#_#_:night (utils/make-music "music/night.ogg")
|
||||
#_#_:dream (utils/make-music "dream/music.ogg")
|
||||
#_#_:secret-hideout (utils/make-music "music/secret-hideout.ogg")
|
||||
#_#_:wind (utils/make-music "music/wind.ogg")}
|
||||
:state state
|
||||
:time-profiles {:object nil
|
||||
:default utils/default-night-merge
|
||||
@@ -1139,10 +1139,10 @@
|
||||
|
||||
:closing? {:object nil
|
||||
:value false}
|
||||
:sounds {:blink (utils/load-sound "ego/blink2.ogg")
|
||||
:pickup (utils/load-sound "pickup.ogg")
|
||||
:disappear (utils/load-sound "inside-house/disappear.ogg")
|
||||
:grow-sound (utils/load-sound "ego/potion.ogg")
|
||||
:sounds {#_#_:blink (utils/load-sound "ego/blink2.ogg")
|
||||
#_#_:pickup (utils/load-sound "pickup.ogg")
|
||||
#_#_:disappear (utils/load-sound "inside-house/disappear.ogg")
|
||||
#_#_:grow-sound (utils/load-sound "ego/potion.ogg")
|
||||
:object nil}
|
||||
:fade {:object nil
|
||||
:opacity 0.0}
|
||||
@@ -1189,6 +1189,8 @@
|
||||
(if has-start-pos?
|
||||
start-pos
|
||||
(:start-pos room))))))}]
|
||||
(log/info "assets so far", (.getDiagnostics *asset-manager*) )
|
||||
|
||||
|
||||
(doseq [[k [start time fn]] (get-in entities [:room :timers])]
|
||||
(add-timer! screen k start time))
|
||||
@@ -1268,7 +1270,7 @@
|
||||
|
||||
:on-render
|
||||
(fn [{:keys [^OrthographicCamera camera ^FitViewport viewport ^Stage renderer] :as screen} {{:keys [last-pos ] [cursor-offset-x cursor-offset-y] :offset} :cursor :keys [tweens] :as entities} options]
|
||||
(steam/update)
|
||||
#_(steam/update)
|
||||
(.apply viewport)
|
||||
|
||||
(if (get-in entities [:closing? :value])
|
||||
|
||||
Reference in New Issue
Block a user