Someone
public text v1 · immutable if(keystate[SDLK_SPACE])
{
int X=0;
int Y=0;
SDL_GetMouseState(&X, &Y);
double angle = (asin((Y-y)/sqrt(((double)(X-x)*(X-x) + (Y-y)*(Y-y)))));
//velx = x + z * cos(angle);
//vely = y + z * sin(angle);
particles[pnum].type = 1;
particles[pnum].x = x;
particles[pnum].y = y;
particles[pnum].velx = X < x ? -(8 * cos(angle)) : (8 * cos(angle));
particles[pnum].vely = 8 * sin(angle);
particles[pnum].timeleft = 5000;
pnum++;
if(pnum >= maxparticles)
pnum = 0;
}