OISB (new input binding/mapping library!)

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
User avatar
syd
Gnome
Posts: 362
Joined: Thu May 01, 2008 1:55 am
Location: Paris, France

Re: OISB (new input binding/mapping library!)

Post by syd »

Code: Select all


#if __cplusplus < 199711L //   if not c++0x 
#define nullptr 0
#endif

not sure it works, I'm assuming nullptr is just a '0 keyword'
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23

Re: OISB (new input binding/mapping library!)

Post by kulik »

Klaim: As I said I like the nullptr change and since OISB has nearly 0 users there is no need to be careful with the API. If the emulation is done right it's a nice change IMO.

I would suggest you to make a fork on bitbucket/anywhere else. Work in branches and I will pull the branches back upstream as time permits. If I see you are serious about this you get commit rights.
(btw: tdev also works on this project, though he also doesn't have time for it)
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56

Re: OISB (new input binding/mapping library!)

Post by Klaim »

syd> It's a simplist version but at least it would be clearer yes. The problem is the macro woudn't be correct on some compiler like VC10 that don't assume that it is fully C++11 compliant and the macro test is true.

jacmoe> I understand, no problem. I guess maybe you've thought that I wanted absolutely this suggestion to be done, but I don't really care. It's just an "easy fix" to me so I made the suggestion.

kulik> I'll do that but like you I can't work on it just right now. I'm hoping to get back to it before the end of the year. I'll fork then.

edit> I think I might be able to make minor fixes next week, I'll tell you if I do.
Kissy
Gnoblar
Posts: 16
Joined: Mon Aug 16, 2010 12:54 am
x 1

Re: OISB (new input binding/mapping library!)

Post by Kissy »

Hello,

First of all, thanks for this library it's a good starting point for a keymapping feature.
However, I have found an issue when you press both inputs at the same time (increase & decrease) using the analog emulation system.
The input value will be set to a positive value (=> increase) instead of zero.

I have made a modification on the OISBAnalogEmulation::emulateRelative function.

Here is the current code :

Code: Select all

if (decrease->isActive()) {         
    ret = ((-1.0f) * mDecreaseSpeed * delta) * mTarget->getSensitivity();
}
if (increase->isActive()) {   
     ret = ((+1.0f) * mIncreaseSpeed * delta) * mTarget->getSensitivity();
}
And this is the modification that fix the behavior :

Code: Select all

if (decrease->isActive()) {
    ret -= (mDecreaseSpeed * delta) * mTarget->getSensitivity();
}
if (increase->isActive()) {
    ret += (mIncreaseSpeed * delta) * mTarget->getSensitivity();
}
Hope it will helps someone :)

Regards
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23

Re: OISB (new input binding/mapping library!)

Post by kulik »

Thanks! Applied and pushed the patch: http://code.google.com/p/oisb/source/de ... 27e8b12d0b
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56

Re: OISB (new input binding/mapping library!)

Post by Klaim »

Hi, I'm back on this, finally able to work on my game.

I was talking before about some C++ idioms being ignored in the code, in particular use of raw pointers where it shouldn't be (I'd say the same from some parts of Ogre but it's for another time).
I'll make some improvements that will be available there: http://code.google.com/r/mjklaim-oisb/

I hope you will find them useful. I'll notice you when something is finished.