Changeset 1214 for code/trunk/src/orxonox/Orxonox.cc
- Timestamp:
- May 2, 2008, 9:23:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/Orxonox.cc
r1206 r1214 76 76 #include "tools/Timer.h" 77 77 #include "hud/HUD.h" 78 #include "console/InGameConsole.h" 78 79 79 80 // FIXME: is this really file scope? … … 128 129 { 129 130 public: 130 static voidcalculate(const std::string& calculation)131 static float calculate(const std::string& calculation) 131 132 { 132 133 ExprParser expr(calculation); … … 140 141 std::cout << "Warning: Expression could not be parsed to the end! Remains: '" 141 142 << expr.getRemains() << "'" << std::endl; 143 return expr.getResult(); 142 144 } 143 145 else 146 { 144 147 std::cout << "Cannot calculate expression: Parse error" << std::endl; 148 return 0; 149 } 145 150 } 146 151 }; … … 420 425 InputBuffer* ib = new InputBuffer(); 421 426 InputManager::getSingleton().feedInputBuffer(ib); 427 /* 422 428 Testconsole* console = new Testconsole(ib); 423 429 ib->registerListener(console, &Testconsole::listen, true); 424 430 ib->registerListener(console, &Testconsole::execute, '\r', false); 425 ib->registerListener(console, &Testconsole::execute, '\n', false);426 431 ib->registerListener(console, &Testconsole::hintandcomplete, '\t', true); 427 432 ib->registerListener(console, &Testconsole::clear, '§', true); 428 433 ib->registerListener(console, &Testconsole::removeLast, '\b', true); 429 434 ib->registerListener(console, &Testconsole::exit, (char)0x1B, true); 435 */ 436 437 orxonoxConsole_ = new InGameConsole(ib); 438 ib->registerListener(orxonoxConsole_, &InGameConsole::listen, true); 439 ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\r', false); 440 ib->registerListener(orxonoxConsole_, &InGameConsole::hintandcomplete, '\t', true); 441 ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '§', true); 442 ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true); 443 ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true); 430 444 431 445 // first check whether ogre root object has been created … … 477 491 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) 478 492 it->tick((float)evt.timeSinceLastFrame * this->timefactor_); 493 orxonoxConsole_->tick((float)evt.timeSinceLastFrame * this->timefactor_); 479 494 480 495 // don't forget to call _fireFrameStarted in ogre to make sure
Note: See TracChangeset
for help on using the changeset viewer.