home *** CD-ROM | disk | FTP | other *** search
- unit joystick;
-
- { JoyStick version 1.0 Copyright (C) 1992 Scott D. Ramsay }
- { ramsays@access.digex.com }
-
- { This unit is specifically for Mode 13h (320x200x256). It is a }
- { lot faster than using the BGI drivers (VGA256.BGI). Majority of }
- { the code is written using BASM. This will work on 286 machines or }
- { higher. "I don't know about the P5 chip though." ;) }
- { JOYSTICK.TPU can be used freely in commerical and non-commerical }
- { programs. As long as you don't give yourself credit for writing }
- { this portion of the code. When distributing it (free only), please }
- { include all files and samples so others may enjoy using the code. }
- { Enjoy. }
-
- { Please bear with my comments. I'm not a tech-writer. You're more }
- { than welcome to modify the comments in this file for people to }
- { understand. "Except for my name." :) }
-
- Interface
-
- var
- stickx, { X values of joysticks 1,2 }
- sticky : array[1..2] of integer; { Y values of joysticks 1,2 }
- button1, { button 1 of joysticks 1,2 }
- button2 : array[1..2] of boolean; { button 2 of joysticks 1,2 }
-
- function joythere : boolean; { True if A joystick is present }
- function joy1there : boolean; { True if joystick 1 is present }
- function joy2there : boolean; { True if joystick 2 is present }
- procedure setstick(h:integer); { Updates the above stickx,sticky, }
- { button1, button2, h=joystick num }
-
- (***********************************************************************)
-
- If you have any problems, e-mail at:
-
- ramsays@access.digex.com
-
- The TPU units can be used with in your programs.
- If you want the source code, more samples or swap-talk,
- just e-mail me. I'll give sample use-code for free. Actual TPU-source
- code prices can be discussed.
-
-
- Scott D. Ramsay