You know if you just use drawblock, then you won't need to use the cls color or clear the screen before you draw. You are basically drawing your image minus all the black pixels, on top of a black background which fills the back pixels in again.
Also you may get a speed increase if instead of having one array, you have three, and when you initially start the fade you split the RGB components up into these arrays. Then when you're actually fading you won't have to do that conversion for every pixel.
That will waste an additional four megs of ram, but what else were you planning to do with it? :-)
Also you may get a speed increase if instead of having one array, you have three, and when you initially start the fade you split the RGB components up into these arrays. Then when you're actually fading you won't have to do that conversion for every pixel.
That will waste an additional four megs of ram, but what else were you planning to do with it? :-)