LTBOOL CCredits::Init(int nMode, LTBOOL bClearScreen) { // Sanity checks... Term(); // Set simple members... m_iCredit = 0; m_nMode = nMode; m_bDone = LTFALSE; m_bClearScreen = bClearScreen; s_fSpeed = DEF_CREDITS_SPEED; if (s_fFadeInTime < 0.0f) { s_fFadeInTime = g_pLayoutMgr->GetCreditsFadeInTime(); s_fHoldTime = g_pLayoutMgr->GetCreditsHoldTime(); s_fFadeOutTime = g_pLayoutMgr->GetCreditsFadeOutTime(); s_fDelayTime = g_pLayoutMgr->GetCreditsDelayTime(); s_PositionUL = g_pLayoutMgr->GetCreditsPositionUL(); s_PositionUR = g_pLayoutMgr->GetCreditsPositionUR(); s_PositionLL = g_pLayoutMgr->GetCreditsPositionLL(); s_PositionLR = g_pLayoutMgr->GetCreditsPositionLR(); } // Add all the credit objects... AddCredits(); // All done... if (m_Credits.size()) m_bInited = LTTRUE; return(LTTRUE); }
DBOOL CCredits::Init(CClientDE* pClientDE, CBloodClientShell* pClientShell, int nMode, DBOOL bClearScreen) { // Sanity checks... if (!pClientDE) return(DFALSE); if (!pClientShell) return(DFALSE); Term(); // Set simple members... m_pClientDE = pClientDE; m_pClientShell = pClientShell; m_iCredit = 0; m_nMode = nMode; m_bDone = DFALSE; m_bClearScreen = bClearScreen; s_fSpeed = DEF_CREDITS_SPEED; // Init the screen size... m_hScreen = m_pClientDE->GetScreenSurface(); if (!m_hScreen) return(DFALSE); m_pClientDE->GetSurfaceDims(m_hScreen, &m_szScreen.cx, &m_szScreen.cy); // Add all the credit objects... AddCredits(); // All done... m_bInited = DTRUE; return(DTRUE); }