15 0x13, 0x0d, 4, 9, 7, 0, 0, 0
41 short horizontalDeadZone,
42 short verticalDeadZone)
47 unsigned short storedCentreX;
48 unsigned short storedCentreY;
50 unsigned short maximumX;
51 unsigned short minimumY;
56 unsigned short minimumX;
57 unsigned short maximumY;
63 if (horizontalRange == 0)
65 if (verticalRange == 0)
69 if (samples[0].x != -1 && samples[0].y != -1)
71 else if (samples[1].x != -1 && samples[1].y != -1)
74 if (activeDevice != -1) {
75 file = _open(
"j.cal", 0x8000);
77 failed = _read(file, &activeDevice, 2) <= 0;
79 failed = _read(file, &minimumX, 2) <= 0;
81 failed = _read(file, &minimumY, 2) <= 0;
83 failed = _read(file, &maximumX, 2) <= 0;
85 failed = _read(file, &maximumY, 2) <= 0;
87 failed = _read(file, &storedCentreX, 2) <= 0;
89 failed = _read(file, &storedCentreY, 2) <= 0;
103 centreX = ((int)minimumX + (int)maximumX) / 2;
104 centreY = ((int)maximumY + (int)minimumY) / 2;
125 rangeX = horizontalRange;
126 rangeY = verticalRange;
144 rangeX = horizontalRange * leftScale;
146 rangeY = verticalRange * upScale;
193 normalizedX = normalizedY;
202 normalizedX = (short)((centre - sample) / scale);
204 if (normalizedX != 0)
205 normalizedX = (short)-normalizedX;
217 normalizedX = (short)((sample - centre) / scale);
230 normalizedY = (short)((centre - sample) / scale);
232 if (normalizedY != 0)
233 normalizedY = (short)-normalizedY;
245 normalizedY = (short)((sample - centre) / scale);
261 destination->
top = first->
top < second->
top ?
InputDeviceSample aInputDevSamples[2]
signed char acShipRating[16]
int nJoystickCalibrationMinimumY
int nJoystickCalibrationMinimumX
short asObjScreenAngles[SPACE_OBJECT_COUNT]
short anObjectYawRotation[SPACE_OBJECT_COUNT]
unsigned int anVduModeCache[2]
int nCurrentJoystickFailureValue
int nJoystickDownScaleValue
ShortVector stPreviousRotationInput
int nStickMinimumPositionX
int nCurrentJoystickLeftScale
int nJoystickCalibrationMaxY
int nJoystickHorizontalDeadZone
int nStickMinimumPositionY
int nCurrentJoystickRawCoordX
signed char acGraphicsModeByAnimationSpeed[8]
signed char acObjOwnersTable[64]
short nCurrentActiveInputDevice
unsigned char abCollisionAlertTargets[0x10]
int nJoystickVertDeadZoneValue
int nCurrentJoystickRawCoordY
signed char acShipTargetTable[16]
signed char acPilotHitPointsArray[16]
int nJoystickCalibrationMaximumX
signed char acTurnRegulatorsArray[16]
static char szTMDriverName[]
static char szSuperTMDriverName[]
Umbrella header for the game core.
short __stdcall SampleBothJoysticks(InputDeviceSample *samples, short fallback)
void GetJoystickDevCaps(short joystick, unsigned short *xMin, unsigned short *xMax, unsigned short *yMin, unsigned short *yMax)
void LoadJoystickCalibrationFile(short horizontalRange, short verticalRange, short horizontalDeadZone, short verticalDeadZone)
short ReadCalibratedJoystick(void)
void __stdcall UnionRectBounds(ShortRect *destination, const ShortRect *first, const ShortRect *second)
int __stdcall SampleJoystickDevice(InputDeviceSample *samples, short joystick, unsigned short fallback)
#define SPACE_OBJECT_COUNT