home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / aga_software / animdemo / stick.h < prev    next >
C/C++ Source or Header  |  1993-01-22  |  1KB  |  62 lines

  1. /*******************************************************************************
  2.  *
  3.  * (c) Copyright 1993 Commodore-Amiga, Inc.  All rights reserved.
  4.  *
  5.  * This software is provided as-is and is subject to change; no warranties
  6.  * are made.  All use is at your own risk.  No liability or responsibility
  7.  * is assumed.
  8.  *
  9.  * stick.h - header for the joystick, and defines a structure to pass around
  10.  *           the input-handling functions.
  11.  *
  12.  ******************************************************************************/
  13.  
  14. #include <exec/types.h>
  15.  
  16. struct JoyStick
  17. {
  18.     BYTE joy_Up;
  19.     BYTE joy_Down;
  20.     BYTE joy_Left;
  21.     BYTE joy_Right;
  22.     BYTE joy_Fire;
  23.     BYTE joy_Click;
  24.     BYTE joy_OldClick;
  25.     BYTE joy_Exit;
  26. };
  27.  
  28. #define LEFT 1
  29. #define RIGHT 2
  30. #define UP 4
  31. #define DOWN 8
  32. #define FIRE 16
  33. #define CLICK 32
  34. #define EXIT 64
  35.  
  36. struct InputAudio
  37. {
  38.     struct RawAudio *RawAudio;
  39.     struct IOAudio *AudioIO;
  40.     struct MsgPort *AudioMP;
  41.     UBYTE *AudioBuffer;
  42.     BOOL Playing;
  43.     ULONG Unit;
  44.     UWORD Period;
  45.     WORD AllocKey;
  46. };
  47.  
  48. /* Pass this structure to the input handler */
  49. struct Input
  50. {
  51.     struct JoyStick *Stick;
  52.     struct IEPointerPixel *NewPixel;
  53.     struct IOStdReq *InputIO;
  54.     struct InputEvent *FakeEvent;
  55.     struct Screen *Screen;
  56.     struct VistaScript *Vista;
  57.     struct Missile *Missiles;
  58.     struct ExtSprites *Sprites;
  59.     ULONG *BugOut;
  60.     struct InputAudio FireAudio;
  61. };
  62.