home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / 3DENGINE.ZIP / Eventmgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-07  |  1.2 KB  |  45 lines

  1. // EVENTMNGR.H
  2. // Written July 29,1993 by Christopher Lampton
  3. //  for GARDENS OF IMAGINATION (Waite Group Press)
  4.  
  5. // Definitions, data types and prototypes for
  6. // the event management function in module
  7. // EVNTMNGR.CPP
  8.  
  9. // Key definitions by scan code:
  10.  
  11. #define   FORWARDKEY 72
  12. #define   BACKKEY    80
  13. #define   LEFTKEY    75
  14. #define   RIGHTKEY   77
  15. #define   QUITKEY     1
  16. #define   P          25
  17. #define   F3         61
  18. #define   SPACE      57
  19. // Definitions for requesting events:
  20.  
  21. const    MOUSE_EVENTS=1,JOYSTICK_EVENTS=2,KEYBOARD_EVENTS=4;
  22.  
  23. // Structure for passing events to calling program:
  24.  
  25. struct event_struct {
  26.   int go_forward,
  27.         go_back,
  28.         go_left,
  29.         go_right,
  30.         fire,
  31.         abort,
  32.         pause,
  33.         resize,
  34.         open_door;
  35. };
  36.  
  37. void init_events();    // Initialize event manager
  38. void end_events();  // Terminate event manager
  39. void setmin();            // Set minimum joystick callibrations
  40. void setmax();            // Set maximum joystick callibrations
  41. void setcenter();        // Set center joystick callibrations
  42. void calibrate_stick(void); // Kalibrera joysticken
  43. int joystick_present(); // Detect presence of joystick
  44. void getevent(int,event_struct *);    // Get events from selected devices
  45.