MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SlewControlInit

Function SlewControlInit

Descent3/SLEW.cpp:226–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225#ifdef EDITOR
226void SlewControlInit() {
227 Joystick_active = -1;
228
229 if (!D3EditState.joy_slewing)
230 return;
231
232 if (joy_IsValid(JOYSTICK_1)) {
233 tJoyPos joystate;
234 tJoystick joyid = JOYSTICK_1;
235
236 Joystick_active = (int)joyid;
237 joy_GetPos((tJoystick)Joystick_active, &joystate); // get all the stick values
238
239 if ((abs(joystate.x) > 32) || (abs(joystate.y) > 32))
240 EditorMessageBox("Warning: Your joystick is not centered. You should either center it now or recalibrate.");
241 }
242}
243#endif
244
245int SlewStop(object *obj) {

Callers 3

OnOKMethod · 0.85
OnIdleMethod · 0.85
InitD3Systems2Function · 0.85

Calls 2

joy_IsValidFunction · 0.85
joy_GetPosFunction · 0.85

Tested by

no test coverage detected