SDL_BlitSurface(), where's the x,y?
I am playing around with SDL, and I can''t get a bitmap to show up anywhere on the screen other than the top left corner. How do you control where on the screen the bitmap will appear?
SDL_Rect dest = {x, y, 0, 0};
SDL_BlitSurface(image, NULL, screen_surface, &dest);
Note that the w and h members of the destination rectangle are ignored by SDL_BlitSurface, and the destination rectangle will probably be modified by SDL_BlitSurface to report how the image got clipped.
SDL_BlitSurface(image, NULL, screen_surface, &dest);
Note that the w and h members of the destination rectangle are ignored by SDL_BlitSurface, and the destination rectangle will probably be modified by SDL_BlitSurface to report how the image got clipped.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement