Update of /cvsroot/win32forth/win32forth/apps/Player4
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7788/apps/Player4
Modified Files:
PLAYER4.F
Log Message:
Jos: The button NEXT can now be activated by the fire button. Quite fun when you have a cordless joystick. Then you have a kind of remote control.
Index: PLAYER4.F
===================================================================
RCS file: /cvsroot/win32forth/win32forth/apps/Player4/PLAYER4.F,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** PLAYER4.F 25 May 2006 15:36:50 -0000 1.56
--- PLAYER4.F 27 May 2006 19:13:33 -0000 1.57
***************
*** 32,36 ****
--- 32,38 ----
needs multiopen.f
needs AcceleratorTables.f
+ needs Joystick.f
+ 200 value IDJoystick
defer PLAYER ' noop is PLAYER
defer RefreshCatalog ' noop is RefreshCatalog
***************
*** 239,245 ****
--- 241,264 ----
addr: self to player-base
RefreshCatalog
+ FindFirstJoyStick dup to IDJoystick
+ MaxJoysticks <
+ if 0 250 1 hWnd Call SetTimer drop
+ then
;M
+ :M WM_TIMER ( hm wl -- res >>> ) \ handle the WM_TIMER events
+ 2drop IDJoystick GetJoystickInfo 1 =
+ if IDM_NEXT DoCommand
+ begin IDJoystick GetJoystickInfo 2nip nip 0=
+ until
+ 3drop
+ then
+ 0
+ ;M
+
:M On_Done: ( h m w l -- res )
+ MaxJoysticks <
+ if 1 hWnd Call KillTimer
+ then
Close: self
0 call PostQuitMessage drop
***************
*** 498,502 ****
: Player-Loop ( -- )
! turnkey? if begin player again then ;
: PLAYER4 ( -- )
--- 517,521 ----
: Player-Loop ( -- )
! turnkey? if begin player again then ;
: PLAYER4 ( -- )
|