Permalink
Browse files

Changes for creating executables.

  • Loading branch information...
1 parent 4692adb commit 905197bb30bbc8348abace40f32a42bf7ffaf2ae @aerique committed Sep 2, 2009
Showing with 11 additions and 9 deletions.
  1. +11 −9 src/cffi.lisp
View
@@ -42,8 +42,6 @@
(defcvar "clfun_key_pressed" :pointer)
-(setf *clfun-key-pressed* (get-callback 'key-pressed))
-
(defcallback key-released
:void
@@ -53,8 +51,6 @@
(defcvar "clfun_key_released" :pointer)
-(setf *clfun-key-released* (get-callback 'key-released))
-
;;; Mouse
@@ -66,20 +62,26 @@
(defcvar "clfun_mouse_moved" :pointer)
-(setf *clfun-mouse-moved* (get-callback 'mouse-moved))
-
(defcallback mouse-pressed :void ((mbtn :int))
(handle-mouse-button-event mbtn :pressed))
(defcvar "clfun_mouse_pressed" :pointer)
-(setf *clfun-mouse-pressed* (get-callback 'mouse-pressed))
-
(defcallback mouse-released :void ((mbtn :int))
(handle-mouse-button-event mbtn :released))
(defcvar "clfun_mouse_released" :pointer)
-(setf *clfun-mouse-released* (get-callback 'mouse-released))
+
+;;; Initialising Callbacks
+
+(defun initialise-callbacks ()
+ (setf *clfun-key-pressed* (get-callback 'key-pressed))
+ (setf *clfun-key-released* (get-callback 'key-released))
+ (setf *clfun-mouse-moved* (get-callback 'mouse-moved))
+ (setf *clfun-mouse-pressed* (get-callback 'mouse-pressed))
+ (setf *clfun-mouse-released* (get-callback 'mouse-released)))
+
+(initialise-callbacks)

0 comments on commit 905197b

Please sign in to comment.