Changeset 1461 for code/branches
- Timestamp:
- May 28, 2008, 8:07:32 PM (16 years ago)
- Location:
- code/branches/network/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/InputBuffer.h
r1449 r1461 66 66 { 67 67 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, false, '\0', KeyCode::Unassigned}; 68 // TODO: this is a major hack!!! 69 // Fix it properly 68 70 *((int*)(&newListener.listener_)) = (int)(listener); 69 71 -
code/branches/network/src/core/InputManager.cc
r1455 r1461 573 573 marginalsMin_[i] = INT_MAX; 574 574 } 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. " 576 576 << "Then put all axes in zero state and hit enter." << std::endl; 577 577 … … 598 598 _completeCalibration(); 599 599 _restoreState(); 600 keyBinder_->resetJoyStickAxes(); 600 601 state_ = IS_NOCALIBRATE; 601 602 stateRequest_ = savedState_; … … 1121 1122 { 1122 1123 setInputState(IS_NODETECT); 1123 COUT( 3) << "Binding string \"" << bindingCommmandString_s << "\" on key '" << name << "'" << std::endl;1124 CommandExecutor::execute(" setKeyBinder " + 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); 1125 1126 } 1126 1127 … … 1129 1130 bindingCommmandString_s = command; 1130 1131 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; 1132 1133 } 1133 1134 -
code/branches/network/src/core/KeyBinder.cc
r1446 r1461 621 621 } 622 622 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 623 632 void KeyBinder::tickInput(float dt, const HandlerState& state) 624 633 { -
code/branches/network/src/core/KeyBinder.h
r1446 r1461 146 146 void clearBindings(); 147 147 void setConfigValues(); 148 void resetJoyStickAxes(); 148 149 149 150 protected: // functions -
code/branches/network/src/cpptcl/CppTcl.cc
r1455 r1461 953 953 954 954 { 955 // TODO: why could this probably be necessary? map::find of empty map 956 // shouldn't be a problem. 955 957 if (callbacks.size() == 0) 956 958 return; -
code/branches/network/src/orxonox/hud/HUD.cc
r1456 r1461 213 213 214 214 /*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; 217 216 } 218 217 219 218 /*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; 222 220 } 223 221 }
Note: See TracChangeset
for help on using the changeset viewer.