|
Displays a Splash-Screen in mode 3, 4 or 5.
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; } |