Esempio n. 1
0
void TextSprite::SetText(const std::wstring text)
{
	if (text != m_text)
	{
		m_text = text;
		VOnRestore();
	}
}
    // ////////////////////////////////////////////////////////////////////
    //
    // ////////////////////////////////////////////////////////////////////
    void *DirectSound8AudioBuffer::VGet()
    {
        if(!VOnRestore()) {
            GF_LOG_TRACE_ERR("DirectSound8AudioBuffer::VGet()", "Failed to restore the buffer");
            return (NULL);
        }

        return (m_Sample);
    }
Esempio n. 3
0
    DefaultWinInputHandler::DefaultWinInputHandler(void) : m_hwnd(NULL)
    {
        for(uint i = 0; i < 0xFE; ++i)
        {
            m_isKeyDown[i] = false;
        }
        VPushKeyListener(&g_keyAdapter);
        VPushMouseListener(&g_mouseAdapter);

        VOnRestore();
    }
Esempio n. 4
0
HRESULT TextSprite::VOnRender(double fTime, float fElapsedTime)
{
	CPoint actualPos( m_Position - m_Hotspot );
	CRect sourceRect( CPoint(0,0), CPoint(m_Width-1, m_Height-1 ) );

	// Adjust for the frame
	sourceRect.top += ( m_CurrentFrame * m_TextureHeight );
	sourceRect.bottom += ( m_CurrentFrame * m_TextureHeight );

	Vec3 center(1.0f, 1.0f, 0.0f);
	Vec3 translation((const float)actualPos.x, (const float)actualPos.y, 0.0f);

	if (m_d3dSprite && m_pTexture)
	{
		m_d3dSprite->Begin(D3DXSPRITE_ALPHABLEND);
		VOnRestore();
		m_d3dSprite->End();
	}

	return S_OK;
}