void CGUIDialog::updateBackground() { if( g_pBehaviorEngine->getEngine() == ENGINE_VORTICON ) { initVorticonBackground(); } else if( g_pBehaviorEngine->getEngine() == ENGINE_GALAXY ) { initGalaxyBackround(); } else { initEmptyBackround(); } }
void CGUIDialog::initBackground() { if( g_pBehaviorEngine->getEngine() == ENGINE_VORTICON ) { const SDL_Rect lRect = g_pVideoDriver->toBlitRect(mRect); mpBackgroundSfc.reset( CG_CreateRGBSurface( lRect ), &SDL_FreeSurface ); mpBackgroundSfc.reset( SDL_DisplayFormat( mpBackgroundSfc.get() ), &SDL_FreeSurface ); initVorticonBackground( lRect ); } else if( g_pBehaviorEngine->getEngine() == ENGINE_GALAXY ) { const SDL_Rect lRect = g_pVideoDriver->getGameResolution().SDLRect(); mpBackgroundSfc.reset( CG_CreateRGBSurface( lRect ), &SDL_FreeSurface ); mpBackgroundSfc.reset( SDL_DisplayFormat( mpBackgroundSfc.get() ), &SDL_FreeSurface ); initGalaxyBackround( lRect ); } else { const SDL_Rect lRect = g_pVideoDriver->toBlitRect(mRect); mpBackgroundSfc.reset( CG_CreateRGBSurface( lRect ), &SDL_FreeSurface ); mpBackgroundSfc.reset( SDL_DisplayFormat( mpBackgroundSfc.get() ), &SDL_FreeSurface ); initEmptyBackround(); } }