Jump to content
  • Advertisement
Sign in to follow this  

rotozoomSurface fail

This topic is 2980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!