Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1461 for code/branches


Ignore:
Timestamp:
May 28, 2008, 8:07:32 PM (16 years ago)
Author:
rgrieder
Message:
  • "set" —> "config"
  • adjusted Shell output levels for keybind and calibrate
Location:
code/branches/network/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/core/InputBuffer.h

    r1449 r1461  
    6666            {
    6767                struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned};
     68                // TODO: this is a major hack!!!
     69                // Fix it properly
    6870                *((int*)(&newListener.listener_)) = (int)(listener);
    6971
  • code/branches/network/src/core/InputManager.cc

    r1455 r1461  
    573573            marginalsMin_[i] = INT_MAX;
    574574          }
    575           COUT(3) << "Move all joy stick axes in all directions a few times. "
     575          COUT(1) << "Move all joy stick axes in all directions a few times. "
    576576            << "Then put all axes in zero state and hit enter." << std::endl;
    577577
     
    598598        _completeCalibration();
    599599        _restoreState();
     600        keyBinder_->resetJoyStickAxes();
    600601        state_ = IS_NOCALIBRATE;
    601602        stateRequest_ = savedState_;
     
    11211122  {
    11221123    setInputState(IS_NODETECT);
    1123     COUT(3) << "Binding string \"" << bindingCommmandString_s << "\" on key '" << name << "'" << std::endl;
    1124     CommandExecutor::execute("set KeyBinder " + name + " " + bindingCommmandString_s, false);
     1124    COUT(1) << "Binding string \"" << bindingCommmandString_s << "\" on key '" << name << "'" << std::endl;
     1125    CommandExecutor::execute("config KeyBinder " + name + " " + bindingCommmandString_s, false);
    11251126  }
    11261127
     
    11291130    bindingCommmandString_s = command;
    11301131    setInputState(IS_DETECT);
    1131     COUT(3) << "Press any button/key or move a mouse/joystick axis" << std::endl;
     1132    COUT(1) << "Press any button/key or move a mouse/joystick axis" << std::endl;
    11321133  }
    11331134
  • code/branches/network/src/core/KeyBinder.cc

    r1446 r1461  
    621621  }
    622622
     623  void KeyBinder::resetJoyStickAxes()
     624  {
     625    for (unsigned int i = 8; i < nHalfAxes_s; i++)
     626    {
     627      halfAxes_[i].absVal_ = 0.0f;
     628      halfAxes_[i].relVal_ = 0.0f;
     629    }
     630  }
     631
    623632  void KeyBinder::tickInput(float dt, const HandlerState& state)
    624633  {
  • code/branches/network/src/core/KeyBinder.h

    r1446 r1461  
    146146    void clearBindings();
    147147    void setConfigValues();
     148    void resetJoyStickAxes();
    148149
    149150  protected: // functions
  • code/branches/network/src/cpptcl/CppTcl.cc

    r1455 r1461  
    953953
    954954     {
     955          // TODO: why could this probably be necessary? map::find of empty map
     956          // shouldn't be a problem.
    955957          if (callbacks.size() == 0)
    956958            return;
  • code/branches/network/src/orxonox/hud/HUD.cc

    r1456 r1461  
    213213
    214214    /*static*/ void HUD::toggleFPS(){
    215         if(HUD::getSingleton().showFPS) HUD::getSingleton().showFPS = false;
    216         else HUD::getSingleton().showFPS = true;
     215        HUD::getSingleton().showFPS = !HUD::getSingleton().showFPS;
    217216    }
    218217
    219218    /*static*/ void HUD::toggleRenderTime(){
    220         if(HUD::getSingleton().showRenderTime) HUD::getSingleton().showRenderTime = false;
    221         else HUD::getSingleton().showRenderTime = true;
     219        HUD::getSingleton().showRenderTime = !HUD::getSingleton().showRenderTime;
    222220    }
    223221}
Note: See TracChangeset for help on using the changeset viewer.