Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Example-related updates

  • Loading branch information...
commit 9743f3d0286034958b78c1ff3e1a7ab0a08cdb28 1 parent 9448386
Josh Marchán authored
4 examples/basic-no-subclass.lisp
@@ -15,8 +15,8 @@
15 15 :fps-limit 60
16 16 :title "Basic UID Example (no subclasses)"
17 17 :clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*)
18   - :window-width 400
19   - :window-height 400))
  18 + :width 400
  19 + :height 400))
20 20
21 21 (defmethod uid:on-draw ((game (eql *game*)))
22 22 (uid:clear game)
4 examples/basic.lisp
@@ -8,8 +8,8 @@
8 8 (:default-initargs :title "Basic UID Example"
9 9 :fps-limit 60
10 10 :clear-color (uid:mix-colors uid:*blue* uid:*white* uid:*green*)
11   - :window-width 400
12   - :window-height 400))
  11 + :width 400
  12 + :height 400))
13 13
14 14 (defmethod uid:on-draw ((game my-basic-game))
15 15 (uid:clear game)
16 examples/image.lisp
@@ -7,18 +7,18 @@
7 7 (merge-pathnames "res/" (load-time-value (or #.*compile-file-truename* *load-truename*))))
8 8
9 9 (defclass image-example (uid:simple-game-engine)
10   - ()
  10 + ((image :initarg :image :accessor image))
11 11 (:default-initargs :title "UID Image-drawing example."
12   - :window-width 400
13   - :window-height 400))
14   -
15   -(defparameter *image* (make-instance 'uid:image
16   - :texture-filepath
17   - (merge-pathnames "lisplogo_alien_256.png" *resource-directory*)))
  12 + :width 400
  13 + :height 400
  14 + :image (make-instance 'uid:image
  15 + :texture-filepath
  16 + (merge-pathnames "lisplogo_alien_256.png"
  17 + *resource-directory*))))
18 18
19 19 (defmethod uid:on-draw ((game image-example))
20 20 (uid:clear game)
21   - (uid:draw *image* :x 100 :y 100))
  21 + (uid:draw (image game) :x 100 :y 100))
22 22
23 23 (defmethod uid:on-key-down ((game image-example) keycode keysym string)
24 24 (declare (ignore keycode string))
2  until-it-dies.examples.asd
@@ -10,5 +10,5 @@
10 10 ((:file "basic")
11 11 (:file "text")
12 12 (:file "image")
13   - (:file "multi-window")
  13 + #+nil(:file "multi-window")
14 14 (:file "basic-no-subclass")))))

0 comments on commit 9743f3d

Please sign in to comment.
Something went wrong with that request. Please try again.