Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9850 for code/branches/wiimote


Ignore:
Timestamp:
Dec 2, 2013, 3:35:38 PM (11 years ago)
Author:
georgr
Message:

A should fire main lazors now

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  
    11#include "WiiMote.h"
    22#include "core/CoreIncludes.h"
    3 #include "core/command/ConsoleCommand.h"
     3//#include "core/command/ConsoleCommand.h"
    44#include <wiicpp/wiicpp/wiicpp.h>
     5
    56
    67namespace orxonox
     
    1314                if(p == NULL)
    1415              exit(0);
    15                 else
    16                   orxout(user_warning) << "pointer is not null, yay" << std::endl;
     16                //else
     17                  //orxout(user_warning) << "pointer is not null, yay" << std::endl;
    1718                if (PWii->Poll())
    1819                {
    1920                        CWiimote::EventTypes e = p->GetEvent();
    2021                        if(p->Buttons.isPressed(CButtons::BUTTON_A))
    21                                 orxout()<<"ZOMG!!1!"<<endl;
     22                                {
     23                                        CE->execute("fire 0", 0, 0);
     24                                }
    2225                        Orientation o;
    2326                        p->SetMotionSensingMode(CWiimote::ON);
    2427                        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());
    2629                        int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());
    2730                        IntVector2 abs(0, 0);
     
    5558                lastOrientation.roll = 0;
    5659                lastOrientation.pitch = 0;
     60                CE = &(CommandExecutor::getInstance());
    5761
    5862        }
  • code/branches/wiimote/src/libraries/core/input/WiiMote.h

    r9838 r9850  
    4242                 CWiimote * p;
    4343                 CWii * PWii; //parent "wii" the wiimote is registered to
     44                 CommandExecutor * CE;
    4445        };
    4546};
Note: See TracChangeset for help on using the changeset viewer.