Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 30, 2009, 2:22:00 AM (15 years ago)
Author:
rgrieder
Message:

Merged resource2 branch back to trunk.

IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/input/KeyBinder.h

    r3327 r5695  
    4141#include <string>
    4242#include <vector>
     43#include <boost/shared_ptr.hpp>
    4344
    4445#include "InputHandler.h"
     
    115116        };
    116117        //! Actual key bindings for joy stick buttons
    117         std::vector<JoyStickButtonVector> joyStickButtons_;
     118        std::vector<shared_ptr<JoyStickButtonVector> > joyStickButtons_;
    118119        //! Helper class to use something like std:vector<HalfAxis[48]>
    119120        struct JoyStickAxisVector
     
    123124        };
    124125        //! Actual key bindings for joy stick axes (and sliders)
    125         std::vector<JoyStickAxisVector> joyStickAxes_;
     126        std::vector<shared_ptr<JoyStickAxisVector> > joyStickAxes_;
    126127
    127128        //! Pointer map with all Buttons, including half axes
     
    191192
    192193    inline void KeyBinder::buttonPressed (unsigned int device, JoyStickButtonCode::ByEnum button)
    193     { joyStickButtons_[device][button].execute(KeybindMode::OnPress); }
     194    { (*joyStickButtons_[device])[button].execute(KeybindMode::OnPress); }
    194195
    195196    inline void KeyBinder::buttonReleased(unsigned int device, JoyStickButtonCode::ByEnum button)
    196     { joyStickButtons_[device][button].execute(KeybindMode::OnRelease); }
     197    { (*joyStickButtons_[device])[button].execute(KeybindMode::OnRelease); }
    197198
    198199    inline void KeyBinder::buttonHeld    (unsigned int device, JoyStickButtonCode::ByEnum button)
    199     { joyStickButtons_[device][button].execute(KeybindMode::OnHold); }
     200    { (*joyStickButtons_[device])[button].execute(KeybindMode::OnHold); }
    200201
    201202    inline void KeyBinder::allDevicesUpdated(float dt)
Note: See TracChangeset for help on using the changeset viewer.