Results 1 to 8 of 8

Thread: TBDI module Alpha 2

  1. #1
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    TBDI module Alpha 2

    Hi folks,

    friends are gone and I had some more time with the DirectInput module.
    Say goodbye to 2 functions (TBDI_INIT and TBDI_CLOSE)!
    Say hello to 18 new functions to make your life regarding joysticks easier.

    Here is the current command set:

    [code=thinbasic]n = TBDI_JoyButton ( buttonnumber AS LONG) 'Check if a button is pressed
    n = TBDI_JoyX 'Retrieve the X-Axxis (default= -1024 to 1024)
    n = TBDI_JoyY 'Retrieve the Y-Axxis (default= -1024 to 1024)
    n = TBDI_JoyZ 'Retrieve the Z-Axxis (default= -1024 to 1024)

    n = TBDI_JoyRX 'Retrieve the rotation X-Axxis (default= -1024 to 1024)
    n = TBDI_JoyRY 'Retrieve the rotation Y-Axxis (default= -1024 to 1024)
    n = TBDI_JoyrZ 'Retrieve the rotation Z-Axxis (default= -1024 to 1024)

    n = TBDI_JoyAvail 'Returns %TRUE if Joystick is available.
    n = TBDI_JoyCountBtn 'Returns the amount of buttons available
    n = TBDI_JoyCountAxes 'Returns the amount of axxis available
    n = TBDI_JoyCountPOV 'Returns the amount of POV switches available

    n = TBDI_JoyPOV( POVnumber as LONG) 'Retrieve the POV data in degree*100, POVNUMBER starts with 1
    n = TBDI_JoySlider( slidernumber as LONG) 'Retrieve slider data

    TBDI_JoySetRangeXYZ(min as LONG, max as LONG) 'Sets the range for all axxis
    TBDI_JoySetRangeX(min as LONG, max as LONG) 'Sets the range for X-axxis
    TBDI_JoySetRangeY(min as LONG, max as LONG) 'Sets the range for Y-axxis
    TBDI_JoySetRangeZ(min as LONG, max as LONG) 'Sets the range for Z-axxis

    TBDI_JoySetDeadZoneXYZ(percent as LONG) 'Sets the deadzone for all axxis
    TBDI_JoySetDeadZoneX(percent as LONG) 'Sets the deadzone for X-axxis
    TBDI_JoySetDeadZoneY(percent as LONG) 'Sets the deadzone for Y-axxis
    TBDI_JoySetDeadZoneZ(percent as LONG) 'Sets the deadzone for Z-axxis
    [/code]

    Suggestions, critics and other things are allways welcome.

    Cheers
    Michael
    Attached Files Attached Files

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736

    Re: TBDI module Alpha 2

    Now this is something !

    Really all I could imagine for joystick handling, perfect...
    Just one question - what is slider :-X

    Thanks a lot Mike,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    68
    Posts
    3,865
    Rep Power
    405

    Re: TBDI module Alpha 2

    Mike, first wonderful list of commands. Thanks so much. Will give us lots to play with in the coming months!

    Petr, the slider is used as a throttle control on most joysticks and it looks like and is a slider on most joysticks. In some cases, a one axis rotation finger control is used as in my Logitech Extreme 3DPro joystick.

    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #4
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: TBDI module Alpha 2

    Yip, Kent said it. But I couldn't test it so far, so I don't know how it reacts.

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: TBDI module Alpha 2

    Mike,

    thanks a lot for this new version. A lot of new functions. They will give a new immersions in next games. I think all next version games will have to manage keyboards, joystick and possibly mouse. But it will depend on game.

    Few little problems.

    If no joystick is present a messagebox appear. I think you have used standard MSGBOX from Power Basic. Problem is that it reports "PowerBasic" in caption.
    I think no messagebox should appear but a user function should be developed giving the user the option to check if a gamepad is present or not.

    Created forum keywords for automatic syntax highlight. Some keywords are not highlighted in above post because keywords found in module have different names. For example in module I've found "TBDI_JOYSLIDER" and not "TBDI_SLIDER". It seems the word "JOY" is missing in some keywords.

    Keywords found in TBDI module are the following:
    [code=thinbasic]TBDI_JOYAVAIL
    TBDI_JOYBUTTON
    TBDI_JOYCOUNTAXES
    TBDI_JOYCOUNTBTN
    TBDI_JOYCOUNTPOV
    TBDI_JOYPOV
    TBDI_JOYRX
    TBDI_JOYRY
    TBDI_JOYRZ
    TBDI_JOYSETDEADZONEX
    TBDI_JOYSETDEADZONEXYZ
    TBDI_JOYSETDEADZONEY
    TBDI_JOYSETDEADZONEZ
    TBDI_JOYSETRANGEX
    TBDI_JOYSETRANGEXYZ
    TBDI_JOYSETRANGEY
    TBDI_JOYSETRANGEZ
    TBDI_JOYSLIDER
    TBDI_JOYX
    TBDI_JOYY
    TBDI_JOYZ[/code]

    Ciao
    Eros
    Attached Images Attached Images
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: TBDI module Alpha 2

    Do, I should have taken that out. I will remove it. Thanks for spotting it.

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: TBDI module Alpha 2

    Help almost finished.
    Module and help material will be present in next preview release.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #8
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: TBDI module Alpha 2

    Hi Eros,

    please download again, I took the msgbox out. I forgot to change the commands inside the textfile, but for the helpfile you will use the correct ones, right?
    Thanks for the effort.

    Michael

Similar Threads

  1. Re: TBDI Module Alpha 3
    By ErosOlmi in forum TBDI Bug report
    Replies: 2
    Last Post: 16-03-2007, 17:17

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •