- Timestamp:
- Nov 25, 2013, 3:38:51 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9790 r9813 11 11 { 12 12 orxout(user_warning) << this->inputStates_.size() << std::endl; 13 CWiimote::EventTypes e = p->GetEvent(); 14 if(p->Buttons.isPressed(CButtons::BUTTON_A)) 15 orxout()<<"ZOMG!!1!"<<endl; 16 Orientation o; 17 p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw); 18 int x = (int)(o.yaw-lastOrientation.yaw)*time.tickDt_; 19 int y = (int)(o.pitch-lastOrientation.pitch)*time.tickDt_; 20 IntVector2 abs(0, 0); 21 IntVector2 rel(x, y); 22 IntVector2 clippingSize(1920, 1080); 23 if(x!=0&&y!=0) 24 { 25 for (unsigned int i = 0; i < inputStates_.size(); ++i) 26 inputStates_[i]->mouseMoved(abs, rel, clippingSize); 27 } 28 29 13 30 } 14 31 void WiiMote::clearBuffers() … … 23 40 { 24 41 p = &parent; 42 43 lastOrientation.yaw = 0; 44 lastOrientation.roll = 0; 45 lastOrientation.pitch = 0; 46 25 47 } 26 48 }
Note: See TracChangeset
for help on using the changeset viewer.