So I was trying out SDL_gfx lib and tryed using the rotozoomSurface() Click Here which should've rotated my surface at runtime, but it seems that whenever I do that my surface turns invisible. It doesn't matter if I predefine the rotation or use it at runtime, the same happens, I've tryed using the other rotation functions, still the same. Any info on this?
This was just a small part of the code. I can free the "rot" surface because the "surface" already takes the rotated surface before I delete it. Like I've said, I'm using SDL for quite some time, I know how to blit properly and stuff like that, the thing is that after I use the rotation function on my surface it dissapears.
Oh my mistake, it seems that you were right about freeing the "rot" surface, since the "surface" holds the adress of it later so if I free the "rot" surface, the "surface" can't display anything.
The other thing I noticed that if I use a completely black painted surface and do everything correct, it doesnt't display the surface because it automatically makes the black color transparent, so if anyone has this problem just recolor the surface to some other color.
Anyways, thanks for your help.
The other thing that I need info on is using the rotozoomSurface() function inside my game loop, it seems if i predefine the surface's angle before the loop it rotates correctly, but if I use the function inside the loop and try to update the rotation every time, I get an unhandled exeption or a breakpoint.