]> git.jsancho.org Git - gacela.git/commitdiff
(no commit message)
authorjsancho <devnull@localhost>
Sun, 2 Jan 2011 13:21:48 +0000 (13:21 +0000)
committerjsancho <devnull@localhost>
Sun, 2 Jan 2011 13:21:48 +0000 (13:21 +0000)
Makefile
gacela.lisp
gacela_GL.lisp
gacela_objects.lisp

index ec2445708d7978089eb3b0777275586ee76ad1c2..a6d98a042ebd34b94feb3ec2ff11e60d9917766c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ INC = -I/usr/include/FTGL -I/usr/include/freetype2
 LIBS = -lSDL -lSDL_image -lSDL_mixer -lSDL_gfx -lGL -lGLU -lftgl
 
 OBJ = gacela.o gacela_misc.o gacela_SDL.o gacela_GL.o gacela_FTGL.o \
-      gacela_draw.o gacela_ttf.o gacela_events.o gacela_mobs.o gacela_entities.o \
+      gacela_draw.o gacela_ttf.o gacela_events.o gacela_mobs.o gacela_objects.o \
       gacela_widgets.o gacela_sound.o
 
 GCL_OBJ = $(OBJ:%.o=\"%.o\")
index c6cdeb9f57e7d5b6a94c1f12c60eff2a4ffca441..4197d22d077e2b488fc7f692d48285aced148848 100644 (file)
        (cond ((not (quit?))
               (glClear (+ GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT))
               (to-origin)
-              (refresh-visible-boxes)
+              (refresh-active-objects)
               (when (functionp game-code) (funcall game-code))
-              (render-boxes)
+              (render-objects)
               (SDL_GL_SwapBuffers)
               (delay-frame))))
     (setq running nil))
   (quit-audio)
   (quit-video-mode)
 ;  (quit-all-mobs)
-  (quit-all-boxes)
+  (kill-all-objects)
 ;  (clear-events)
 ;  (quit-events)
   (quit-sdl))
index b890c25a2f96058e13903a372bb97ac25d3c7910..c17b049cc0f8688c232f931390a30565ef1570bc 100644 (file)
 (defcfun "void gacela_glOrtho (float left, float right, float bottom, float top, float near_val, float far_val)" 0
   "glOrtho (left, right, bottom, top, near_val, far_val);")
 
+(defcfun "void gacela_glPushMatrix (void)" 0
+  "glPushMatrix ();")
+
+(defcfun "void gacela_glPopMatrix (void)" 0
+  "glPopMatrix ();")
+
 (defcfun "void gacela_gluPerspective (double fovy, double aspect, double zNear, double zFar)" 0
   "gluPerspective (fovy, aspect, zNear, zFar);")
 
 (defentry glNormal3f (float float float) (void "gacela_glNormal3f"))
 (defentry glBlendFunc (int int) (void "gacela_glBlendFunc"))
 (defentry glOrtho (float float float float float float) (void "gacela_glOrtho"))
+(defentry glPushMatrix () (void "gacela_glPushMatrix"))
+(defentry glPopMatrix () (void "gacela_glPopMatrix"))
 
 (defentry gluPerspective (double double double double) (void "gacela_gluPerspective"))
 (defentry gluBuild2DMipmaps (int int int int int int int) (int "gacela_gluBuild2DMipmaps"))
index e5d049dbf576e36e2c8304b772f54a331125c13d..178c4acf99ad85d984d915837c092b36dffac218 100755 (executable)
@@ -87,7 +87,9 @@
               (:get-attr attr)
               (:get-bhv bhv)
               (:set-bhv (setq bhv (car param)))
-              (:render ,@look))))
+              (:render (glPushMatrix)
+                       ,@(mapcar (lambda (x) (if (stringp x) `(draw-image ,x) x)) look)
+                       (glPopMatrix)))))
      (add-object ',name)
      ',name))