Need help with RotoZoom

need help with RotoZoom…------------------------------------------------------------------------------

SDL_Surface temp = *visuals->SpriteBMP[0];

SDL_Surface temp2 = rotozoomSurface(temp, 0, 2, 1);

SDL_Rect destinationRectangle;
destinationRectangle.x = 0;
destinationRectangle.y = 0;

SDL_BlitSurface(temp2, NULL, visuals->Screen, &destinationRectangle);

SDL_Flip(visuals->Screen);


ERRORS:

1>------ Build started: Project: LettersFall, Configuration: Release Win32

1>Compiling…
1>Game.cpp
1>.\Game.cpp(2054) : error C2664: ‘rotozoomSurface’ : cannot convert
parameter 1 from ‘SDL_Surface’ to 'SDL_Surface *'
1> No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
1>.\Game.cpp(2063) : error C2664: ‘SDL_UpperBlit’ : cannot convert parameter
1 from ‘SDL_Surface’ to 'SDL_Surface *'
1> No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
1>Build log was saved at "file://c:\Documents (file://c:\Documents) and
Settings\JeZ-l-Lee\My Documents\Visual Studio
2005\Projects\LettersFall\LettersFall\TetriBattle3_100Percent\Release\BuildLog.htm"
1>LettersFall - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Hello SlntHero,

Wednesday, August 23, 2006, 3:31:46 PM, you wrote:

need help with RotoZoom…

SDL_Surface temp = *visuals->SpriteBMP[0];

SDL_Surface temp2 = rotozoomSurface(temp, 0, 2, 1);

Your error is there.

They should be SDL_Surface *, pointers…–
Best regards,
Peter mailto:@Peter_Mulholland

SDL_Surface temp = *visuals->SpriteBMP[0];
SDL_Surface temp2 = rotozoomSurface(temp, 0, 2, 1);

1>.\Game.cpp(2054) : error C2664: ‘rotozoomSurface’ : cannot convert
parameter 1 from ‘SDL_Surface’ to ‘SDL_Surface *’

Seems pretty straight-forward, rootzoomSurface expects a pointer to a
surface, but you’re giving it a concrete surface.

Maybe “SDL_Surface* temp = visuals->SpriteBMP[0];” instead? (I’m just
guessing. Maybe it returns a pointer too?)

(RFC: A ‘sdl-libdev’ for only library development talk?)On Wed, 23 Aug 2006 16:31:46 +0200, wrote: