home *** CD-ROM | disk | FTP | other *** search
- #ifndef joystick_H
- #define joystick_H
-
- /* C header file for Joystick
- * written by DefMod (Sep 7 1994) on Wed Sep 7 21:23:25 1994
- * Copyright © Acorn Computers Ltd, 1994
- */
-
- /*************************************************************************
- * This source file was written by Acorn Computers Limited. It is part *
- * of the OSLib library for writing applications for RISC OS. It may be *
- * used freely in the creation of programs for RISC OS. *
- *************************************************************************/
-
- #ifndef types_H
- #include "types.h"
- #endif
-
- #ifndef os_H
- #include "os.h"
- #endif
-
- /**********************************
- * SWI names and SWI reason codes *
- **********************************/
- #undef Joystick_Read
- #define Joystick_Read 0x43F40
- #undef XJoystick_Read
- #define XJoystick_Read 0x63F40
-
- /*************************
- * Function declarations *
- *************************/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*************************************************************
- * NOTE: The following functions provide direct access to *
- * the SWI's noted in the function description. *
- * Please read the relevant PRM section for more *
- * information on their input/output parameters. *
- *************************************************************/
-
- /* ------------------------------------------------------------------------
- * Function: joystick_read()
- *
- * Description: Returns the state of a joystick
- *
- * Input: joystick_no - value of R0 on entry
- *
- * Output: state - value of R0 on exit (X version only)
- *
- * Returns: R0 (non-X version only)
- *
- * Other notes: Calls SWI 0x43F40.
- */
-
- extern os_error *xjoystick_read (int joystick_no,
- bits *state);
- extern bits joystick_read (int joystick_no);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-