Skip to content

Instantly share code, notes, and snippets.

@kdrnic
Created May 2, 2018 04:28
Show Gist options
  • Select an option

  • Save kdrnic/90f8ec2c621ebcf8acd82a4a5d086f85 to your computer and use it in GitHub Desktop.

Select an option

Save kdrnic/90f8ec2c621ebcf8acd82a4a5d086f85 to your computer and use it in GitHub Desktop.
#include <allegro.h>
#include <stdio.h>
int main(int argc, char ** argv)
{
char lin[1024] = "v 0.123 0.456 -0.789";
float x, y, z;
allegro_init();
if(argc > 1) install_keyboard();
sscanf(lin, "%*s %f %f %f", &x, &y, &z);
printf("%f %f %f\n", x, y, z);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment