- Timestamp:
- Apr 27, 2008, 6:20:12 PM (17 years ago)
- Location:
- code/branches/input
- Files:
-
- 62 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/CMakeLists.txt
r1126 r1195 53 53 #Performs the search and sets the variables 54 54 FIND_PACKAGE(OGRE) 55 FIND_PACKAGE(OIS)55 #FIND_PACKAGE(OIS) 56 56 # FIND_PACKAGE(CEGUI) 57 57 # FIND_PACKAGE(CEGUI_OGRE) … … 67 67 LINK_DIRECTORIES( 68 68 ${OGRE_LIB_DIR} 69 ${OIS_LIB_DIR}69 # ${OIS_LIB_DIR} 70 70 # ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} 71 71 ${ENet_LIBRARY} … … 77 77 INCLUDE_DIRECTORIES( 78 78 ${OGRE_INCLUDE_DIR} 79 ${OIS_INCLUDE_DIR}79 # ${OIS_INCLUDE_DIR} 80 80 # ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} 81 81 ${ENet_INCLUDE_DIR} -
code/branches/input/src/CMakeLists.txt
r1153 r1195 2 2 INCLUDE_DIRECTORIES(orxonox) 3 3 INCLUDE_DIRECTORIES(util/tolua) 4 INLUCDE_DIRECTORIES(ois) 4 5 6 ADD_SUBDIRECTORY(ois) 5 7 ADD_SUBDIRECTORY(util) 6 8 ADD_SUBDIRECTORY(core) -
code/branches/input/src/core/CMakeLists.txt
r1153 r1195 50 50 TARGET_LINK_LIBRARIES(core 51 51 ${Lua_LIBRARIES} 52 ${OIS_LIBRARIES}53 52 ${OGRE_LIBRARIES} 53 ois 54 54 util 55 55 ) -
code/branches/input/src/core/InputBuffer.h
r1193 r1195 35 35 #include <list> 36 36 37 #include <OIS/OISKeyboard.h>37 #include "ois/OISKeyboard.h" 38 38 39 39 namespace orxonox -
code/branches/input/src/core/InputManager.cc
r1193 r1195 155 155 try 156 156 { 157 #if (OIS_VERSION >> 8) == 0x0100 158 if (inputSystem_->numKeyboards() > 0) 159 #elif (OIS_VERSION >> 8) == 0x0102 160 if (inputSystem_->getNumberOfDevices(OIS::OISKeyboard) > 0) 161 #endif 157 if (inputSystem_->getNumberOfDevices(OIS::OISKeyboard) > 0) 162 158 { 163 159 keyboard_ = (OIS::Keyboard*)inputSystem_->createInputObject(OIS::OISKeyboard, true); … … 185 181 try 186 182 { 187 #if (OIS_VERSION >> 8) == 0x0100 188 if (inputSystem_->numMice() > 0) 189 #elif (OIS_VERSION >> 8) == 0x0102 190 if (inputSystem_->getNumberOfDevices(OIS::OISMouse) > 0) 191 #endif 183 if (inputSystem_->getNumberOfDevices(OIS::OISMouse) > 0) 192 184 { 193 185 mouse_ = static_cast<OIS::Mouse*>(inputSystem_->createInputObject(OIS::OISMouse, true)); … … 212 204 void InputManager::_initialiseJoySticks() 213 205 { 214 #if (OIS_VERSION >> 8) == 0x0100215 if (inputSystem_->numJoySticks() > 0)216 {217 _setNumberOfJoysticks(inputSystem_->numJoySticks());218 #elif (OIS_VERSION >> 8) == 0x0102219 206 if (inputSystem_->getNumberOfDevices(OIS::OISJoyStick) > 0) 220 207 { 221 208 _setNumberOfJoysticks(inputSystem_->getNumberOfDevices(OIS::OISJoyStick)); 222 #endif223 209 for (std::vector<OIS::JoyStick*>::iterator it = joySticks_.begin(); it != joySticks_.end(); it++) 224 210 { … … 371 357 372 358 // ############################### 373 // ### Public Member Methods###359 // ### Interface Methods ### 374 360 // ############################### 375 361 376 362 /** 377 @brief Updates the InputManager 363 @brief Updates the InputManager. Tick is called by Orxonox. 378 364 @param dt Delta time 379 365 */ … … 394 380 this->bKeyBindingsActive_ = true; 395 381 this->bMouseButtonBindingsActive_ = true; 396 //this->bJoySticksButtonBindingsActive_ = true; 382 for (unsigned int i = 0; i < joySticks_.size(); i++) 383 this->bJoyStickButtonBindingsActive_[i] = true; 397 384 break; 398 385 … … 404 391 this->listenersKeyActive_.clear(); 405 392 this->listenersMouseActive_.clear(); 406 //this->listenersJoyStickActive_.clear();393 this->listenersJoySticksActive_.clear(); 407 394 this->bKeyBindingsActive_ = false; 408 395 this->bMouseButtonBindingsActive_ = true; 409 //this->bJoyStickButtonBindingsActive_ = true; 396 for (unsigned int i = 0; i < joySticks_.size(); i++) 397 this->bJoyStickButtonBindingsActive_[i] = true; 410 398 if (listenersKey_.find("buffer") != listenersKey_.end()) 411 399 listenersKeyActive_.push_back(listenersKey_["buffer"]); … … 421 409 this->listenersKeyActive_.clear(); 422 410 this->listenersMouseActive_.clear(); 423 //this->listenersJoyStickActive_.clear();411 this->listenersJoySticksActive_.clear(); 424 412 this->bKeyBindingsActive_ = false; 425 413 this->bMouseButtonBindingsActive_ = false; 426 //this->bJoyStickButtonBindingsActive_ = false; 414 for (unsigned int i = 0; i < joySticks_.size(); i++) 415 this->bJoyStickButtonBindingsActive_[i] = false; 427 416 break; 428 417 429 418 case IS_CUSTOM: 430 419 // don't do anything 420 break; 421 422 case IS_UNINIT: 423 // this can't happen 431 424 break; 432 425 } … … 619 612 } 620 613 614 /*bool InputManager::initialiseKeyboard() 615 { 616 } 617 618 bool InputManager::initialiseMouse() 619 { 620 } 621 622 bool InputManager::initialiseJoySticks() 623 { 624 }*/ 625 621 626 bool InputManager::addKeyListener(OIS::KeyListener *listener, const std::string& name) 622 627 { -
code/branches/input/src/core/InputManager.h
r1193 r1195 40 40 #include <map> 41 41 #include <list> 42 #include <OIS/OIS.h> 43 42 43 #include "ois/OIS.h" 44 44 #include "Tickable.h" 45 45 #include "InputEvent.h" -
code/branches/input/src/orxonox/CMakeLists.txt
r1153 r1195 55 55 ${OGRE_LIBRARIES} 56 56 ${Lua_LIBRARIES} 57 ois 57 58 util 58 59 core -
code/branches/input/src/orxonox/OrxonoxStableHeaders.h
r1065 r1195 79 79 #include <OgreWindowEventUtilities.h> 80 80 81 #include <OIS/OIS.h>82 83 81 //----------------------------------------------------------------------- 84 82 // ORXONOX HEADERS 85 83 //----------------------------------------------------------------------- 84 85 #include "ois/OIS.h" 86 86 87 87 //#include "util/Convert.h" -
code/branches/input/src/orxonox/objects/SpaceShip.cc
r1182 r1195 32 32 #include <string> 33 33 34 #include <OIS/OIS.h>35 34 #include <OgreCamera.h> 36 35 #include <OgreRenderWindow.h> … … 38 37 #include <OgreSceneNode.h> 39 38 39 #include "ois/OIS.h" 40 40 #include "util/tinyxml/tinyxml.h" 41 41 #include "util/Convert.h" -
code/branches/input/src/orxonox/objects/SpaceShip.h
r1056 r1195 33 33 34 34 #include <OgrePrerequisites.h> 35 #include <OIS/OISMouse.h>36 35 36 #include "ois/OISMouse.h" 37 37 #include "Model.h" 38 38 #include "../tools/BillboardSet.h" -
code/branches/input/visual_studio/base_properties.vsprops
r1084 r1195 8 8 <Tool 9 9 Name="VCCLCompilerTool" 10 AdditionalIncludeDirectories=""$(RootDir)src";"$(RootDir)src\orxonox";"$(RootDir)src\util\tolua";"$( DependencyDir)include""10 AdditionalIncludeDirectories=""$(RootDir)src";"$(RootDir)src\orxonox";"$(RootDir)src\util\tolua";"$(RootDir)src\ois\include";"$(DependencyDir)include"" 11 11 PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK;OIS_DYNAMIC_LIB; ZLIB_WINAPI" 12 12 WarningLevel="3" -
code/branches/input/visual_studio/core_properties.vsprops
r1193 r1195 12 12 <Tool 13 13 Name="VCLinkerTool" 14 AdditionalDependencies="OgreMain$(CSS).lib ois-1.2.0$(CS).liblua-5.1$(CS).lib"14 AdditionalDependencies="OgreMain$(CSS).lib lua-5.1$(CS).lib" 15 15 /> 16 16 </VisualStudioPropertySheet> -
code/branches/input/visual_studio/orxonox_properties.vsprops
r1193 r1195 14 14 <Tool 15 15 Name="VCLinkerTool" 16 AdditionalDependencies="OgreMain$(CSS).lib ois-1.2.0$(CS).lib"16 AdditionalDependencies="OgreMain$(CSS).lib" 17 17 OutputFile="$(OutDir)$(ProjectName)$(CS).exe" 18 18 IgnoreDefaultLibraryNames="" -
code/branches/input/visual_studio/orxonox_vc8.sln
r1193 r1195 7 7 EndProjectSection 8 8 ProjectSection(ProjectDependencies) = postProject 9 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86} 9 10 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC} 10 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}11 11 EndProjectSection 12 12 EndProject … … 18 18 ProjectSection(ProjectDependencies) = postProject 19 19 {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626} = {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626} 20 {9CC704CB-4956-4479-BDEC-57CBC03F700E} = {9CC704CB-4956-4479-BDEC-57CBC03F700E} 21 {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F} 20 22 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC} 21 {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F}22 23 EndProjectSection 23 24 EndProject … … 28 29 EndProjectSection 29 30 ProjectSection(ProjectDependencies) = postProject 31 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86} 30 32 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC} 31 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}32 33 EndProjectSection 33 34 EndProject … … 38 39 EndProjectSection 39 40 ProjectSection(ProjectDependencies) = postProject 41 {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626} = {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626} 40 42 {35575B59-E1AE-40E8-89C4-2862B5B09B68} = {35575B59-E1AE-40E8-89C4-2862B5B09B68} 43 {9CC704CB-4956-4479-BDEC-57CBC03F700E} = {9CC704CB-4956-4479-BDEC-57CBC03F700E} 44 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC} 41 45 {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F} 46 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86} 42 47 {4733BD1A-E04C-458D-8BFB-5010250EA497} = {4733BD1A-E04C-458D-8BFB-5010250EA497} 43 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}44 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}45 48 EndProjectSection 46 49 EndProject … … 58 61 EndProject 59 62 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tolua", "vc8\tolua.vcproj", "{35E36A06-0A5C-4A0D-9AB6-5A05EAA87626}" 63 ProjectSection(WebsiteProperties) = preProject 64 Debug.AspNetCompiler.Debug = "True" 65 Release.AspNetCompiler.Debug = "False" 66 EndProjectSection 67 EndProject 68 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ois", "vc8\ois.vcproj", "{9CC704CB-4956-4479-BDEC-57CBC03F700E}" 60 69 ProjectSection(WebsiteProperties) = preProject 61 70 Debug.AspNetCompiler.Debug = "True" … … 117 126 {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626}.static_libs_release|Win32.ActiveCfg = Release|Win32 118 127 {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626}.static_libs_release|Win32.Build.0 = Release|Win32 128 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.Debug|Win32.ActiveCfg = Debug|Win32 129 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.Debug|Win32.Build.0 = Debug|Win32 130 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.Release|Win32.ActiveCfg = Release|Win32 131 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.Release|Win32.Build.0 = Release|Win32 132 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.static_libs_debug|Win32.ActiveCfg = Release|Win32 133 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.static_libs_debug|Win32.Build.0 = Release|Win32 134 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.static_libs_release|Win32.ActiveCfg = Release|Win32 135 {9CC704CB-4956-4479-BDEC-57CBC03F700E}.static_libs_release|Win32.Build.0 = Release|Win32 119 136 EndGlobalSection 120 137 GlobalSection(SolutionProperties) = preSolution -
code/branches/input/visual_studio/vc8/core.vcproj
r1182 r1195 199 199 RelativePath="..\..\src\core\InputEventListener.cc" 200 200 > 201 <FileConfiguration 202 Name="Debug|Win32" 203 ExcludedFromBuild="true" 204 > 205 <Tool 206 Name="VCCLCompilerTool" 207 /> 208 </FileConfiguration> 209 <FileConfiguration 210 Name="Release|Win32" 211 ExcludedFromBuild="true" 212 > 213 <Tool 214 Name="VCCLCompilerTool" 215 /> 216 </FileConfiguration> 201 217 </File> 202 218 <File
Note: See TracChangeset
for help on using the changeset viewer.