Changeset 9861 for code/branches/wiimote
- Timestamp:
- Dec 2, 2013, 4:37:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9860 r9861 17 17 //else 18 18 //orxout(user_warning) << "pointer is not null, yay" << std::endl; 19 if (PWii->Poll()) 20 { 21 p->UpdateStatus(); 22 //CWiimote::EventTypes e = p->GetEvent(); 23 if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A)) 19 PWii->Poll(); 20 21 p->UpdateStatus(); //perhaps this will help against the lag? 22 if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A)) //ugly hack to just do something on button press easily 24 23 { 25 24 CommandExecutor::execute("fire 0", 0, 0); … … 28 27 29 28 p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw); 30 int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); 29 int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); //get difference in orientation, divide by time to make faster movements result in faster orientation change 31 30 int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime()); 32 31 IntVector2 abs(0, 0); … … 39 38 { 40 39 for (unsigned int i = 0; i < inputStates_.size(); ++i) 41 inputStates_[i]->mouseMoved(abs, rel, clippingSize); 40 inputStates_[i]->mouseMoved(abs, rel, clippingSize); //pass random mouse movements to all input states 42 41 } 43 }42 //} 44 43 45 44
Note: See TracChangeset
for help on using the changeset viewer.