hi all,
i am working on the splash screen atm... i want to display a sequence of images with the fadin effect when the images are switching...
i am confused abt fade in and fade out... do i need to use both of them???? do i call them inside, before or after the main game loop???
how can i associate it with just a particular rect or image and not the whole screen???
images in a sequence..
-
- Posts: 395
- Joined: Fri Apr 08, 2005 8:46 pm
-
- Posts: 395
- Joined: Fri Apr 08, 2005 8:46 pm
I was thinking of stretching a quad or billboard right in front of the camera so it takes up the entire screen. Then you attach a textureanimator to that node, and the images do the fading in and fading out for you. The other possibility would be the IMovie class from the wiki (irrforge.org) if you are windows only. It allows you to play an avi file.
If the quad billboard/covers the camera, it should be like a cutscene.
HTH
If the quad billboard/covers the camera, it should be like a cutscene.
HTH
Both of these sound like very plausible solutions but I am in the exact same situation but looking for a slightly easier fix. Would it not be possible to reuse the code:
Which is automatically generated by irrWizard to create the generic splash screen? I can't figure out exactly how to get it to work properly...can anybody show me the right method?[/code]
Code: Select all
void CGameIntroState::Init(CGameManager * pManager)
{
m_pIntroImage = pManager->getGUIEnvironment()->addImage(irr::core::rect< irr::s32 >(256,128,1024,768));
m_pIntroImage->setImage(pManager->getDriver()->getTexture("media/splash.jpg"));
CGameState::FadeInOut(pManager);
m_iCounter = 0;
pManager->getDevice()->getCursorControl()->setVisible(false);
pManager->getSoundManager()->PlaySong("media/sounds/IrrlichtTheme.mp3");
}