various loading statements.

This commit is contained in:
Bryce Covert
2017-06-01 08:05:02 -07:00
parent 8d680eeaa6
commit d74604b578
29 changed files with 40 additions and 4 deletions

View File

@@ -15,6 +15,7 @@
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]))
(println "loading " *ns*)
(defn center [e]
(assoc e :x (- (/ 1280 2) (/ (or (:width e) (.getWidth (:object e))) 2))))

View File

@@ -17,6 +17,7 @@
[com.badlogic.gdx Screen]
[com.badlogic.gdx.scenes.scene2d.utils NinePatchDrawable ]
[play_clj.entities NinePatchEntity]))
(println "loading " *ns*)
(defn ensure-on-screen [talk]
(let [margin-width (* 0.05 1280)

View File

@@ -13,6 +13,7 @@
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]
[com.badlogic.gdx.utils.viewport FitViewport]))
(println "loading " *ns*)
(defscreen fade-screen

View File

@@ -16,6 +16,7 @@
[com.badlogic.gdx.utils Align]
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]))
(println "loading " *ns*)
(defn interactable? [entities]
(and (:shown? entities) (= 1.0 (:opacity entities))))

View File

@@ -1,5 +1,6 @@
(ns advent.screens.items
(:require [advent.actions :as actions]))
(println "loading " *ns*)
(def make-cat-toy
(actions/get-script entities

View File

@@ -6,6 +6,7 @@
[com.badlogic.gdx.utils.viewport FitViewport]
[com.badlogic.gdx.scenes.scene2d Actor Stage]
[java.lang Object]))
(println "loading " *ns*)
(defn make-entity [id {:keys [scripts script only-script] :as entity}]
(merge entity

View File

@@ -11,6 +11,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all])
)
(println "loading behindhouse")
(defn make-night [entities]
(assoc-in entities [:room :entities :peeling :opacity] 0))

View File

@@ -16,6 +16,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn make-night [entities]
entities)

View File

@@ -11,6 +11,9 @@
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn get-down [entities & break]
(actions/walk-straight-to entities :ego [151 50] :update-baseline? false :face :left)

View File

@@ -15,6 +15,8 @@
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(println "loading " *ns*)
(defn go-to-jail [entities & [time]]
(actions/update-state entities #(assoc % :chest-contents (concat (remove #{:key :ladder} (:inventory %)) (:chest-contents %))))

View File

@@ -19,6 +19,8 @@
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(println "loading " *ns*)
(def walk-chan (a/chan))
(defn set-opacity [entities opacity tool-opacity]

View File

@@ -17,6 +17,8 @@
[play-clj.g2d :refer :all])
(:import [com.badlogic.gdx.graphics Color]))
(println "loading " *ns*)
(defn make [screen atlas global-atlas]
(let [peddler-sheet (texture! (utils/atlas->texture atlas "peddler-talk" ) :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])]

View File

@@ -15,6 +15,7 @@
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn bloodclot-choices [entities]

View File

@@ -11,6 +11,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(def boy-names
["Steve" "Bob" "Bud" "Clement" "Terrence" "Flapjack" "Ticklemonster" "Peter" "Greg" "Dave" "Stu" "Calsbad" "Fatso" "Tanner" "Klug"
"Griswold" "Leonardo" "Donatello" "Raphael" "Michelangelo" "Francis" "Ebeneezer" "Pierre" "Finn" "Slade" "Gilbert" "Graham"

View File

@@ -11,6 +11,8 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn make-fight-entity [global-atlas]
(assoc (utils/atlas->texture global-atlas "black.png")
:x 0

View File

@@ -16,6 +16,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn brian [screen entities]
(when (and (not (get-in entities [:fg-actions :script-running?]))
(not (get-in entities [:bg-actions :script-running?]))

View File

@@ -11,6 +11,8 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn open-safe [entities]
(actions/play-animation entities :ego :start-squat :stop? false)
(Thread/sleep 500)

View File

@@ -14,6 +14,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn remove-lock [entities]
(-> entities

View File

@@ -8,6 +8,7 @@
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn bust-chest [entities]
(if (get-in @entities [:state :broke-lock?])

View File

@@ -12,6 +12,7 @@
[play-clj.math :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn flies-vol [entities]
(utils/proximity-volume entities [201 175] :scale 0.20))

View File

@@ -16,6 +16,7 @@
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn dawn-fade [entities]

View File

@@ -9,6 +9,7 @@
[play-clj.ui :refer :all]
[play-clj.utils :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn add-spear-if-necessary [entities]
(if (and (not (actions/has-obtained? entities :spear))

View File

@@ -15,6 +15,7 @@
[play-clj.utils :refer :all]
[play-clj.math :refer :all]
[play-clj.g2d :refer :all]))
(println "loading " *ns*)
(defn taunt [screen entities]
(when (and (not (get-in entities [:fg-actions :script-running?]))

View File

@@ -13,6 +13,7 @@
[com.badlogic.gdx.utils Align]
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]))
(println "loading " *ns*)
(def start-x 35)

View File

@@ -58,6 +58,8 @@
#_(set! *unchecked-math* :warn-on-boxed)
(println "loading scene")
(declare hud)
(declare get-selected-inventory-item)
@@ -1429,8 +1431,8 @@
(assoc-in [:cursor :down-target] (or (:id interacting-entity ) (:id interaction) nil)))))))
:on-touch-up (fn [screen entities options]
(let [currently-pressed (dec (get-in entities [:cursor :counter]))
max-pressed (get-in entities [:cursor :max-counter])]
(let [currently-pressed (dec (get-in entities [:cursor :counter] 1))
max-pressed (get-in entities [:cursor :max-counter] 1)]
(println "touched up" currently-pressed max-pressed)
(cond
(and (<= currently-pressed 0)
@@ -1448,7 +1450,7 @@
(update-in [:cam] dissoc :start-zoom :pinching))
(get-in entities [:state :active?])
(update-in entities [:cursor :counter] #(max 0 (dec %)))
(update-in entities [:cursor :counter] #(max 0 (dec (or % 1))))
:else
entities

View File

@@ -1,5 +1,6 @@
(ns advent.screens.shader
(:require [advent.utils :as utils]))
(println "loading " *ns*)
(def v-shader (constantly "attribute vec4 a_position;

View File

@@ -23,6 +23,7 @@
[com.badlogic.gdx.scenes.scene2d.utils NinePatchDrawable TextureRegionDrawable]
[com.badlogic.gdx Application Audio Files Game Gdx Graphics Input
InputMultiplexer InputProcessor Net Preferences Screen]))
(println "loading " *ns*)
(defn fade-in [screen e thing then]
(assoc-in e [:tweens :fade-in]

View File

@@ -6,6 +6,7 @@
(def has-steam?
false
)
(println "loading steam")
(def is-app-store? false)
(def all-achievements ["PARDON" "EX_CON" "PRO_WRESTLER" "SHEEP_HORDER" "SAFE_AND_SOUND" "DESTINY" "WISE_UP" "BLOODCLOT" "KITTY_KISS"])