Okay I know I'm missing some basic concept of working with buffers and surfaces.
Here's how far I've gotten.
Over the duration of 5 frames I have an long value called "lDissolve" which holds the time in milliseconds for the wipe effect. It starts at 0 and increments 5 times evenly to 65535.
Here is the wipe that I call :
display->Wipe(&esBlended;, &display-;>buffer,&esAnimBG;,lDissolve,EWIPE_BLEND,NULL,0);
I created the empty destination surface as "esBlended" note that this surface has only been declared in the member variables and nothing more has been done to it.
My first source surface "esAnimBG" is a set to hold a png image and is done so during the OnDisplayInit() function. Please note during the blend a RECT structure is set to 5 different locations of the esAnimBG surface to provide an opening animation effect.
My second source surface is the buffer which contains the captured screen before the program runs...so in this case it would be a screen capture of the today screen. I have created filled the buffer with this image data by adding the above mentioned flag "EFL_SCREENCAPTURE".
Now I can't seem to get the blend effect between the two source surfaces perfectly. I have managed to get a halfway decent blend but it looks terrible as it shows all 5 frames blended together including the today screencapture from the buffer.
Please can someone point me in the right direction?
Thanks in advance!
[Edit:] Try number 2:
Ok I've tried this approach as well but am still not seeing a blend effect only the normal animation. Here's what I did :
- Code:
myDisplay.buffer.BltFast(0,0,&esAnimBG;,&rArea;);
display->Wipe(&esBlended;, &display-;>buffer,&myDisplay;.buffer,lDissolve,EWIPE_BLEND,NULL,0);
SetNextFrame(display);
display->BltFast(0,0,&esBlended;,&rBlendRect;);
I thought the above would work but it doesn't...What I tried to do in the above code was. First Blit the animation frame to a ClassEDisplay object I instasiated as a member variable. Then I performed the wipe using the buffer from the display object and the one I created that holds the animation frame. I then Blit the resulting surface and it only shows the animation frame with no blending???? Am I on the right track please?
[Solution!!!]
Ok so it took me a few hours of tinkering but basically you must initialize ALL surfaces you wish to use. you can do this either by populating image data from a file into the assigned memory of the surface or you can just state the size and set it to EST_DEFAULT. Then you can just BLTFAST function the actual surface and either a display->buffer or another actual surface. For the Blend effect I just made used an incremental EFX_OPACITY which gave an even better effect. I LOVE THIS LIBRARY!!!
Another Question maybe easier to answer...How do I capture what's in the display memory (ie Today Screen) before the application resumes from a onRestore() call??
Thanks in Advance.