Changeset 1133 for code/branches/console/src
- Timestamp:
- Apr 22, 2008, 7:26:43 PM (17 years ago)
- Location:
- code/branches/console/src
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/CMakeLists.txt
r1115 r1133 34 34 tolualib 35 35 ${Lua_LIBRARIES} 36 ${Lua_LIBRARY}37 36 ${OIS_LIBRARIES} 38 37 ) -
code/branches/console/src/orxonox/Orxonox.cc
r1092 r1133 54 54 //#include "util/Sleep.h" 55 55 #include "util/ArgReader.h" 56 #include "util/ExprParser.h" 56 57 57 58 // core … … 123 124 InputBuffer* ib_; 124 125 }; 126 127 class Calculator 128 { 129 public: 130 static void calculate(const std::string& calculation) 131 { 132 ExprParser expr(calculation); 133 if (expr.getSuccess()) 134 { 135 if (expr.getResult() == 42.0) 136 std::cout << "Greetings from the restaurant at the end of the universe." << std::endl; 137 // FIXME: insert modifier to display in full precision 138 std::cout << "Result is: " << expr.getResult() << std::endl; 139 if (expr.getRemains() != "") 140 std::cout << "Warning: Expression could not be parsed to the end! Remains: '" 141 << expr.getRemains() << "'" << std::endl; 142 } 143 else 144 std::cout << "Cannot calculate expression: Parse error" << std::endl; 145 } 146 }; 147 ConsoleCommandShortcut(Calculator, calculate, AccessLevel::None); 125 148 126 149 /** … … 410 433 return; 411 434 } 435 Ogre::Root& ogreRoot = Ogre::Root::getSingleton(); 436 412 437 413 438 // Contains the times of recently fired events … … 429 454 { 430 455 // Pump messages in all registered RenderWindows 456 // This calls the WindowEventListener objects. 431 457 Ogre::WindowEventUtilities::messagePump(); 432 458 … … 452 478 // don't forget to call _fireFrameStarted in ogre to make sure 453 479 // everything goes smoothly 454 Ogre::Root::getSingleton()._fireFrameStarted(evt);480 ogreRoot._fireFrameStarted(evt); 455 481 456 482 // server still renders at the moment 457 483 //if (mode_ != SERVER) 458 Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode484 ogreRoot._updateAllRenderTargets(); // only render in non-server mode 459 485 460 486 // get current time … … 466 492 467 493 // again, just to be sure ogre works fine 468 Ogre::Root::getSingleton()._fireFrameEnded(evt);494 ogreRoot._fireFrameEnded(evt); 469 495 } 470 496 } -
code/branches/console/src/tolua/CMakeLists.txt
r1115 r1133 14 14 TARGET_LINK_LIBRARIES(tolua 15 15 ${Lua_LIBRARIES} 16 ${Lua_LIBRARY}17 16 m 18 17 ) … … 41 40 ADD_CUSTOM_COMMAND( 42 41 OUTPUT tolua_bind.h tolua_bind.cc 43 COMMAND ${TOLUA_EXE} -n orxonox -o ../../src/tolua/tolua_bind.cc -H ../../src/tolua/tolua_bind.h ../../src/tolua/tolua.pkg42 COMMAND ${TOLUA_EXE} -n orxonox -o tolua/tolua_bind.cc -H tolua/tolua_bind.h tolua/tolua.pkg 44 43 DEPENDS tolua 45 WORKING_DIRECTORY ${CMAKE_ BINARY_DIR}/bin/lib44 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src 46 45 ) 47 46 … … 50 49 TARGET_LINK_LIBRARIES(tolualib 51 50 ${Lua_LIBRARIES} 52 ${Lua_LIBRARY}53 51 ) 54 52 -
code/branches/console/src/tolua/tolua.pkg
r1115 r1133 1 $cfile " ../../src/core/Script_clean.h"1 $cfile "core/Script_clean.h" -
code/branches/console/src/util/CMakeLists.txt
r1115 r1133 7 7 Clipboard.cc 8 8 SubString.cc 9 ExprParser.cc 9 10 MultiTypePrimitive.cc 10 11 MultiTypeString.cc
Note: See TracChangeset
for help on using the changeset viewer.