This commit is contained in:
Bryce Covert
2016-01-15 21:34:26 -08:00
parent 3abff89d5e
commit dcf6328ca1
10 changed files with 26 additions and 51 deletions

View File

@@ -1,7 +1,8 @@
(ns advent.core.desktop-launcher
(:require [advent.core :refer :all]
[advent.utils :as utils]
[play-clj.core :refer :all])
[play-clj.core :refer :all]
[clojure.tools.logging :as log])
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication LwjglApplicationConfiguration]
[org.lwjgl.input Keyboard]
[com.badlogic.gdx Gdx Files$FileType])
@@ -14,31 +15,19 @@
(require '[play-clj-nrepl.core :as a])
(System/getProperty "use-repl")
(catch Exception e
(println e)
false)))
(defn -main
[& [port]]
(when has-nrepl?
(play-clj-nrepl.core/start-nrepl advent.core/advent port))
(eval `(play-clj-nrepl.core/start-nrepl advent.core/advent ~port)))
(let [cfg (LwjglApplicationConfiguration.)]
#_(println (.exists (files! :classpath "icon/icon_128x128.png")))
(.addIcon cfg "icon/icon_128x128.png" Files$FileType/Classpath)
(.addIcon cfg "icon/icon_32x32.png" Files$FileType/Classpath)
(.addIcon cfg "icon/icon_16x16.png" Files$FileType/Classpath)
(if false
(do
(set! (.width cfg) (doto (.width (LwjglApplicationConfiguration/getDesktopDisplayMode)) println))
(set! (.height cfg) (doto (.height (LwjglApplicationConfiguration/getDesktopDisplayMode)) println))
(set! (.resizable cfg) true)
(set! (.useHDPI cfg) false)
(set! (.fullscreen cfg) true))
(do
(set! (.width cfg) 1280)
(set! (.height cfg) 960)))
(set! (.title cfg) "Tick's Tales: Up All Knight")
(set! (.foregroundFPS cfg) 60)
(set! (.backgroundFPS cfg) 60)