I'm trying to use SMPEG within a Kyra application, and without trying to work around Kyra and SDL, I thought the best way to do this might be to use a KrCanvas. I am trying to find a quick way to copy the SDL_Surface returned from SMPEG to the KrCanvasResource, but as of yet, I am running up against a brick wall. Any ideas?
just as a note I am able to copy it pixel by pixel (I'm getting 1 frame a sec give or take) with the following code:
for ( int i=0; i < size; i++ )
color.all = *((int*)surf->pixels + i ) + amask;
*( canvas->Pixels() + i ) = color;
I know nothing about SMPEG, but one idea is that you treat the Kyra surface as an SDL_Surface, by passing in the CanvasResource to:
and then blit to it. (Making sure you call Refresh() on the resource after the blit)
Would that work with SMPEG?
This works excellent. Thanks for the help.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.