示例#1
0
// Advances GFx animation and draws the scene.
void FxPlayerTiny::AdvanceAndDisplay()
{
    // Clear the back buffer to a black color.
    pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(200,200,200), 1.0f, 0);

    // *** GFx Rendering    
    if (pMovie)
    {
        // GRendererD3D9 does not modify D3DRS_FILLMODE, so we can set it here.
        pDevice->SetRenderState(D3DRS_FILLMODE,
            Wireframe ? D3DFILL_WIREFRAME : D3DFILL_SOLID);

        UInt32  time    = timeGetTime();
        Float   delta   = ((Float)(time - MovieLastTime)) / 1000.0f;

        // Advance time and display the movie.
        if (!Paused)
            pMovie->Advance(delta);
        pMovie->Display();

        MovieLastTime = time;
    }

    // Present the back buffer contents to the display.
    pDevice->Present(NULL, NULL, NULL, NULL);
}
示例#2
0
void FxPlayerTiny::DisplayHUD()
{
	if (pHUD) {
		pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);

        UInt32  time    = timeGetTime();
        Float   delta   = ((Float)(time - MovieLastTime)) / 1000.0f;

		pHUD->Advance(delta);
        pHUD->Display();

        MovieLastTime = time;
	}
}
示例#3
0
void FxPlayerTiny::DisplayLoginScreen()
{
    pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(200,200,200), 1.0f, 0);

    if (pMovie)
    {
        pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);

        UInt32  time    = timeGetTime();
        Float   delta   = ((Float)(time - MovieLastTime)) / 1000.0f;

        pMovie->Advance(delta);
        pMovie->Display();

        MovieLastTime = time;
    }

    pDevice->Present(NULL, NULL, NULL, NULL);
}