I'm implementing this map of inputs (from the gamecube title Super Smash Bros. Melee) and translating it into code for my game:
The map is depicted using hardware coordinates (the square shape of the map) while the game itself limits the range of inputs to a circle (depicted by the gray circular outline). If a hardware input is outside the range of the circular game input, then it is rounded down. This is what causes the radial patterns. Each colored section is a different output based on the input. The gray square in the center is the deadzone of the stick.
The zones "fsmash", "usmash", and "dsmash" were easy to code in. It was as simple as
if (pos.x > 0.80 || pos.x < -0.80) fsmash if (pos.y > 0.66) usmash if (pos.y < -0.66) dsmash
My question is how to incorporate the other 4 zones. It's simple for "jab" as it is in the deadzone so it will be the else condition (when pos.x && pos.y == 0) The inputs go out radially which seems to suggest it follows the same patterns as the larger zones. When inputs are outside of the black circle I have drawn, they could be rounded down then I could simply do..
if (pos.x > 0) ftilt if (pos.x < 0) jab if (pos.y > 0) utilt if (pos.y < 0) dtilt else jab
However I'm not sure of how I could implement it since the cutoff point for the outer zones was the actual implemented radius of the stick in game. Any help would be appreciated or ask if I need to clarify anything. Thanks!