|
Displays a Splash-Screen in mode 3, 4 or 5.
- Parameters:
-
pBitmap | : Pointer to picture-data. The image must have one of the following sizes, depending on in what mode the GBA currently is:
- Mode 3 : 240*160 pixels, 15bit BGR
- Mode 4 : 240*160 pixels, 8 bit
- Mode 5 : 160*120 pixels, 15bit BGR
|
pPalette | : Pointer to palette-data. In mode 3 and 5 set it to NULL |
SplashTypeIn | : Type of splashscreen in-fader. This can be on of these:
- SPLASH_TYPE_BLACK
- SPLASH_TYPE_WHITE
|
SplashTypeOut | : Type of splashscreen out-fader. This can be on of these:
- SPLASH_TYPE_BLACK
- SPLASH_TYPE_WHITE
|
FadeInSpeed | : Speed of in-fading process. Setting this to 6 looks nice. |
FadeOutSpeed | : Speed of out-fading process. Setting this to 6 looks nice. |
WaitFrames | : How many frames the image should be display (without fade in/out) |
AfterWaitFrames | : How many frames the function should wait before leaving |
This function is designed for bitmap modes (mode 3/4/5) and uses the special FX register.
Simple splashscreen. fades in from black and fades-out to black
int main( void)
{
ham_Init();
ham_SetBgMode(4);
hel_Splash(( void*)image_Bitmap,
( void*)image_Palette,
SPLASH_TYPE_BLACK,
SPLASH_TYPE_BLACK,
6,
6,
40,
0);
while(1);
return 0;
}
Here is an advanced version. This ones fades from black to white, then from white to black again.
int main( void)
{
ham_Init();
ham_SetBgMode(4);
hel_Splash(( void*)image_Bitmap,
( void*)image_Palette,
SPLASH_TYPE_BLACK,
SPLASH_TYPE_WHITE,
6,
6,
40,
0);
hel_Splash(( void*)NULL,
( void*)NULL,
SPLASH_TYPE_WHITE,
SPLASH_TYPE_BLACK,
16,
6,
0,
10);
while(1);
return 0;
}
|