]> gitweb.factorcode.org Git - factor.git/commitdiff
foo
authorSlava Pestov <slava@factorcode.org>
Wed, 24 Aug 2005 05:09:36 +0000 (05:09 +0000)
committerSlava Pestov <slava@factorcode.org>
Wed, 24 Aug 2005 05:09:36 +0000 (05:09 +0000)
library/sdl/load.factor [new file with mode: 0644]
library/sdl/sdl-utils.factor
library/sdl/sdl-video.factor

diff --git a/library/sdl/load.factor b/library/sdl/load.factor
new file mode 100644 (file)
index 0000000..5454f72
--- /dev/null
@@ -0,0 +1,13 @@
+USING: kernel parser sequences io ;
+[
+    "/library/sdl/sdl.factor"
+    "/library/sdl/sdl-video.factor"
+    "/library/sdl/sdl-event.factor"
+    "/library/sdl/sdl-gfx.factor"
+    "/library/sdl/sdl-keysym.factor"
+    "/library/sdl/sdl-keyboard.factor"
+    "/library/sdl/sdl-ttf.factor"
+    "/library/sdl/sdl-utils.factor"
+] [
+    dup print run-resource
+] each
index a7fdbb22e0af8f2d0de18d8766186db3ea1d6159..78b66a63208cf28090da5286fb90b7858f1eecb9 100644 (file)
@@ -50,6 +50,16 @@ SYMBOL: bpp
         ] repeat
     ] repeat drop ; inline
 
+: must-lock-surface? ( surface -- ? )
+    #! This is a macro in SDL_video.h.
+    dup sdl-surface-offset 0 = [
+        sdl-surface-flags
+        SDL_HWSURFACE SDL_ASYNCBLIT bitor SDL_RLEACCEL bitor
+        bitand 0 = not
+    ] [
+        drop t
+    ] ifte ;
+
 : with-surface ( quot -- )
     #! Execute a quotation, locking the current surface if it
     #! is required (eg, hardware surface).
@@ -61,15 +71,5 @@ SYMBOL: bpp
         ] ifte SDL_Flip drop
     ] with-scope ; inline
 
-: must-lock-surface? ( surface -- ? )
-    #! This is a macro in SDL_video.h.
-    dup sdl-surface-offset 0 = [
-        sdl-surface-flags
-        SDL_HWSURFACE SDL_ASYNCBLIT bitor SDL_RLEACCEL bitor
-        bitand 0 = not
-    ] [
-        drop t
-    ] ifte ;
-
 : sdl-surface-rect ( x y surface -- rect )
     dup sdl-surface-w swap sdl-surface-h make-rect ;
index b7259ab0cac2a47e81aca4139c7650415f984c13..e87654a5afa34c3b678cfac377bba510b3e728ef 100644 (file)
@@ -59,23 +59,23 @@ BEGIN-STRUCT: sdl-format
 END-STRUCT
 
 BEGIN-STRUCT: sdl-surface
-    FIELD: uint    flags
-    FIELD: format* format
-    FIELD: int     w
-    FIELD: int     h
-    FIELD: ushort  pitch
-    FIELD: void*   pixels
-    FIELD: int     offset
-    FIELD: void*   hwdata
-    FIELD: short   clip-x
-    FIELD: short   clip-y
-    FIELD: ushort   clip-w
-    FIELD: ushort   clip-h
-    FIELD: uint    unused1
-    FIELD: uint    locked
-    FIELD: int     map
-    FIELD: uint    format_version
-    FIELD: int     refcount
+    FIELD: uint        flags
+    FIELD: sdl-format* format
+    FIELD: int         w
+    FIELD: int         h
+    FIELD: ushort      pitch
+    FIELD: void*       pixels
+    FIELD: int         offset
+    FIELD: void*       hwdata
+    FIELD: short       clip-x
+    FIELD: short       clip-y
+    FIELD: ushort       clip-w
+    FIELD: ushort       clip-h
+    FIELD: uint        unused1
+    FIELD: uint        locked
+    FIELD: int         map
+    FIELD: uint        format_version
+    FIELD: int         refcount
 END-STRUCT
 
 : SDL_VideoInit ( driver-name flags -- )