Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1195 for code


Ignore:
Timestamp:
Apr 27, 2008, 6:20:12 PM (17 years ago)
Author:
rgrieder
Message:
  • added OIS to the orxonox src directory
  • adapted VS files
Location:
code/branches/input
Files:
62 added
15 edited

Legend:

Unmodified
Added
Removed
  • code/branches/input/CMakeLists.txt

    r1126 r1195  
    5353#Performs the search and sets the variables
    5454FIND_PACKAGE(OGRE)
    55 FIND_PACKAGE(OIS)
     55#FIND_PACKAGE(OIS)
    5656# FIND_PACKAGE(CEGUI)
    5757# FIND_PACKAGE(CEGUI_OGRE)
     
    6767LINK_DIRECTORIES(
    6868  ${OGRE_LIB_DIR}
    69   ${OIS_LIB_DIR}
     69#  ${OIS_LIB_DIR}
    7070#  ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR}
    7171  ${ENet_LIBRARY}
     
    7777INCLUDE_DIRECTORIES(
    7878  ${OGRE_INCLUDE_DIR}
    79   ${OIS_INCLUDE_DIR}
     79#  ${OIS_INCLUDE_DIR}
    8080#  ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}
    8181  ${ENet_INCLUDE_DIR}
  • code/branches/input/src/CMakeLists.txt

    r1153 r1195  
    22INCLUDE_DIRECTORIES(orxonox)
    33INCLUDE_DIRECTORIES(util/tolua)
     4INLUCDE_DIRECTORIES(ois)
    45
     6ADD_SUBDIRECTORY(ois)
    57ADD_SUBDIRECTORY(util)
    68ADD_SUBDIRECTORY(core)
  • code/branches/input/src/core/CMakeLists.txt

    r1153 r1195  
    5050TARGET_LINK_LIBRARIES(core
    5151  ${Lua_LIBRARIES}
    52   ${OIS_LIBRARIES}
    5352  ${OGRE_LIBRARIES}
     53  ois
    5454  util
    5555)
  • code/branches/input/src/core/InputBuffer.h

    r1193 r1195  
    3535#include <list>
    3636
    37 #include <OIS/OISKeyboard.h>
     37#include "ois/OISKeyboard.h"
    3838
    3939namespace orxonox
  • code/branches/input/src/core/InputManager.cc

    r1193 r1195  
    155155    try
    156156    {
    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)
    162158      {
    163159        keyboard_ = (OIS::Keyboard*)inputSystem_->createInputObject(OIS::OISKeyboard, true);
     
    185181    try
    186182    {
    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)
    192184      {
    193185        mouse_ = static_cast<OIS::Mouse*>(inputSystem_->createInputObject(OIS::OISMouse, true));
     
    212204  void InputManager::_initialiseJoySticks()
    213205  {
    214 #if (OIS_VERSION >> 8) == 0x0100
    215     if (inputSystem_->numJoySticks() > 0)
    216     {
    217       _setNumberOfJoysticks(inputSystem_->numJoySticks());
    218 #elif (OIS_VERSION >> 8) == 0x0102
    219206    if (inputSystem_->getNumberOfDevices(OIS::OISJoyStick) > 0)
    220207    {
    221208      _setNumberOfJoysticks(inputSystem_->getNumberOfDevices(OIS::OISJoyStick));
    222 #endif
    223209      for (std::vector<OIS::JoyStick*>::iterator it = joySticks_.begin(); it != joySticks_.end(); it++)
    224210      {
     
    371357
    372358  // ###############################
    373   // ###  Public Member Methods  ###
     359  // ###    Interface Methods    ###
    374360  // ###############################
    375361
    376362  /**
    377     @brief Updates the InputManager
     363    @brief Updates the InputManager. Tick is called by Orxonox.
    378364    @param dt Delta time
    379365  */
     
    394380        this->bKeyBindingsActive_            = true;
    395381        this->bMouseButtonBindingsActive_    = true;
    396         //this->bJoySticksButtonBindingsActive_ = true;
     382        for (unsigned int i = 0; i < joySticks_.size(); i++)
     383          this->bJoyStickButtonBindingsActive_[i] = true;
    397384        break;
    398385
     
    404391        this->listenersKeyActive_.clear();
    405392        this->listenersMouseActive_.clear();
    406         //this->listenersJoyStickActive_.clear();
     393        this->listenersJoySticksActive_.clear();
    407394        this->bKeyBindingsActive_            = false;
    408395        this->bMouseButtonBindingsActive_    = true;
    409         //this->bJoyStickButtonBindingsActive_ = true;
     396        for (unsigned int i = 0; i < joySticks_.size(); i++)
     397          this->bJoyStickButtonBindingsActive_[i] = true;
    410398        if (listenersKey_.find("buffer") != listenersKey_.end())
    411399          listenersKeyActive_.push_back(listenersKey_["buffer"]);
     
    421409        this->listenersKeyActive_.clear();
    422410        this->listenersMouseActive_.clear();
    423         //this->listenersJoyStickActive_.clear();
     411        this->listenersJoySticksActive_.clear();
    424412        this->bKeyBindingsActive_            = false;
    425413        this->bMouseButtonBindingsActive_    = false;
    426         //this->bJoyStickButtonBindingsActive_ = false;
     414        for (unsigned int i = 0; i < joySticks_.size(); i++)
     415          this->bJoyStickButtonBindingsActive_[i] = false;
    427416        break;
    428417
    429418      case IS_CUSTOM:
    430419        // don't do anything
     420        break;
     421
     422      case IS_UNINIT:
     423        // this can't happen
    431424        break;
    432425      }
     
    619612  }
    620613
     614  /*bool InputManager::initialiseKeyboard()
     615  {
     616  }
     617
     618  bool InputManager::initialiseMouse()
     619  {
     620  }
     621
     622  bool InputManager::initialiseJoySticks()
     623  {
     624  }*/
     625
    621626  bool InputManager::addKeyListener(OIS::KeyListener *listener, const std::string& name)
    622627  {
  • code/branches/input/src/core/InputManager.h

    r1193 r1195  
    4040#include <map>
    4141#include <list>
    42 #include <OIS/OIS.h>
    43 
     42
     43#include "ois/OIS.h"
    4444#include "Tickable.h"
    4545#include "InputEvent.h"
  • code/branches/input/src/orxonox/CMakeLists.txt

    r1153 r1195  
    5555  ${OGRE_LIBRARIES}
    5656  ${Lua_LIBRARIES}
     57  ois
    5758  util
    5859  core
  • code/branches/input/src/orxonox/OrxonoxStableHeaders.h

    r1065 r1195  
    7979#include <OgreWindowEventUtilities.h>
    8080
    81 #include <OIS/OIS.h>
    82 
    8381//-----------------------------------------------------------------------
    8482// ORXONOX HEADERS
    8583//-----------------------------------------------------------------------
     84
     85#include "ois/OIS.h"
    8686
    8787//#include "util/Convert.h"
  • code/branches/input/src/orxonox/objects/SpaceShip.cc

    r1182 r1195  
    3232#include <string>
    3333
    34 #include <OIS/OIS.h>
    3534#include <OgreCamera.h>
    3635#include <OgreRenderWindow.h>
     
    3837#include <OgreSceneNode.h>
    3938
     39#include "ois/OIS.h"
    4040#include "util/tinyxml/tinyxml.h"
    4141#include "util/Convert.h"
  • code/branches/input/src/orxonox/objects/SpaceShip.h

    r1056 r1195  
    3333
    3434#include <OgrePrerequisites.h>
    35 #include <OIS/OISMouse.h>
    3635
     36#include "ois/OISMouse.h"
    3737#include "Model.h"
    3838#include "../tools/BillboardSet.h"
  • code/branches/input/visual_studio/base_properties.vsprops

    r1084 r1195  
    88        <Tool
    99                Name="VCCLCompilerTool"
    10                 AdditionalIncludeDirectories="&quot;$(RootDir)src&quot;;&quot;$(RootDir)src\orxonox&quot;;&quot;$(RootDir)src\util\tolua&quot;;&quot;$(DependencyDir)include&quot;"
     10                AdditionalIncludeDirectories="&quot;$(RootDir)src&quot;;&quot;$(RootDir)src\orxonox&quot;;&quot;$(RootDir)src\util\tolua&quot;;&quot;$(RootDir)src\ois\include&quot;;&quot;$(DependencyDir)include&quot;"
    1111                PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK;OIS_DYNAMIC_LIB; ZLIB_WINAPI"
    1212                WarningLevel="3"
  • code/branches/input/visual_studio/core_properties.vsprops

    r1193 r1195  
    1212        <Tool
    1313                Name="VCLinkerTool"
    14                 AdditionalDependencies="OgreMain$(CSS).lib ois-1.2.0$(CS).lib lua-5.1$(CS).lib"
     14                AdditionalDependencies="OgreMain$(CSS).lib lua-5.1$(CS).lib"
    1515        />
    1616</VisualStudioPropertySheet>
  • code/branches/input/visual_studio/orxonox_properties.vsprops

    r1193 r1195  
    1414        <Tool
    1515                Name="VCLinkerTool"
    16                 AdditionalDependencies="OgreMain$(CSS).lib ois-1.2.0$(CS).lib"
     16                AdditionalDependencies="OgreMain$(CSS).lib"
    1717                OutputFile="$(OutDir)$(ProjectName)$(CS).exe"
    1818                IgnoreDefaultLibraryNames=""
  • code/branches/input/visual_studio/orxonox_vc8.sln

    r1193 r1195  
    77        EndProjectSection
    88        ProjectSection(ProjectDependencies) = postProject
     9                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    910                {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
    10                 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    1111        EndProjectSection
    1212EndProject
     
    1818        ProjectSection(ProjectDependencies) = postProject
    1919                {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}
    2022                {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
    21                 {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F}
    2223        EndProjectSection
    2324EndProject
     
    2829        EndProjectSection
    2930        ProjectSection(ProjectDependencies) = postProject
     31                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    3032                {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
    31                 {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    3233        EndProjectSection
    3334EndProject
     
    3839        EndProjectSection
    3940        ProjectSection(ProjectDependencies) = postProject
     41                {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626} = {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626}
    4042                {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}
    4145                {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F}
     46                {271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
    4247                {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}
    4548        EndProjectSection
    4649EndProject
     
    5861EndProject
    5962Project("{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
     67EndProject
     68Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ois", "vc8\ois.vcproj", "{9CC704CB-4956-4479-BDEC-57CBC03F700E}"
    6069        ProjectSection(WebsiteProperties) = preProject
    6170                Debug.AspNetCompiler.Debug = "True"
     
    117126                {35E36A06-0A5C-4A0D-9AB6-5A05EAA87626}.static_libs_release|Win32.ActiveCfg = Release|Win32
    118127                {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
    119136        EndGlobalSection
    120137        GlobalSection(SolutionProperties) = preSolution
  • code/branches/input/visual_studio/vc8/core.vcproj

    r1182 r1195  
    199199                                RelativePath="..\..\src\core\InputEventListener.cc"
    200200                                >
     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>
    201217                        </File>
    202218                        <File
Note: See TracChangeset for help on using the changeset viewer.