home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / g / gametp20.zip / JOYSTICK.INT < prev    next >
Text File  |  1992-11-06  |  2KB  |  46 lines

  1. unit joystick;
  2.  
  3. { JoyStick version 1.0 Copyright (C) 1992 Scott D. Ramsay   }
  4. {                                  ramsays@access.digex.com }
  5.  
  6. {   This unit is specifically for Mode 13h (320x200x256).  It is a    }
  7. { lot faster than using the BGI drivers (VGA256.BGI).  Majority of    }
  8. { the code is written using BASM.  This will work on 286 machines or  }
  9. { higher. "I don't know about the P5 chip though." ;)                 }
  10. {   JOYSTICK.TPU can be used freely in commerical and non-commerical  }
  11. { programs.  As long as you don't give yourself credit for writing    }
  12. { this portion of the code.  When distributing it (free only), please }
  13. { include all files and samples so others may enjoy using the code.   }
  14. { Enjoy.                                                              }
  15.  
  16. { Please bear with my comments.  I'm not a tech-writer.  You're more }
  17. { than welcome to modify the comments in this file for people to     }
  18. { understand. "Except for my name."  :)                              }
  19.  
  20. Interface
  21.  
  22. var
  23.    stickx,                              { X values of joysticks 1,2 }
  24.    sticky   : array[1..2] of integer;   { Y values of joysticks 1,2 }
  25.    button1,                             { button 1 of joysticks 1,2 }
  26.    button2  : array[1..2] of boolean;   { button 2 of joysticks 1,2 }
  27.  
  28. function joythere : boolean;            { True if A joystick is present    }
  29. function joy1there : boolean;           { True if joystick 1 is present    }
  30. function joy2there : boolean;           { True if joystick 2 is present    }
  31. procedure setstick(h:integer);          { Updates the above stickx,sticky, }
  32.                                         { button1, button2, h=joystick num }
  33.  
  34. (***********************************************************************)
  35.  
  36. If you have any problems, e-mail at:
  37.  
  38.     ramsays@access.digex.com
  39.  
  40.   The TPU units can be used with in your programs.
  41.    If you want the source code, more samples or swap-talk,
  42.    just e-mail me.  I'll give sample use-code for free.  Actual TPU-source
  43.    code prices can be discussed.
  44.  
  45.  
  46.    Scott D. Ramsay