Initial import

This commit is contained in:
oakes
2013-12-29 02:35:49 -05:00
parent f4e4a58035
commit ec40af834a
9 changed files with 91 additions and 4 deletions

8
desktop/project.clj Normal file
View File

@@ -0,0 +1,8 @@
(defproject play-clj-desktop "0.1.0-SNAPSHOT"
:description "Library for making desktop games"
:license {:name "Public Domain"
:url "http://unlicense.org/UNLICENSE"}
:dependencies [[com.badlogicgames.gdx/gdx-backend-lwjgl "0.9.9"]
[com.badlogicgames.gdx/gdx-platform "0.9.9"
:classifier "natives-desktop"]
[play-clj "0.1.0-SNAPSHOT"]])

View File

@@ -0,0 +1,17 @@
(ns play-clj.desktop
(:require [play-clj.core :refer :all])
(:import [com.badlogic.gdx.backends.lwjgl LwjglApplication]
[org.lwjgl.input Keyboard]))
(defmacro defgame
[name & {:keys [title width height]
:as options}]
(let [title (or title "")
width (or width 800)
height (or height 600)]
`(do
(def ~name (create-game ~options))
(defn ~'-main
[]
(LwjglApplication. ~name ~title ~width ~height true)
(Keyboard/enableRepeatEvents true)))))