Merge branch 'master' of git://repo.or.cz/factor/jcg
commit
8c55f4a851
|
@ -5,9 +5,9 @@ continuations math.parser math arrays sets math.order ;
|
|||
IN: opengl.capabilities
|
||||
|
||||
: (require-gl) ( thing require-quot make-error-quot -- )
|
||||
>r dupd call
|
||||
[ r> 2drop ]
|
||||
[ r> " " make throw ]
|
||||
-rot dupd call
|
||||
[ 2drop ]
|
||||
[ swap " " make throw ]
|
||||
if ; inline
|
||||
|
||||
: gl-extensions ( -- seq )
|
||||
|
|
|
@ -139,11 +139,7 @@ TUPLE: bunny-outlined
|
|||
|
||||
: <bunny-outlined> ( gadget -- draw )
|
||||
outlining-supported? [
|
||||
pass1-program pass2-program {
|
||||
(>>gadget)
|
||||
(>>pass1-program)
|
||||
(>>pass2-program)
|
||||
} bunny-outlined construct
|
||||
pass1-program pass2-program f f f f f bunny-outlined boa
|
||||
] [ drop f ] if ;
|
||||
|
||||
: (framebuffer-texture) ( dim iformat xformat -- texture )
|
|
@ -2,12 +2,14 @@ USING: eval multiline system combinators ;
|
|||
IN: game-input.backend
|
||||
|
||||
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
|
||||
;
|
||||
|
||||
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
|
||||
;
|
||||
|
||||
|
|
|
@ -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
|
||||
arrays vectors windows.kernel32 windows.com windows.dinput
|
||||
shuffle windows.user32 windows.messages sequences combinators
|
||||
math.geometry.rect ui.windows accessors math windows alien
|
||||
alien.strings io.encodings.utf16 continuations byte-arrays
|
||||
locals game-input.backend.dinput.keys-array ;
|
||||
<< "game-input" (use+) >>
|
||||
IN: game-input.backend.dinput
|
||||
|
||||
SINGLETON: dinput-game-input-backend
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
USING: cocoa cocoa.plists core-foundation iokit iokit.hid
|
||||
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
|
||||
core-foundation.run-loop accessors sequences.private
|
||||
alien.c-types math ;
|
||||
alien.c-types math parser ;
|
||||
<< "game-input" (use+) >>
|
||||
IN: game-input.backend.iokit
|
||||
|
||||
SINGLETON: iokit-game-input-backend
|
||||
|
|
|
@ -28,7 +28,6 @@ M: f (reset-game-input) ;
|
|||
PRIVATE>
|
||||
|
||||
: open-game-input ( -- )
|
||||
load-game-input-backend
|
||||
game-input-opened? [
|
||||
(open-game-input)
|
||||
game-input-opened on
|
||||
|
@ -76,3 +75,6 @@ M: keyboard-state clone
|
|||
call-next-method dup keys>> clone >>keys ;
|
||||
|
||||
HOOK: read-keyboard game-input-backend ( -- keyboard-state )
|
||||
|
||||
load-game-input-backend
|
||||
|
||||
|
|
|
@ -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 }
|
||||
}
|
Loading…
Reference in New Issue