Caligari_87 wrote:More likely it's a way of tracking the three-axis input for joysticks. Forward-Back, Left-Right, and Twisting. For the mouse and keyboard it won't do anything.
From what I can tell, this function doesn't allow you direct access to any input device. It only allows you to check the results. For example, if your have a joystick axis bound to "Move forward/back", then pressing the joystick forward alters the value returned by INPUT_FORWARDMOVE. If the same axis is bound to "Fly/swim up/down", then pressing the joystick forward alters the value returned by INPUT_UPMOVE.
If the axis is unbound, you cannot check it with this function. Therefore, INPUT_ROLL cannot just be some arbitrary axis available only to certain joysticks -- that axis has to be set to something in the config menu to do anything at all. And yes, this is exactly the way it should work. (We want the modder to have access to the controlled input through ZDoom, not directly to the player's devices!)
From my testing, this is what I found each axis corresponds to (From the Joystick/Mouse menus):
INPUT_PITCH -- The analog value for mouse forward/back delta (if mouselook is on), and the Look Up/Down axis in the Joystick setup menu.
INPUT_YAW -- The analog value for mouse left/right delta (if mouselook is on), and the Turn Left/Right axis in the Joystick setup menu.
INPUT_ROLL -- ?????
INPUT_FORWARDMOVE -- The Move Forward/Back axis in the Joystick setup menu.
INPUT_SIDEMOVE -- The Strafe Left/Right axis in the Joystick setup menu. (I assume this can also be mouse left/right delta if the strafe modifier key is used)
INPUT_UPMOVE -- The Fly/Swim Up/Down axis in the Joystick setup menu.
Each of these will also report values when the appropriate key bindings are pressed, so for example pressing the key bound to "+forward" results in a positive value reported from INPUT_FORWARDMOVE. (Which means it's actually safer to check the analog input, since nothing will be reported by INPUT_BUTTONS if the user has Move Forward bound to a joystick)
I still have no idea what INPUT_ROLL is for. Future expansion? I tried all the different controls and every available axis and was unable to get anything but a 0 from it with randy's test WAD.
[quote="Caligari_87"]More likely it's a way of tracking the three-axis input for joysticks. Forward-Back, Left-Right, and Twisting. For the mouse and keyboard it won't do anything.[/quote]
From what I can tell, this function doesn't allow you direct access to any input device. It only allows you to check the results. For example, if your have a joystick axis bound to "Move forward/back", then pressing the joystick forward alters the value returned by INPUT_FORWARDMOVE. If the same axis is bound to "Fly/swim up/down", then pressing the joystick forward alters the value returned by INPUT_UPMOVE. [i]If the axis is unbound, you cannot check it with this function[/i]. Therefore, INPUT_ROLL cannot just be some arbitrary axis available only to certain joysticks -- that axis has to be set to something in the config menu to do anything at all. And yes, this is exactly the way it should work. (We want the modder to have access to the controlled input through ZDoom, not directly to the player's devices!)
From my testing, this is what I found each axis corresponds to (From the Joystick/Mouse menus):
INPUT_PITCH -- The analog value for mouse forward/back delta (if mouselook is on), and the Look Up/Down axis in the Joystick setup menu.
INPUT_YAW -- The analog value for mouse left/right delta (if mouselook is on), and the Turn Left/Right axis in the Joystick setup menu.
INPUT_ROLL -- ?????
INPUT_FORWARDMOVE -- The Move Forward/Back axis in the Joystick setup menu.
INPUT_SIDEMOVE -- The Strafe Left/Right axis in the Joystick setup menu. (I assume this can also be mouse left/right delta if the strafe modifier key is used)
INPUT_UPMOVE -- The Fly/Swim Up/Down axis in the Joystick setup menu.
Each of these will also report values when the appropriate key bindings are pressed, so for example pressing the key bound to "+forward" results in a positive value reported from INPUT_FORWARDMOVE. (Which means it's actually safer to check the analog input, since nothing will be reported by INPUT_BUTTONS if the user has Move Forward bound to a joystick)
I still have no idea what INPUT_ROLL is for. Future expansion? I tried all the different controls and every available axis and was unable to get anything but a 0 from it with randy's test WAD.