home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / joystick < prev    next >
Encoding:
Text File  |  1994-09-07  |  1.9 KB  |  69 lines

  1. #ifndef joystick_H
  2. #define joystick_H
  3.  
  4. /* C header file for Joystick
  5.  * written by DefMod (Sep  7 1994) on Wed Sep  7 21:23:25 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. /**********************************
  24.  * SWI names and SWI reason codes *
  25.  **********************************/
  26. #undef  Joystick_Read
  27. #define Joystick_Read                           0x43F40
  28. #undef  XJoystick_Read
  29. #define XJoystick_Read                          0x63F40
  30.  
  31. /*************************
  32.  * Function declarations *
  33.  *************************/
  34.  
  35. #ifdef __cplusplus
  36.    extern "C" {
  37. #endif
  38.  
  39. /*************************************************************
  40.  * NOTE: The following functions provide direct access to    *
  41.  *       the SWI's noted in the function description.        *
  42.  *       Please read the relevant PRM section for more       *
  43.  *       information on their input/output parameters.       *
  44.  *************************************************************/
  45.  
  46. /* ------------------------------------------------------------------------
  47.  * Function:      joystick_read()
  48.  *
  49.  * Description:   Returns the state of a joystick
  50.  *
  51.  * Input:         joystick_no - value of R0 on entry
  52.  *
  53.  * Output:        state - value of R0 on exit (X version only)
  54.  *
  55.  * Returns:       R0 (non-X version only)
  56.  *
  57.  * Other notes:   Calls SWI 0x43F40.
  58.  */
  59.  
  60. extern os_error *xjoystick_read (int joystick_no,
  61.       bits *state);
  62. extern bits joystick_read (int joystick_no);
  63.  
  64. #ifdef __cplusplus
  65.    }
  66. #endif
  67.  
  68. #endif
  69.