Changeset 1444 for code/branches/network/src/core/InputManager.h
- Timestamp:
- May 28, 2008, 12:01:16 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/InputManager.h
r1428 r1444 76 76 std::vector<std::vector<JoyStickHandler*> > activeJoyStickHandlers_; 77 77 std::vector<std::pair<InputTickable*, HandlerState> > activeHandlers_; 78 }; 79 80 struct JoyStickCalibration 81 { 82 int zeroStates[24]; 83 float positiveCoeff[24]; 84 float negativeCoeff[24]; 78 85 }; 79 86 … … 98 105 IS_DETECT, //!< All the input additionally goes to the KeyDetector 99 106 IS_NODETECT, //!< remove KeyDetector 107 IS_NOCALIBRATE, 108 IS_CALIBRATE, 100 109 IS_CUSTOM //!< Any possible configuration. 101 110 }; 111 112 public: // member functions 113 void setConfigValues(); 102 114 103 115 public: // static functions … … 129 141 static void keyBind(const std::string& command); 130 142 143 static void calibrate(); 144 131 145 static bool addKeyHandler (KeyHandler* handler, const std::string& name); 132 146 static bool removeKeyHandler (const std::string& name); … … 171 185 void _saveState(); 172 186 void _restoreState(); 187 188 void _completeCalibration(); 189 190 void _fireAxis(unsigned int iJoyStick, int axis, int value); 191 unsigned int _getJoystick(const OIS::JoyStickEvent& arg); 173 192 174 193 void tick(float dt); … … 200 219 KeyDetector* keyDetector_; //!< KeyDetector instance 201 220 InputBuffer* buffer_; //!< InputBuffer instance 221 CalibratorCallback* calibratorCallback_; 202 222 203 223 InputState state_; 204 224 InputState stateRequest_; 225 InputState savedState_; 205 226 unsigned int keyboardModifiers_; 206 InputState savedState_;207 227 StoredState savedHandlers_; 228 229 // joystick calibration 230 //std::vector<int> marginalsMaxConfig_; 231 //std::vector<int> marginalsMinConfig_; 232 int marginalsMax_[24]; 233 int marginalsMin_[24]; 234 bool bCalibrated_; 208 235 209 236 //! Keeps track of the joy stick POV states … … 211 238 //! Keeps track of the possibly two slider axes 212 239 std::vector<SliderStates> sliderStates_; 240 std::vector<JoyStickCalibration> joySticksCalibration_; 213 241 214 242 std::map<std::string, KeyHandler*> keyHandlers_;
Note: See TracChangeset
for help on using the changeset viewer.