Sign in to follow this  
cachalongo1

rotozoomSurface fail

Recommended Posts

cachalongo1    100
Hi there, Im from argentina. I don`t speak english so i`ll try to explain my problem. This function crashes when I call rotozoomSurface. All the parameters are not null, so i don`t have a clue which the problem is. I have the same problem when the parameter is a Surface returned from MakeTextSurface from SDL_TTF library. Both problems are random. The error sais Unhandled exception at 0x0047092c in Ruleta.exe: 0xC0000005: Access violation reading location 0x01f7a448. My Function CNrosSalidos::CNrosSalidos(int x, int y, int w, int h, string dir, bool rotar) { Uint32 rmask, gmask, bmask, amask; #if SDL_BYTEORDER == SDL_BIG_ENDIAN rmask = 0xff000000; gmask = 0x00ff0000; bmask = 0x0000ff00; amask = 0x000000ff; #else rmask = 0x000000ff; gmask = 0x0000ff00; bmask = 0x00ff0000; amask = 0xff000000; #endif SDL_Surface *temp = IMG_Load(dir.c_str()); if(this->bRotar && temp) nrosRuleta = rotozoomSurface( temp, 180, 1, 1); else nrosRuleta = SDL_DisplayFormat( temp ); SDL_FreeSurface(temp); SDL_Surface *nrosSalidos = SDL_CreateRGBSurface(SCREENFLAGS, area.w, area.h, SCREENBPP, rmask, gmask, bmask, amask); } Function that throws error void transformSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth) I NEED SOME HELP PLEASE Santiago

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this