Skip to content

Commit

Permalink
Example-related updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Marchán committed Jun 27, 2010
1 parent 9448386 commit 9743f3d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/basic-no-subclass.lisp
Expand Up @@ -15,8 +15,8 @@
:fps-limit 60 :fps-limit 60
:title "Basic UID Example (no subclasses)" :title "Basic UID Example (no subclasses)"
:clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*) :clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*)
:window-width 400 :width 400
:window-height 400)) :height 400))


(defmethod uid:on-draw ((game (eql *game*))) (defmethod uid:on-draw ((game (eql *game*)))
(uid:clear game) (uid:clear game)
Expand Down
4 changes: 2 additions & 2 deletions examples/basic.lisp
Expand Up @@ -8,8 +8,8 @@
(:default-initargs :title "Basic UID Example" (:default-initargs :title "Basic UID Example"
:fps-limit 60 :fps-limit 60
:clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*) :clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*)
:window-width 400 :width 400
:window-height 400)) :height 400))


(defmethod uid:on-draw ((game my-basic-game)) (defmethod uid:on-draw ((game my-basic-game))
(uid:clear game) (uid:clear game)
Expand Down
16 changes: 8 additions & 8 deletions examples/image.lisp
Expand Up @@ -7,18 +7,18 @@
(merge-pathnames "res/" (load-time-value (or #.*compile-file-truename* *load-truename*)))) (merge-pathnames "res/" (load-time-value (or #.*compile-file-truename* *load-truename*))))


(defclass image-example (uid:simple-game-engine) (defclass image-example (uid:simple-game-engine)
() ((image :initarg :image :accessor image))
(:default-initargs :title "UID Image-drawing example." (:default-initargs :title "UID Image-drawing example."
:window-width 400 :width 400
:window-height 400)) :height 400

:image (make-instance 'uid:image
(defparameter *image* (make-instance 'uid:image :texture-filepath
:texture-filepath (merge-pathnames "lisplogo_alien_256.png"
(merge-pathnames "lisplogo_alien_256.png" *resource-directory*))) *resource-directory*))))


(defmethod uid:on-draw ((game image-example)) (defmethod uid:on-draw ((game image-example))
(uid:clear game) (uid:clear game)
(uid:draw *image* :x 100 :y 100)) (uid:draw (image game) :x 100 :y 100))


(defmethod uid:on-key-down ((game image-example) keycode keysym string) (defmethod uid:on-key-down ((game image-example) keycode keysym string)
(declare (ignore keycode string)) (declare (ignore keycode string))
Expand Down
2 changes: 1 addition & 1 deletion until-it-dies.examples.asd
Expand Up @@ -10,5 +10,5 @@
((:file "basic") ((:file "basic")
(:file "text") (:file "text")
(:file "image") (:file "image")
(:file "multi-window") #+nil(:file "multi-window")
(:file "basic-no-subclass"))))) (:file "basic-no-subclass")))))

0 comments on commit 9743f3d

Please sign in to comment.