Mine
public c v1 · immutablevoid tracer_ligne(SDL_Surface *image, int x0, int y0, int angle, int taille){ SDL_Surface *point = NULL; SDL_Rect coords; int x = x0; int y = y0; int taille_tmp = 0; while (taille_tmp <= taille) { coords.x = x; coords.y = y; taille_tmp++; point = SDL_CreateRGBSurface(SDL_HWSURFACE, 1, 1, 32, 0, 0, 0, 0); SDL_BlitSurface(point, NULL, image, &coords); //SDL_Flip(image); x = taille_tmp * cos(angle) + x0; y = y0 - taille_tmp * sin(angle); }}