I suggested to CJ to add the option to remove the alpha channels when creating a DynamicSprite from an existing 32-bit sprite. Not sure if it got tracker'ered, but if it is implemented it would be an option for you.
Edit: Just did a search and the suggestion is in the tracker at http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=527
Also, for inspiration to your FadeScreen function, check out the entire script of my FadeNonBlocking module below. It needs a few tweaks (such as what happens if you fade out before the screen is faded in entirely), but works nicely as is. It uses a full-screen black GUI and changes its transparency. Of course the color of the GUI could be changed to fade to white, red or whatever instead of black. As the name says, it's not blocking unlike FadeIn/FadeOut, and it allows very slow fades as well.
Code: ags
Edit: Just did a search and the suggestion is in the tracker at http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=527
Also, for inspiration to your FadeScreen function, check out the entire script of my FadeNonBlocking module below. It needs a few tweaks (such as what happens if you fade out before the screen is faded in entirely), but works nicely as is. It uses a full-screen black GUI and changes its transparency. Of course the color of the GUI could be changed to fade to white, red or whatever instead of black. As the name says, it's not blocking unlike FadeIn/FadeOut, and it allows very slow fades as well.
// Main script for module 'FadeNonBlocking'
int fadeintimer;
int fadeouttimer;
float fadetransparency;
float fademodifier;
function FadeInNonBlocking(int time) {
fadetransparency = 0.0;
fadeintimer = time;
fademodifier = IntToFloat(100)/IntToFloat(time);
}
function FadeOutNonBlocking(int time) {
fadetransparency = 100.0;
fadeouttimer = time;
fademodifier = IntToFloat(100)/IntToFloat(time);
}
function repeatedly_execute_always() {
if (fadeintimer > 0) {
fadetransparency = fadetransparency + fademodifier;
if (fadetransparency <= 100.0) gFadetoblack.Transparency = FloatToInt(fadetransparency);
else gFadetoblack.Transparency = 100;
fadeintimer--;
}
else if (fadeouttimer > 0) {
fadetransparency = fadetransparency - fademodifier;
if (fadetransparency >= 0.0) gFadetoblack.Transparency = FloatToInt(fadetransparency);
else gFadetoblack.Transparency = 0;
fadeouttimer--;
}
}