//I have this FADE IN splash screen

// Question HOW TO CENTER THE PANEL OR BMP

#include <acknex.h>
#include <default.c>


BMAP* splashing = "SplashScreen.pcx"; //Set the bitmap


function call_splash()
{
video_switch(7,32,1);

// Black background
sky_color.red = 0;
sky_color.green = 0;
sky_color.blue = 0;

mouse_mode = 2;
level_load(NULL);

PANEL* splashscreeny = pan_create("flags=SHOW | TRANSLUCENT;", 999); //create a panel at 0,0 at runtime

//Splash properties on start
splashscreeny.alpha = 0; // Start alpha of the Panel to 0
splashscreeny.bmap = splashing; // NOW add the bmap to the Panel


//Fade in
while(splashscreeny.alpha < 99) // make the Panel visible Loop
{
splashscreeny.alpha += 0.5*time_step; // increase the 1 to make the visible effect faster
wait(1);
}
splashscreeny.alpha = 100; // maks sure the Panel is fully visible
wait(-2); // wait 2 seconds before making it invisible again
while(splashscreeny.alpha > 99) // make the Panel invisible Loop
{
splashscreeny.alpha -= 1*time_step; // dencrease the 1 to make the invisible effect slower
wait(1);
}

//end of splashscreen
}


function main()
{
call_splash();


}