Changeset 3301 for code/trunk/src/core/input
- Timestamp:
- Jul 18, 2009, 4:03:59 PM (15 years ago)
- Location:
- code/trunk/src/core/input
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/input/InputBuffer.cc
r3196 r3301 218 218 } 219 219 220 this->insert( (char)evt.text);220 this->insert(static_cast<char>(evt.text)); 221 221 } 222 222 -
code/trunk/src/core/input/InputManager.cc
r3280 r3301 175 175 176 176 // Fill parameter list 177 windowHndStr << (unsigned int)windowHnd_;177 windowHndStr << static_cast<unsigned int>(windowHnd); 178 178 paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str())); 179 179 #if defined(ORXONOX_PLATFORM_WINDOWS) -
code/trunk/src/core/input/KeyBinder.cc
r3280 r3301 444 444 if (mousePosition_[i] < 0) 445 445 { 446 mouseAxes_[2*i + 0].absVal_ = -mousePosition_[i]/(float)mouseClippingSize_ * mouseSensitivity_;447 mouseAxes_[2*i + 1].absVal_ = 446 mouseAxes_[2*i + 0].absVal_ = -mouseSensitivity_ * mousePosition_[i] / mouseClippingSize_; 447 mouseAxes_[2*i + 1].absVal_ = 0.0f; 448 448 } 449 449 else 450 450 { 451 mouseAxes_[2*i + 0].absVal_ = 452 mouseAxes_[2*i + 1].absVal_ = mousePosition_[i]/(float)mouseClippingSize_ * mouseSensitivity_;451 mouseAxes_[2*i + 0].absVal_ = 0.0f; 452 mouseAxes_[2*i + 1].absVal_ = mouseSensitivity_ * mousePosition_[i] / mouseClippingSize_; 453 453 } 454 454 } … … 460 460 { 461 461 if (rel[i] < 0) 462 mouseAxes_[0 + 2*i].relVal_ = - ((float)rel[i])/(float)mouseClippingSize_ * mouseSensitivity_;462 mouseAxes_[0 + 2*i].relVal_ = -mouseSensitivity_ * rel[i] / mouseClippingSize_; 463 463 else 464 mouseAxes_[1 + 2*i].relVal_ = ((float)rel[i])/(float)mouseClippingSize_ * mouseSensitivity_;464 mouseAxes_[1 + 2*i].relVal_ = mouseSensitivity_ * rel[i] / mouseClippingSize_; 465 465 } 466 466 } … … 474 474 if (rel < 0) 475 475 for (int i = 0; i < -rel/mouseWheelStepSize_; i++) 476 mouseButtons_[8].execute(KeybindMode::OnPress, ((float)abs)/mouseWheelStepSize_);476 mouseButtons_[8].execute(KeybindMode::OnPress, static_cast<float>(abs)/mouseWheelStepSize_); 477 477 else 478 478 for (int i = 0; i < rel/mouseWheelStepSize_; i++) 479 mouseButtons_[9].execute(KeybindMode::OnPress, ((float)abs)/mouseWheelStepSize_);479 mouseButtons_[9].execute(KeybindMode::OnPress, static_cast<float>(abs)/mouseWheelStepSize_); 480 480 } 481 481
Note: See TracChangeset
for help on using the changeset viewer.