Changeset 9850
- Timestamp:
- Dec 2, 2013, 3:35:38 PM (11 years ago)
- Location:
- code/branches/wiimote/src/libraries/core/input
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/WiiMote.cc
r9846 r9850 1 1 #include "WiiMote.h" 2 2 #include "core/CoreIncludes.h" 3 #include "core/command/ConsoleCommand.h"3 //#include "core/command/ConsoleCommand.h" 4 4 #include <wiicpp/wiicpp/wiicpp.h> 5 5 6 6 7 namespace orxonox … … 13 14 if(p == NULL) 14 15 exit(0); 15 else16 orxout(user_warning) << "pointer is not null, yay" << std::endl;16 //else 17 //orxout(user_warning) << "pointer is not null, yay" << std::endl; 17 18 if (PWii->Poll()) 18 19 { 19 20 CWiimote::EventTypes e = p->GetEvent(); 20 21 if(p->Buttons.isPressed(CButtons::BUTTON_A)) 21 orxout()<<"ZOMG!!1!"<<endl; 22 { 23 CE->execute("fire 0", 0, 0); 24 } 22 25 Orientation o; 23 26 p->SetMotionSensingMode(CWiimote::ON); 24 27 p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw); 25 int x = (int)( (o.yaw-lastOrientation.yaw)/time.getDeltaTime());28 int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); 26 29 int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime()); 27 30 IntVector2 abs(0, 0); … … 55 58 lastOrientation.roll = 0; 56 59 lastOrientation.pitch = 0; 60 CE = &(CommandExecutor::getInstance()); 57 61 58 62 } -
code/branches/wiimote/src/libraries/core/input/WiiMote.h
r9838 r9850 42 42 CWiimote * p; 43 43 CWii * PWii; //parent "wii" the wiimote is registered to 44 CommandExecutor * CE; 44 45 }; 45 46 };
Note: See TracChangeset
for help on using the changeset viewer.