home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / GAMETP.ZIP / JOYSTICK.INT < prev    next >
Encoding:
Text File  |  1992-10-29  |  3.2 KB  |  72 lines

  1. unit joystick;
  2.  
  3. { JoyStick version 1.0 Copyright (C) 1992 Scott D. Ramsay }
  4.  
  5. {   This unit is specifically for Mode 13h (320x200x256).  It is a    }
  6. { lot faster than using the BGI drivers (VGA256.BGI).  Majority of    }
  7. { the code is written using BASM.  This will work on 286 machines or  }
  8. { higher. "I don't know about the P5 chip though." ;)                 }
  9. {   JOYSTICK.TPU can be used freely in commerical and non-commerical  }
  10. { programs.  As long as you don't give yourself credit for writing    }
  11. { this portion of the code.  When distributing it (free only), please }
  12. { include all files and samples so others may enjoy using the code.   }
  13. { Enjoy.                                                              }
  14.  
  15. { Please bear with my comments.  I'm not a tech-writer.  You're more }
  16. { than welcome to modify the comments in this file for people to     }
  17. { understand.                                                        }
  18.  
  19. Interface
  20.  
  21. var
  22.    stickx,                              { X values of joysticks 1,2 }
  23.    sticky   : array[1..2] of integer;   { Y values of joysticks 1,2 }
  24.    button1,                             { button 1 of joysticks 1,2 }
  25.    button2  : array[1..2] of boolean;   { button 2 of joysticks 1,2 }
  26.  
  27. function joythere : boolean;            { True if A joystick is present    }
  28. function joy1there : boolean;           { True if joystick 1 is present    }
  29. function joy2there : boolean;           { True if joystick 2 is present    }
  30. procedure setstick(h:integer);          { Updates the above stickx,sticky, }
  31.                                         { button1, button2, h=joystick num }
  32.  
  33. (***********************************************************************)
  34.  
  35. If you have any problems, e-mail at:
  36.  
  37.     ramsays@express.digex.com
  38.  
  39.   Sorry, I don't have permanent snail-mail address yet.  I just moved
  40.    to the Washington DC area.
  41.  
  42.   The TPU units can be used with in your programs.  With out giving
  43.    me credit.  If you want the source code, more samples or swap-talk,
  44.    just e-mail me.  I'll give sample use-code for free.  Actual TPU-source
  45.    code prices can be discussed.
  46.  
  47.   Also,  I have completed the following programs.
  48.  
  49.      GEOMAKER        Makes tile-maps quickly.
  50.      VSPMAKER        Makes the VSP files.
  51.      BKMAKER         A drawing program that can read
  52.                       VEW files (my own raw format)
  53.                       PTR files (my own compressed format)
  54.                       GIF files
  55.                       PCX files
  56.  
  57.   The three above programs are specifically designed for the 320x200x256
  58.   (game development).  I'll upload them when I think they are ready
  59.   to go. (Bout a week)
  60.  
  61.   (Artwork samples done by me.  Freeware.  Knock your-self out.
  62.    Plug.  Highly recommended.  For game programmers, try to get
  63.    Animator Pro by Autodesk.  This is an excellent program for
  64.    imaging, sprites and so forth. Very similar to the Animator,
  65.    but has better graphic features.  The 3D models are created
  66.    with 3D studio by Autodesk then ported to Animator Pro, then
  67.    scaled down/converted to my VSP files.  If you can blow a
  68.    few thousand bucks, buy the 3D studio.  You can do some amazing
  69.    3D animations. I can't afford it, I use it at work.)
  70.  
  71.  
  72.    Scott D. Ramsay