// Initialize a conversation. When NULL is being passed create some standard objects for them void CConversation::Init (sf::RenderWindow *pWindow, CTextArea *pTextArea, map<int, SCharacter *> *pCharacters, vector<string> *pFlags) { m_pWindow = pWindow; SetTextArea (pTextArea); SetCharacters (pCharacters); SetFlags (pFlags); SetHidden (false); // initialize the background m_Background.Init (m_pWindow); // Define the Default effects m_DefaultBGIn.m_Type = GFXEffect::FADE; // Fade the scenes in m_DefaultBGIn.m_fStartingValue = 0; m_DefaultBGIn.m_fTargetValue = 255; m_DefaultBGIn.m_fDuration = 1; m_DefaultBGOut.m_Type = GFXEffect::FADE; // Fade the scenes out m_DefaultBGOut.m_fStartingValue = 255; m_DefaultBGOut.m_fTargetValue = 0; m_DefaultBGOut.m_fDuration = 1; // Go to the first scene m_CurScene = 0; }
void ScreenSelectMode::HandleScreenMessage( const ScreenMessage SM ) { switch( SM ) { case SM_MenuTimer: { m_bSelected = true; SetCharacters(); } break; } ScreenSelect::HandleScreenMessage(SM); }
void ScreenSelectMode::MenuStart( PlayerNumber pn ) { if(!m_bSelected && USECONFIRM == 1) { m_soundConfirm.Play(); m_ScrollingList.StartBouncing(); m_bSelected = true; return; } m_soundStart.Play(); SetCharacters(); OFF_COMMAND( m_ScrollingList ); OFF_COMMAND( m_Guide ); OFF_COMMAND( m_ChoiceListHighlight ); OFF_COMMAND( m_ChoiceListFrame ); for(int i=0; i<NUM_PLAYERS; i++) OFF_COMMAND( m_CurChar[i] ); SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0.5f ); }