Hello!
I have a question about SDL and drawing sprites (SDL surfaces). My idea is that the user can create a wall of separate sprites by create one sprite each time in the current mouseX and mouseY position, when the user push down the e-key. The problem is that I have no idea how I could draw the same sprite multiple times without to delete the previous one. I'm fairly new in SDL, so easy examples would be very appreciated.
sorry for bad english, and thanks for answers.
Drawing is simply the process of copying the pixels from one memory region (the target of surface->pixels) to another. To draw the same SDL_Surface several times you just call SDL_BlitSurface() with the same src and dst parameters several times.
I want to duplicate the same sprite, but in an another position. I have tried to blit it with the same src and dst... but it only replace the previous one.