Update windows.dinput for specialized-arrays
parent
35df2fd480
commit
852e00c57a
|
@ -1,7 +1,8 @@
|
||||||
USING: windows.dinput windows.kernel32 windows.ole32 windows.com
|
USING: windows.dinput windows.kernel32 windows.ole32 windows.com
|
||||||
windows.com.syntax alien alien.c-types alien.syntax kernel system namespaces
|
windows.com.syntax alien alien.c-types alien.syntax kernel system namespaces
|
||||||
combinators sequences symbols fry math accessors macros words quotations
|
combinators sequences symbols fry math accessors macros words quotations
|
||||||
libc continuations generalizations splitting locals assocs init ;
|
libc continuations generalizations splitting locals assocs init
|
||||||
|
struct-arrays ;
|
||||||
IN: windows.dinput.constants
|
IN: windows.dinput.constants
|
||||||
|
|
||||||
! Some global variables aren't provided by the DirectInput DLL (they're in the
|
! Some global variables aren't provided by the DirectInput DLL (they're in the
|
||||||
|
@ -52,14 +53,14 @@ SYMBOLS:
|
||||||
} cleave
|
} cleave
|
||||||
"DIOBJECTDATAFORMAT" <c-object> (DIOBJECTDATAFORMAT) ;
|
"DIOBJECTDATAFORMAT" <c-object> (DIOBJECTDATAFORMAT) ;
|
||||||
|
|
||||||
: malloc-DIOBJECTDATAFORMAT-array ( struct array -- alien )
|
:: malloc-DIOBJECTDATAFORMAT-array ( struct array -- alien )
|
||||||
[ nip length "DIOBJECTDATAFORMAT" malloc-array dup ]
|
[let | alien [ array length "DIOBJECTDATAFORMAT" malloc-struct-array ] |
|
||||||
[
|
array [| args i |
|
||||||
-rot [| args i alien struct |
|
|
||||||
struct args <DIOBJECTDATAFORMAT>
|
struct args <DIOBJECTDATAFORMAT>
|
||||||
i alien set-DIOBJECTDATAFORMAT-nth
|
i alien set-nth
|
||||||
] 2curry each-index
|
] each-index
|
||||||
] 2bi ;
|
alien underlying>>
|
||||||
|
] ;
|
||||||
|
|
||||||
: (DIDATAFORMAT) ( dwSize dwObjSize dwFlags dwDataSize dwNumObjs rgodf alien -- alien )
|
: (DIDATAFORMAT) ( dwSize dwObjSize dwFlags dwDataSize dwNumObjs rgodf alien -- alien )
|
||||||
[ {
|
[ {
|
||||||
|
|
Loading…
Reference in New Issue