From: Matthijs Kooijman Date: Mon, 11 Jun 2007 07:59:58 +0000 (+0200) Subject: * Ifdef in some VideoUpdate methods (mostly empty implementations). X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e176792afe8560fc636c2313c13b3d51a14c02c2;p=matthijs%2FABM2.git * Ifdef in some VideoUpdate methods (mostly empty implementations). --- diff --git a/ABM2/Engine/VideoUpdate.cpp b/ABM2/Engine/VideoUpdate.cpp index 14f6044..21cf1ab 100755 --- a/ABM2/Engine/VideoUpdate.cpp +++ b/ABM2/Engine/VideoUpdate.cpp @@ -23,9 +23,9 @@ int CVideoUpdate::scrWidth=640; int CVideoUpdate::scrHeight=480; int CVideoUpdate::scrBPP=16; -#ifdef WIN32 CVideoUpdate::CVideoUpdate() { +#ifdef WIN32 d3d = Direct3DCreate9(D3D_SDK_VERSION); D3DPRESENT_PARAMETERS d3dpp; @@ -58,12 +58,15 @@ CVideoUpdate::CVideoUpdate() // Get the alpha information solely from the texture. d3ddev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); d3ddev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); +#endif // WIN32 } CVideoUpdate::~CVideoUpdate() { +#ifdef WIN32 if (d3ddev != NULL) d3ddev->Release(); if (d3d != NULL) d3d->Release(); +#endif // WIN32 } bool CVideoUpdate::Start() @@ -93,15 +96,18 @@ bool CVideoUpdate::Start() //hide the mouse cursor SDL_ShowCursor(SDL_DISABLE); */ +#ifdef WIN32 d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_COLORVALUE(0.0f, 0.4f, 1.0f, 1.0f), 1.0f, 0); d3ddev->BeginScene(); // begins the 3D scene +#endif // WIN32 return true; } void CVideoUpdate::Update() { +#ifdef WIN32 // end frame d3ddev->EndScene(); d3ddev->Present(NULL, NULL, NULL, NULL); @@ -109,10 +115,10 @@ void CVideoUpdate::Update() // start new frame d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_COLORVALUE(0.0f, 0.4f, 1.0f, 1.0f), 1.0f, 0); d3ddev->BeginScene(); +#endif // WIN32 } void CVideoUpdate::Stop() { // SDL_QuitSubSystem(SDL_INIT_VIDEO); } -#endif // WIN32