X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=gacela_SDL.lisp;h=810908045b5c24503f72c314fd82068513446973;hb=27b9bb922e43e418305b28d8139408634d4be1a3;hp=adcef190979560d01d963b716212f2aea28858f6;hpb=678a1561ca858c34fecf04792831caf68559c2ac;p=gacela.git diff --git a/gacela_SDL.lisp b/gacela_SDL.lisp index adcef19..8109080 100644 --- a/gacela_SDL.lisp +++ b/gacela_SDL.lisp @@ -21,7 +21,6 @@ (clines "#include ") (clines "#include ") (clines "#include ") -(clines "#include ") ;;; These are the flags which may be passed to SDL_Init() (defconstant SDL_INIT_TIMER #x00000001) @@ -62,6 +61,10 @@ (defconstant SDL_DEFAULT_REPEAT_DELAY 500) (defconstant SDL_DEFAULT_REPEAT_INTERVAL 30) +;;; The two types of endianness +(defconstant SDL_LIL_ENDIAN 1234) +(defconstant SDL_BIG_ENDIAN 4321) + ;;; SDL Functions (defcfun "int gacela_SDL_Init (int flags)" 0 @@ -136,6 +139,12 @@ (defcfun "int gacela_SDL_EnableKeyRepeat (int delay, int interval)" 0 "return SDL_EnableKeyRepeat (delay, interval);") +(defcfun "int gacela_zoomSurface (int src, float zoomx, float zoomy, int smooth)" 0 + "return zoomSurface (src, zoomx, zoomy, smooth);") + +(defcfun "int gacela_SDL_ByteOrder (void)" 0 + "return SDL_BYTEORDER;") + (defentry SDL_Init (int) (int "gacela_SDL_Init")) (defentry SDL_Quit () (void "gacela_SDL_Quit")) (defentry SDL_SetVideoMode (int int int int) (int "gacela_SDL_SetVideoMode")) @@ -172,11 +181,11 @@ ;(defentry Mix_FreeMusic (int) (void "gacela_Mix_FreeMusic")) ;(defentry Mix_FreeChunk (int) (void "gacela_Mix_FreeChunk")) ;(defentry Mix_CloseAudio () (void "gacela_Mix_CloseAudio")) -;(defentry sge_FilledCircle (int int int int int int int) (void "gacela_sge_FilledCircle")) -;(defentry sge_FilledRect (int int int int int int int int) (void "gacela_sge_FilledRect")) ;(defentry free (int) (void "gacela_free")) (defentry SDL_GL_SwapBuffers () (void "gacela_SDL_GL_SwapBuffers")) (defentry SDL_EnableKeyRepeat (int int) (int "gacela_SDL_EnableKeyRepeat")) +(defentry zoomSurface (int float float int) (int "gacela_zoomSurface")) +(defentry SDL_ByteOrder () (int "gacela_SDL_ByteOrder")) ;;; C-Gacela Functions (defcfun "int gacela_surface_format (int surface)" 0 @@ -195,6 +204,10 @@ "const SDL_Surface *s = surface;" "return s->pixels;") +(defcfun "int gacela_surface_format_BytesPerPixel (int surface)" 0 + "const SDL_Surface *s = surface;" + "return s->format->BytesPerPixel;") + ;(defentry apply-surface2 (int int int int int int int int int) (void "apply_surface")) ;(defentry render-text2 (int string int int int) (int "render_text")) ;(defentry fill-surface (int int int int) (void "fill_surface")) @@ -205,3 +218,4 @@ (defentry surface-w (int) (int "gacela_surface_w")) (defentry surface-h (int) (int "gacela_surface_h")) (defentry surface-pixels (int) (int "gacela_surface_pixels")) +(defentry surface-format-BytesPerPixel (int) (int "gacela_surface_format_BytesPerPixel"))