Debian Codegraph @

Descent3/D3ForceFeedback.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/D3ForceFeedback.h $
21 * $Revision: 9 $
22 * $Date: 1/28/99 12:09p $
23 * $Author: Jeff $
24 *
25 * High Level Force Feedback implementation
26 *
27 * $Log: /DescentIII/main/D3ForceFeedback.h $
28 *
29 * 9 1/28/99 12:09p Jeff
30 * added force feedback to player shake...fixed spelling error in define
31 * for forcefeedback
32 *
33 * 8 11/18/98 5:50p Jeff
34 * added some cheap recoil effects for ForceFeedback...not fully
35 * implemented
36 *
37 * 7 11/10/98 5:16p Jeff
38 * updated forcefeedback system...pretty complete now
39 *
40 * 6 11/06/98 7:00p Jeff
41 * first round of new force feedback installed
42 *
43 * 5 11/03/98 6:43p Jeff
44 * new low-level & high level Force Feedback system implemented, handles
45 * window losing focus, etc.
46 *
47 * 4 10/12/98 3:49p Jeff
48 * struct changes
49 *
50 * 3 9/21/98 11:10a Jeff
51 * general update, new low level, small high level implementation
52 *
53 * 2 9/18/98 7:38p Jeff
54 * creation of low-level forcefeedback and beginning of high-level
55 * forcefeedback
56 *
57 * $NoKeywords: $
58 */
59
60 #ifndef __D3FORCEFEEDBACK_H_
61 #define __D3FORCEFEEDBACK_H_cxx . . $ `Descent3/D3ForceFeedback.h:61:9`!
62
63 #include "forcefeedback.h"cxx . . $ `<file>/lib/forcefeedback.h`/
64 #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/
65 #include "object.h"cxx . . $ `<file>/Descent3/object.h`/
66
67 // D3Use_force_feedback
68 // true if the user wants force feedback during play (if available)
69 extern bool D3Use_force_feedbackcxx . . $ D3Use_force_feedback.;
70 // D3Force_auto_center
71 // true if the user wants his joystick to be autocentered (if available)
72 extern bool D3Force_auto_centercxx . . $ D3Force_auto_center.;
73 // D3Force_gain
74 // the gain setting of the ForceFeedback system
75 extern float D3Force_gaincxx . . $ D3Force_gain.;
76
77 #define FORCE_TEST_FORCEcxx . . $ `Descent3/D3ForceFeedback.h:77:9`! 0
78 #define FORCE_MICROWAVEcxx . . $ `Descent3/D3ForceFeedback.h:78:9`! 1
79 #define FORCE_WALLHITcxx . . $ `Descent3/D3ForceFeedback.h:79:9`! 2
80 #define FORCE_WEAPON_RECOILcxx . . $ `Descent3/D3ForceFeedback.h:80:9`! 3
81 #define FORCE_VAUSS_RECOILcxx . . $ `Descent3/D3ForceFeedback.h:81:9`! 4
82 #define FORCE_AFTERBURNERcxx . . $ `Descent3/D3ForceFeedback.h:82:9`! 5
83 #define FORCE_SHIPSHAKEcxx . . $ `Descent3/D3ForceFeedback.h:83:9`! 6
84
85 // -----------------------------------------------------------------
86 // ForceInit
87 // Purpose:
88 // Initializes the Hi-Level Force Feedback system, creating all
89 // of the effects so they are ready to be used.
90 // -----------------------------------------------------------------
91 void ForceInitcxx . . $ ForceInit(49f6e7a06ebc5aa8).(void);
92
93 // -----------------------------------------------------------------
94 // ForceClose
95 // Purpose:
96 // Shutsdown the Hi-Level Force Feedback system
97 // -----------------------------------------------------------------
98 void ForceClosecxx . . $ ForceClose(49f6e7a06ebc5aa8).(void);
99
100 // -----------------------------------------------------------------
101 // ForceShutdown
102 // Purpose:
103 // Puts the Force Feedback system on pause while the application
104 // is doing other things (like it lost focus)
105 // -----------------------------------------------------------------
106 void ForceShutdowncxx . . $ ForceShutdown(49f6e7a06ebc5aa8).(void);
107
108 // ------------------------------------------------------------------
109 // ForceRestart
110 // Purpose:
111 // Restores the Force Feedback system that has been put on pause
112 // from ForceShutdown.
113 // ------------------------------------------------------------------
114 void ForceRestartcxx . . $ ForceRestart(49f6e7a06ebc5aa8).(void);
115
116 // ------------------------------------------------------------------
117 // ForceDisable
118 // Purpose:
119 // Disables Force Feedback on a Force Feedback system
120 // ------------------------------------------------------------------
121 void ForceDisablecxx . . $ ForceDisable(49f6e7a06ebc5aa8).(void);
122
123 // ------------------------------------------------------------------
124 // ForceEnable
125 // Purpose:
126 // Enables Force Feedback that has been previously disabled
127 // ------------------------------------------------------------------
128 void ForceEnablecxx . . $ ForceEnable(49f6e7a06ebc5aa8).(void);
129
130 // ------------------------------------------------------------------
131 // ForceIsEnabled
132 // Purpose:
133 // Returns true if Force Feedback is enabled on the system
134 // ------------------------------------------------------------------
135 bool ForceIsEnabledcxx . . $ ForceIsEnabled(c9857a73d68e59ba).(void);
136
137 // ------------------------------------------------------------------
138 // ForceEnableAutoCenter
139 // Purpose:
140 // Enables autocentering on the joystick
141 // ------------------------------------------------------------------
142 void ForceEnableAutoCentercxx . . $ ForceEnableAutoCenter(49f6e7a06ebc5aa8).(void);
143
144 // ------------------------------------------------------------------
145 // ForceDisableAutoCenter
146 // Purpose:
147 // Disables autocentering on the joystick
148 // ------------------------------------------------------------------
149 void ForceDisableAutoCentercxx . . $ ForceDisableAutoCenter(49f6e7a06ebc5aa8).(void);
150
151 // ------------------------------------------------------------------
152 // ForceIsAutoCenter
153 // Purpose:
154 // Returns true if Force Feedback joystick is autocentering
155 // ------------------------------------------------------------------
156 bool ForceIsAutoCentercxx . . $ ForceIsAutoCenter(c9857a73d68e59ba).(void);
157
158 // ------------------------------------------------------------------
159 // ForceSetGain
160 // Purpose:
161 // Sets the gain of the ForceFeedback system (0 -> 1)
162 // ------------------------------------------------------------------
163 void ForceSetGaincxx . . $ ForceSetGain(9364e6e7bff7660).(float val);
164
165 // ------------------------------------------------------------------
166 // ForceGetGain
167 // Purpose:
168 // Returns the current gain setting of the ForceFeedback system (0-1)
169 // ------------------------------------------------------------------
170 float ForceGetGaincxx . . $ ForceGetGain(9b8c9e39889c762c).(void);
171
172 // ------------------------------------------------------------------
173 // ForceEffectsInit
174 // Purpose:
175 // Initializes the force feedback effects for Descent 3
176 // ------------------------------------------------------------------
177 void ForceEffectsInitcxx . . $ ForceEffectsInit(49f6e7a06ebc5aa8).(void);
178
179 // -----------------------------------------------------------------
180 // ForceEffectsClose
181 // Purpose:
182 // Destroys all the effects created
183 // -----------------------------------------------------------------
184 void ForceEffectsClosecxx . . $ ForceEffectsClose(49f6e7a06ebc5aa8).(void);
185
186 // -----------------------------------------------------------------
187 // ForceEffectsPlay
188 // Purpose:
189 // Plays an effect
190 // -----------------------------------------------------------------
191 void ForceEffectsPlaycxx . . $ ForceEffectsPlay(7f0b50ce5e93e2bf).(int id, float *scale, int *direction);
192 void ForceEffectsPlaycxx . . $ ForceEffectsPlay(7a6f7eb6ea9dc250).(int id, float *scale, vectorcxx . . $ vector# *direction);
193
194 void DoForceForWeaponcxx . . $ DoForceForWeapon(a24d58fc7aeaec6).(objectcxx . . $ object# *me_obj, objectcxx . . $ object# *it_obj, vectorcxx . . $ vector# *force);
195 void DoForceForWallcxx . . $ DoForceForWall(13f0d3ae53d6a4f9).(objectcxx . . $ object# *playerobj, float hitspeed, int hitseg, int hitwall, vectorcxx . . $ vector# *wall_normal);
196 void DoForceForRecoilcxx . . $ DoForceForRecoil(6273fa812ac58a8).(objectcxx . . $ object# *playerobj, objectcxx . . $ object# *weap);
197 void DoForceForShakecxx . . $ DoForceForShake(9364e6e7bff7660).(float magnitude);
198
199 extern bool D3Use_force_feedbackcxx . . $ D3Use_force_feedback.;
200
201 #endif