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