From: jsancho Date: Fri, 25 Sep 2009 15:45:06 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=a5498a39db21d35ab8090f154944550def25f68e;p=gacela.git --- diff --git a/gacela_make.lisp b/gacela_make.lisp index 68bf06d..50100f4 100755 --- a/gacela_make.lisp +++ b/gacela_make.lisp @@ -20,17 +20,17 @@ (defun compile-gacela () (compile-gfile "gacela.lisp") + (compile-gfile "gacela_misc.lisp") (compile-gfile "gacela_SDL.lisp") (compile-gfile "gacela_GL.lisp") (compile-gfile "gacela_draw.lisp") (compile-gfile "gacela_events.lisp") (compile-gfile "gacela_mobs.lisp") - (compile-gfile "gacela_widgets.lisp") - (compile-gfile "gacela_misc.lisp")) + (compile-gfile "gacela_widgets.lisp")) (defun link-gacela () (compiler::link - '("gacela.o" "gacela_SDL.o" "gacela_GL.o" "gacela_draw.o" "gacela_events.o" "gacela_mobs.o" "gacela_widgets.o" "gacela_misc.o") + '("gacela.o" "gacela_misc.o" "gacela_SDL.o" "gacela_GL.o" "gacela_draw.o" "gacela_events.o" "gacela_mobs.o" "gacela_widgets.o") "gacela" "" "-lSDL -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL_gfx -lGL -lGLU")) diff --git a/gacela_misc.lisp b/gacela_misc.lisp index ac7b479..419181b 100755 --- a/gacela_misc.lisp +++ b/gacela_misc.lisp @@ -70,12 +70,14 @@ (power 1 n))) (defmacro mapcconst (type c-type name) - `(progn - (defcfun ,(concatenate 'string c-type " gacela_" name " (void)") 0 - ,(concatenate 'string "return " name ";")) - (defentry ,(intern (string-upcase name)) () - (,type ,(concatenate 'string "gacela_" name))))) - + (let ((c-header (concatenate 'string c-type " gacela_" name " (void)")) + (c-body (concatenate 'string "return " name ";")) + (c-name (concatenate 'string "gacela_" name)) + (lisp-name (intern (string-upcase name)))) + `(progn + (defcfun ,c-header 0 ,c-body) + (defentry ,lisp-name () (,type ,c-name)) + (eval-when (load) (defconstant ,lisp-name (,lisp-name)))))) ;Geometry (defun dotp (dot)