Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 24, 2013, 11:15:46 AM (11 years ago)
Author:
smerkli
Message:
  • Converted some absolute paths into relative ones
  • Increased the handlers_ vector size by 1 as a hack to get the wiimote working in this branch (This will have to be cleanly redone once I have a better concept for wiimotes and joysticks)
  • Removed a local inputStates_ variable that georgr added in wiimote, it shadowed the one from the basis class and hence never got any entries

To be discussed with georgr on monday.

Location:
code/branches/wiimote/src/libraries/core/input
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wiimote/src/libraries/core/input/InputManager.cc

    r9790 r9805  
    254254
    255255        }
    256             try
    257             {
    258                 orxout()<<devices_.size();
    259                     devices_.push_back(new WiiMote(devices_.size(), *(new CWiimote())));
    260                 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote()));
    261 
    262             }
    263             catch(std::exception& e)  //gotta catch em all
    264             {
    265                       orxout()<<"Exception loading WiiMote!!!1!11!";
    266             }
     256            try
     257            {
     258              orxout()<< "Size of devices vector before wiimote insertion:" << devices_.size() << std::endl;
     259              devices_.push_back(new WiiMote(devices_.size(), *(new CWiimote())));
     260              //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote()));
     261              orxout()<< "Size of devices vector after wiimote insertion:" << devices_.size() << std::endl;
     262
     263            }
     264            catch(std::exception& e)  //gotta catch em all
     265            {
     266              orxout()<<"Exception loading WiiMote!!!1!11!";
     267            }
    267268
    268269    }
     
    475476                if (rit->second->isInputDeviceEnabled(i) && (!occupied || rit->second->bAlwaysGetsInput_))
    476477                {
    477                         orxout() << "Success with ID " << i <<std::endl;
     478                    orxout() << "Success with ID " << i <<std::endl;
    478479                    states.push_back(rit->second);
    479480                    if (!rit->second->bTransparent_)
  • code/branches/wiimote/src/libraries/core/input/InputState.cc

    r9790 r9805  
    4949            priority_ = 0;
    5050
    51         handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);
     51        // SANDRO HACK: make this 1 larger so we can have the wiimote read out as well
     52        //handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);
     53        handlers_.resize(InputDeviceEnumerator::FirstJoyStick
     54          + 1 +  this->getJoyStickList().size(), NULL);
    5255    }
    5356
     
    98101        setMouseHandler(handler);
    99102        setJoyStickHandler(handler);
     103        setWiiMoteHandler(handler); // SANDRO HACK
    100104    }
    101105
  • code/branches/wiimote/src/libraries/core/input/InputState.h

    r8729 r9805  
    100100        void setMouseHandler   (InputHandler* handler)
    101101            { handlers_[mouseIndex_s]    = handler; bExpired_ = true; }
     102
     103        // SANDRO HACK
     104        void setWiiMoteHandler(InputHandler* handler)
     105        { // TODO make this a dynamically chosen number
     106          handlers_[2]    = handler; bExpired_ = true;
     107        }
     108
    102109        /**
    103110        @brief
  • code/branches/wiimote/src/libraries/core/input/WiiMote.h

    r9790 r9805  
    3131                 void calibrationStopped() { }
    3232                 //! List of all input states that receive events from this device
    33                  std::vector<InputState*> inputStates_;
     33                 //std::vector<InputState*> inputStates_;
    3434
    3535         private:
  • code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc

    r9706 r9805  
    66 */
    77
    8 #include "/usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/core/input/Wiimote_Test.h"
     8#include "Wiimote_Test.h"
    99#include "core/CoreIncludes.h"
    1010#include "core/command/ConsoleCommand.h"
    1111#include "InputState.h"
    12 #include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/orxonox/OrxonoxPrereqs.h>
    1312#include "InputManager.h"
    14 #include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/UtilPrereqs.h>
    15 #include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/ScopedSingletonManager.h>
     13#include <util/UtilPrereqs.h>
     14#include <util/ScopedSingletonManager.h>
    1615
    1716
Note: See TracChangeset for help on using the changeset viewer.