Hi. Title.
For convenience, let's say the input variables are called IX and IY.
STICK OUT IX, IYI'm interested in seeing the cleanest, most efficient code we could use to have the D-pad give the same outputs as the stick. Bonus points if it's a function. Maybe something like this:
'B is for the BUTTON() input DEF DPAD B OUT IX, IY IX=0:IY=0 IF (B AND 1)!=0 THEN IX=0:IY=-0.875 IF (B AND 2)!=0 THEN IX=0:IY=0.875 IF (B AND 4)!=0 THEN IX=-0.875:IY=0 IF (B AND 8)!=0 THEN IX=0.875:IY=0 'More IF statements for all 4 diagonals... ENDI know it isn't necessary to have the function ask for B (we could just do B=BUTTON() in the function itself) but most programs also use other buttons, so it seems better to only do B=BUTTON() once at the beginning of the program's main loop. So yeah, is this the most efficient way? And what IX and IY values should we use for the diagonal inputs if we want them to feel the same as the stick?