Changeset 1122
- Timestamp:
- Apr 21, 2008, 7:42:58 PM (17 years ago)
- Location:
- code/branches/cmake
- Files:
-
- 6 deleted
- 8 edited
- 16 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cmake/CMakeLists.txt
r1101 r1122 79 79 ${ENet_INCLUDE_DIR} 80 80 ${Boost_INCLUDE_DIRS} 81 ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR} 81 ${OPENAL_INCLUDE_DIR} 82 ${ALUT_INCLUDE_DIR} 83 ${VORBIS_INCLUDE_DIR} 84 ${OGG_INCLUDE_DIR} 82 85 ${Lua_INCLUDE_DIR} 83 86 ) 84 85 86 ################ Source files ###################87 88 #if on a windows box, you have to generate the tolua bind files yourself89 IF(NOT WIN32)90 91 #At first, build lua92 MESSAGE(STATUS "\n******************* Building tolua... ******************\n\n")93 EXECUTE_PROCESS(COMMAND ./tolua-build)94 MESSAGE(STATUS "\n\n******************* Building tolua done ****************\n")95 96 #generate lua bind source files97 EXECUTE_PROCESS(COMMAND bin/./tolua-exec-script)98 99 ENDIF(NOT WIN32)100 87 101 88 #add main source dir -
code/branches/cmake/src/CMakeLists.txt
r1076 r1122 1 1 INCLUDE_DIRECTORIES(.) 2 2 INCLUDE_DIRECTORIES(orxonox) 3 INCLUDE_DIRECTORIES( util/tolua)3 INCLUDE_DIRECTORIES(tolua) 4 4 5 ADD_SUBDIRECTORY(tolua) 5 6 ADD_SUBDIRECTORY(util) 6 7 ADD_SUBDIRECTORY(core) -
code/branches/cmake/src/core/CMakeLists.txt
r1084 r1122 1 #get the created files 2 AUX_SOURCE_DIRECTORY(tolua TOLUA_BIND_FILES) 3 4 SET( CORE_SRC_FILES 1 SET(CORE_SRC_FILES 5 2 OrxonoxClass.cc 6 3 BaseObject.cc … … 29 26 Tickable.cc 30 27 Script.cc 31 ${TOLUA_BIND_FILES}32 28 ) 33 29 34 ADD_LIBRARY( 30 ADD_LIBRARY(core SHARED ${CORE_SRC_FILES}) 35 31 36 TARGET_LINK_LIBRARIES( 32 TARGET_LINK_LIBRARIES(core 37 33 util 34 tolualib 38 35 ${Lua_LIBRARIES} 39 36 ${Lua_LIBRARY} -
code/branches/cmake/src/core/ConfigFileManager.h
r1064 r1122 63 63 { 64 64 public: 65 virtual ~ConfigFileEntry() {}; 65 66 virtual void setValue(const std::string& value) = 0; 66 67 virtual std::string getValue() const = 0; -
code/branches/cmake/src/core/Script.cc
r1102 r1122 39 39 } 40 40 41 #include "tolua ++.h"41 #include "tolua/tolua++.h" 42 42 #include "tolua/tolua_bind.h" 43 43 -
code/branches/cmake/src/orxonox/Orxonox.cc
r1092 r1122 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/cmake/src/util/CMakeLists.txt
r1085 r1122 1 1 AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES) 2 2 3 SET 3 SET(UTIL_SRC_FILES 4 4 ArgReader.cc 5 5 Math.cc … … 7 7 Clipboard.cc 8 8 SubString.cc 9 ExprParser.cc 9 10 MultiTypePrimitive.cc 10 11 MultiTypeString.cc 11 12 MultiTypeMath.cc 12 tolua/tolua_event.c13 tolua/tolua_is.c14 tolua/tolua_map.c15 tolua/tolua_push.c16 tolua/tolua_to.c17 13 ${TINYXML_SRC_FILES} 18 14 ) 19 15 20 ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES})16 ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES}) 21 17 22 18 IF(TESTING_ENABLED) … … 24 20 ENDIF(TESTING_ENABLED) 25 21 26 TARGET_LINK_LIBRARIES( 22 TARGET_LINK_LIBRARIES(util 27 23 ${OGRE_LIBRARIES} 28 ${Lua_LIBRARIES}29 ${Lua_LIBRARY}30 24 ) 31 25 -
code/branches/cmake/src/util/String.cc
r1064 r1122 274 274 if (str.size() == 0) 275 275 return str; 276 else if (str.size() == 1) 277 { 278 //TODO: decide whether we need the commented code 279 /*if (str[0] != '\\') 280 return ""; 281 else*/ 282 return str; 283 } 276 284 277 285 std::string output = "";
Note: See TracChangeset
for help on using the changeset viewer.