Main Page | Modules | Related Pages

Splash-Screen Functions

Functions


Function Documentation

void hel_Splash void *  pBitmap,
void *  pPalette,
u8  SplashTypeIn,
u8  SplashTypeOut,
u8  FadeInSpeed,
u8  FadeOutSpeed,
u8  WaitFrames,
u8  AfterWaitFrames
 

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) { // Initialize HAMlib ham_Init(); // Set to mode 4 (bitmap-mode) ham_SetBgMode(4); // Make a splashscreen fading-in from black to white ... hel_Splash((void*)image_Bitmap, // pBitmap (void*)image_Palette, // pPalette SPLASH_TYPE_BLACK, // SplashTypeIn SPLASH_TYPE_BLACK, // SplashTypeOut 6, // FadeInSpeed 6, // FadeOutSpeed 40, // WaitFrames 0); // AfterWaitFrames 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) { // Initialize HAMlib ham_Init(); // Set to mode 4 (bitmap-mode) ham_SetBgMode(4); // Make a splashscreen fading-in from black to white ... hel_Splash((void*)image_Bitmap, // pBitmap (void*)image_Palette, // pPalette SPLASH_TYPE_BLACK, // SplashTypeIn SPLASH_TYPE_WHITE, // SplashTypeOut 6, // FadeInSpeed 6, // FadeOutSpeed 40, // WaitFrames 0); // AfterWaitFrames // The V-RAM and Palette-RAM is cleared from last hel_Splash() call, // so we now specify NULL for pBitmap and pPalette so it uses no image not palette-data. // This way we clean make a clean white to black out-fader ... hel_Splash((void*)NULL, // pBitmap (void*)NULL, // pPalette SPLASH_TYPE_WHITE, // SplashTypeIn SPLASH_TYPE_BLACK, // SplashTypeOut 16, // FadeInSpeed 6, // FadeOutSpeed 0, // WaitFrames 10); // AfterWaitFrames while(1); return 0; }


Generated on Sun May 2 17:57:33 2004 by DoxyGen 1.3.6