]> icculus.org git repositories - btb/d2x.git/blob - unused/win95/tactile.h
fixed location of fps meter in multi
[btb/d2x.git] / unused / win95 / tactile.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14
15
16 #ifndef _TACTILE_H
17 #define _TACTILE_H
18
19
20 #include "vecmat.h"
21
22 //#define TACTILE
23
24 #ifndef _BOOL_
25 typedef enum { False = 0, True = 1 } Bool;
26 #define _BOOL_
27 #endif
28
29
30 extern int TactileStick;
31 extern int Tactile_open(int);
32 extern void Tactile_apply_force (vms_vector *,vms_matrix *);
33 extern void Tactile_jolt (int,int,int);
34 extern void Tactile_Xvibrate (int,int);
35 extern void Tactile_Xvibrate_clear ();
36
37 /* DLL functions -moved from i-force.h */
38
39 #define         MAX_POSITION_CHANNELS   4       /* Max num pos feedback chans */
40
41 typedef struct
42 {
43         int     major;          /* major release number */
44         int     minor;          /* minor release number */
45         int     subminor;       /* subminor release number */
46 } FFversion;                    /* firmware release version */
47
48 typedef struct
49 {
50         int     month;  /* month of release */
51         int     day;            /* day of release */
52         int     year;           /* year of release */
53 } FFdate;
54
55 /*      Record containing all Joystick data
56  *              Declare one of these structs in your app if you want
57  *              Joystick data like serial number, model number, firmware
58  *              version, etc reported back by the InitStick() command.
59  *   Examples: (assuming 'StickRec' is declared as a Joystick Record)
60  *      StickRec.SerialNumber - serial number
61  *      StickRec.ForceAxes - number of force feedback axes
62  */
63 typedef struct JoystickRecord
64 {
65         int     ForceAxes;                      /* number of force feedback axes */
66         int     CommandAvailable;       /* command available */
67         int     PositionAxes;           /* number of position feedback axes */
68         int     Position[MAX_POSITION_CHANNELS];                /* 16-bit positions */
69
70         FFversion       Version;                        /* firmware release version */
71         FFdate  Date;                                   /* firmware release date */
72         unsigned long int SerialNumber;
73         unsigned int    ModelNumber;
74
75 } JoystickRecord;
76
77 extern Bool     _cdecl InitStick(JoystickRecord *StickRec);
78 extern Bool     _cdecl GetStickStatus(char *StickStatus);
79 extern Bool     _cdecl Echo(void);
80 extern Bool _cdecl      IForceAuthenticate(void);
81 extern int  _cdecl  GetStickError(void);
82 extern Bool _cdecl      EnableForces(void);
83 extern Bool _cdecl      DisableForces(void);
84 extern Bool _cdecl      ClearForces(void);
85 extern Bool _cdecl      CloseStick(void);
86 extern void     _cdecl SetJoystickPort(int Port);
87 extern void _cdecl      SetJoystickAddressIRQ(unsigned int addr, int irq);
88
89 /* Force Effect Functions */
90 extern Bool _cdecl      Jolt(unsigned int Magnitude,int Direction,unsigned int Duration);
91 extern Bool _cdecl      ButtonReflexJolt(unsigned int ButtonAssign, unsigned int Magnitude,
92                 int direction, unsigned int Duration, unsigned int RepeatRate);
93 extern Bool _cdecl      ButtonReflexClear(unsigned int ButtonAssign);
94 extern Bool _cdecl      XVibration(unsigned int Lmagnitude, unsigned int Rmagnitude,
95                 unsigned int Frequency);
96 extern Bool _cdecl      XVibrationClear(void);
97 extern Bool _cdecl      YVibration(unsigned int Umagnitude, unsigned int Dmagnitude,
98                 unsigned int Frequency);
99 extern Bool _cdecl      YVibrationClear(void);
100 extern Bool _cdecl      Buffeting(unsigned int Magnitude);
101 extern Bool _cdecl      BuffetingClear(void);
102 extern Bool _cdecl      VectorForce(unsigned int Magnitude, int Direction);
103 extern Bool _cdecl      VectorForceClear(void);
104 extern Bool _cdecl      XYVectorForce(int XMagnitude,int YMagnitude);
105
106
107 #define TACTILE_IMMERSION 1
108 #define TACTILE_CYBERNET  2
109
110
111 #endif