bbJoyHat() - won't compile
Archives Forums/Blitz3D SDK Programming/bbJoyHat() - won't compile
| ||
Any ideas? |
| ||
hmm? ... bbJoyHit() ... maybe! Stephan |
| ||
No I want bbjoyhat()Function bbJoyHat(port=0) Description Returns a compass angle between 0 and 360 degrees in which the direction of the D-Pad or "hat" control is being pressed. Information port number of joystick port to check (optional) bbJoyHat returns a value of -1 if the "hat" or D-Pad is currently centered. The optional port identifier provides access to a particular game controller, joystick or gamepad connected to the system and positively identified by bbJoyType. See Also: bbJoyX bbJoyY bbJoyZ bbJoyU bbJoyYaw bbJoyPitch bbJoyRoll |
| ||
I did notice that one command was missing or commented out a long time ago. Pretty sure it was this one. It was quite easy to fix tho. Are you using Bmax? |
| ||
Yes. |
| ||
Thinking back - I didn't fix it, cos it just didn't exist, I had to remove it from my Python wrapper: http://blitzmax.com/Community/posts.php?topic=70692 |
| ||
So there's no way for me to read the d-pad? |
| ||
Is this the same issue: http://www.blitzmax.com/Community/posts.php?topic=77732 If so, looks like it's due to the 360 pad and dx7 not being 100% compatible? |
| ||
Hi, I don't have a joypad right now, but this compiles/links for me: Strict Import blitz3d.blitz3dsdk bbBeginBlitz3D Print bbJoyHat(0) bbEndBlitz3D But, there appears to be a problem in commands.bmx: bbJoyHat should return a float but the max version is only returning an int. You'll need to change the function decl in commands.bmx to: Function bbJoyHat#(port=0)="bbJoyHat" I'm having a big tidy up next week of lots of stuff, so you can wait until then... |
| ||
Okay, no worries. I've postponed that 'feature' for now. |
| ||
Sorry...that was a little rude...I meant to say '*if* you can wait..'. But still, my example above compiles fine - have you tried it? Anyone else? |
| ||
It won't compile here: "undefined reference to joyhat()". But thats with an old version of the SDK. Maybe this got fixed. I did wonder whether bbJoyHat() should be a float, like other commands such as bbJoyX(). But JoyHat() is an integer in Blitz3D. It probably makes little difference as the integer value is accurate enough. For example, JoyX() is a float and so can potentially take millions of possible values. But experimentation shows that my joystick will only generate about sixty distinct values for JoyX(). And considering the tiny range of physical movement that's plenty. |
| ||
I also get the message undefined reference to `bbJoyHat', and I updated from svn one or two weeks ago. |