Merge branch 'master' of git://repo.or.cz/factor/jcg

db4
Doug Coleman 2008-09-02 16:19:22 -05:00
commit 8c55f4a851
16 changed files with 31 additions and 14 deletions

View File

@ -5,9 +5,9 @@ continuations math.parser math arrays sets math.order ;
IN: opengl.capabilities IN: opengl.capabilities
: (require-gl) ( thing require-quot make-error-quot -- ) : (require-gl) ( thing require-quot make-error-quot -- )
>r dupd call -rot dupd call
[ r> 2drop ] [ 2drop ]
[ r> " " make throw ] [ swap " " make throw ]
if ; inline if ; inline
: gl-extensions ( -- seq ) : gl-extensions ( -- seq )

View File

@ -139,11 +139,7 @@ TUPLE: bunny-outlined
: <bunny-outlined> ( gadget -- draw ) : <bunny-outlined> ( gadget -- draw )
outlining-supported? [ outlining-supported? [
pass1-program pass2-program { pass1-program pass2-program f f f f f bunny-outlined boa
(>>gadget)
(>>pass1-program)
(>>pass2-program)
} bunny-outlined construct
] [ drop f ] if ; ] [ drop f ] if ;
: (framebuffer-texture) ( dim iformat xformat -- texture ) : (framebuffer-texture) ( dim iformat xformat -- texture )

View File

@ -2,12 +2,14 @@ USING: eval multiline system combinators ;
IN: game-input.backend IN: game-input.backend
STRING: set-backend-for-macosx STRING: set-backend-for-macosx
USING: namespaces game-input.backend.iokit game-input ; USING: namespaces parser game-input.backend.iokit ;
<< "game-input" (use+) >>
iokit-game-input-backend game-input-backend set-global iokit-game-input-backend game-input-backend set-global
; ;
STRING: set-backend-for-windows STRING: set-backend-for-windows
USING: namespaces game-input.backend.dinput game-input ; USING: namespaces parser game-input.backend.dinput ;
<< "game-input" (use+) >>
dinput-game-input-backend game-input-backend set-global dinput-game-input-backend game-input-backend set-global
; ;

View File

@ -1,10 +1,11 @@
USING: windows.dinput windows.dinput.constants game-input USING: windows.dinput windows.dinput.constants parser
symbols alien.c-types windows.ole32 namespaces assocs kernel symbols alien.c-types windows.ole32 namespaces assocs kernel
arrays vectors windows.kernel32 windows.com windows.dinput arrays vectors windows.kernel32 windows.com windows.dinput
shuffle windows.user32 windows.messages sequences combinators shuffle windows.user32 windows.messages sequences combinators
math.geometry.rect ui.windows accessors math windows alien math.geometry.rect ui.windows accessors math windows alien
alien.strings io.encodings.utf16 continuations byte-arrays alien.strings io.encodings.utf16 continuations byte-arrays
locals game-input.backend.dinput.keys-array ; locals game-input.backend.dinput.keys-array ;
<< "game-input" (use+) >>
IN: game-input.backend.dinput IN: game-input.backend.dinput
SINGLETON: dinput-game-input-backend SINGLETON: dinput-game-input-backend

View File

@ -1,9 +1,10 @@
USING: cocoa cocoa.plists core-foundation iokit iokit.hid USING: cocoa cocoa.plists core-foundation iokit iokit.hid
kernel cocoa.enumeration destructors math.parser cocoa.application kernel cocoa.enumeration destructors math.parser cocoa.application
sequences locals combinators.short-circuit game-input threads sequences locals combinators.short-circuit threads
symbols namespaces assocs vectors arrays combinators symbols namespaces assocs vectors arrays combinators
core-foundation.run-loop accessors sequences.private core-foundation.run-loop accessors sequences.private
alien.c-types math ; alien.c-types math parser ;
<< "game-input" (use+) >>
IN: game-input.backend.iokit IN: game-input.backend.iokit
SINGLETON: iokit-game-input-backend SINGLETON: iokit-game-input-backend

View File

@ -28,7 +28,6 @@ M: f (reset-game-input) ;
PRIVATE> PRIVATE>
: open-game-input ( -- ) : open-game-input ( -- )
load-game-input-backend
game-input-opened? [ game-input-opened? [
(open-game-input) (open-game-input)
game-input-opened on game-input-opened on
@ -76,3 +75,6 @@ M: keyboard-state clone
call-next-method dup keys>> clone >>keys ; call-next-method dup keys>> clone >>keys ;
HOOK: read-keyboard game-input-backend ( -- keyboard-state ) HOOK: read-keyboard game-input-backend ( -- keyboard-state )
load-game-input-backend

View File

@ -0,0 +1,15 @@
USING: tools.deploy.config ;
H{
{ deploy-name "joystick-demo" }
{ deploy-io 2 }
{ deploy-word-defs? f }
{ deploy-c-types? t }
{ deploy-random? t }
{ deploy-word-props? f }
{ deploy-reflection 1 }
{ deploy-threads? t }
{ deploy-math? t }
{ "stop-after-last-window?" t }
{ deploy-ui? t }
{ deploy-compiler? t }
}