Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned char joypadTable[3][3] =
- { SLOT_UNDEFINED, 4, 0,
- 6, 5, 7,
- 2, 3, 1
- };
- unsigned char GetNewWheelSlot_Joypad(int player)
- {
- CPad *pad = GetPad(player);
- float x = (float)pad->NewState.RightStickX / 128.0f;
- float y = (float)pad->NewState.RightStickX / 128.0f;
- int tbl_x = 0, tbl_y = 0;
- if(x > CControls::m_fStickSensitivity)
- tbl_x = 1;
- else if(x < -CControls::m_fStickSensitivity)
- tbl_x = 2;
- if(y > CControls::m_fStickSensitivity)
- tbl_y = 1;
- else if(y < -CControls::m_fStickSensitivity)
- tbl_y = 2;
- return joypadTable[tbl_x][tbl_y];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement