(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"))
(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)