Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Joystick functions
Okay...this is the first test of joystick functions I've tried in FB. I wrote up a header real quick in VB to test it out, then immediately ported it to FB. Since I just obtained a brand spankin' new gamepad which features 13 buttons (1 through 4 "action" buttons, 4 triggers on top, the typical "Start", "Select", "Mode" buttons, plus a button for each analog stick [press down on the stick]), a POV D-pad, and two analog mini-sticks (it's meant to look like a PS2 controller, but has this fan inside it which you can switch on to keep your hands cool while playing), it made for easy times testing this sucka out.

The file contains the header (, place in your /inc directory), the import library (libwinmm.a, place in your /lib directory), the demo file (joystick.exe, just run it if you've got a joystick or gamepad to test out), and the sourcecode (joystick.bas, just check it out). The POV controls utterly rock and make coding standard D-pad games soooooo much easier. But of course...I don't know if all gamepads support this, and I'm guessing the answer is a resounding NO...most gamepads out there are still analog, which means reading the X and Y axes. For my new gamepad, the X and Y axes were the first analog controller, and the Z and R axes were the second. The thing's called a Nyko AirFlo and uses the good old cross D-pad rather than the crummy circular one.
I'd knock on wood, but my desk is particle board.

Forum Jump:

Users browsing this thread: 1 Guest(s)