07-08-2014, 02:49 AM
Please help. I have this code in C:
I want to do something similar in ZX Basic. I know that ZX Basic has not function pointers, but I think that you can find another good solution.
Code:
void *Input; // function pointer declare
...
/* function pointer assign */
while ( 1 ){
i= inp(0xf7fe) & 0x1f;
if( i==0x1e ){
Input= Joystick;
break;
}
else if( i==0x1d ){
Input= Cursors;
break;
}
else if( i==0x1b ){
Input= Keyboard;
break;
}
else if( i==0x17 ){
Redefine();
}
}
...
if( Input() & RIGHT ) // function pointer call
ax= vx<maxvx ? 40 : 0;
I want to do something similar in ZX Basic. I know that ZX Basic has not function pointers, but I think that you can find another good solution.