Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding INPUT_BUTTONS
#5
Still having some trouble.

Changed this as well:
Code:
#define MAX_INPUTS    32

I think this changes as well:

Code:
void TLN_DefineInputKey (TLN_Player player, TLN_Input input, uint32_t keycode){

    player_inputs[player].keycodes[input & 0x1F] = keycode;

}

instead of [input & 0xF]. Because 0xF --> 15 and 0x1F --> 31

But at you sure this shift doesn't change?

I'm pretty sure the culprit is this shift: 1 << input

Code:
player_inputs[player].inputs |= (1 << input);

I traced all the flow of the program until this. Desperately and without knowing what I was doing I tried without the shift or other numbers or other shifting directions but it doesn't work,

I don't quite understand what is going on with that specific shift Sad Could you please be so kind tell me how this 1 << input changes as well to allow for 32 inputs max?

I appreciate your help a lot. Thank you for your time and patience.
Reply


Messages In This Thread
Adding INPUT_BUTTONS - by JaumeAlcazo - 01-14-2019, 01:24 AM
RE: Adding INPUT_BUTTONS - by megamarc - 01-22-2019, 02:44 AM
RE: Adding INPUT_BUTTONS - by JaumeAlcazo - 01-25-2019, 07:05 AM
RE: Adding INPUT_BUTTONS - by megamarc - 01-25-2019, 09:13 AM
RE: Adding INPUT_BUTTONS - by JaumeAlcazo - 01-27-2019, 04:16 AM
RE: Adding INPUT_BUTTONS - by megamarc - 01-30-2019, 08:03 AM
RE: Adding INPUT_BUTTONS - by JaumeAlcazo - 01-31-2019, 04:02 AM
RE: Adding INPUT_BUTTONS - by megamarc - 02-02-2019, 09:28 PM
RE: Adding INPUT_BUTTONS - by JaumeAlcazo - 02-06-2019, 08:01 AM
RE: Adding INPUT_BUTTONS - by Richard Kain - 02-07-2019, 05:47 AM
RE: Adding INPUT_BUTTONS - by megamarc - 02-08-2019, 05:03 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)