* Ifdef in some VideoUpdate methods (mostly empty implementations).
[matthijs/ABM2.git] / ABM2 / Engine / VideoUpdate.cpp
index 8499568c1e00ebbe9964c9b89e06481f6f0c98ea..21cf1ab3b9be296118e7b957b6578f1e2d918422 100755 (executable)
@@ -7,6 +7,7 @@
 #include "VideoUpdate.h"\r
 \r
 // include the Direct3D Library file\r
+#ifdef WIN32\r
 #pragma comment (lib, "d3d9.lib")\r
 #pragma comment (lib, "d3dx9.lib")\r
 \r
@@ -14,7 +15,7 @@
 // Construction/Destruction\r
 //////////////////////////////////////////////////////////////////////\r
 LPDIRECT3DDEVICE9 d3ddev;    // the pointer to the device class\r
-\r
+#endif //WIN32\r
 CMMPointer<Dator<int> > CVideoUpdate::screenWidth=0;\r
 CMMPointer<Dator<int> > CVideoUpdate::screenHeight=0;\r
 CMMPointer<Dator<int> > CVideoUpdate::screenBPP=0;\r
@@ -24,6 +25,7 @@ int CVideoUpdate::scrBPP=16;
 \r
 CVideoUpdate::CVideoUpdate()\r
 {\r
+#ifdef WIN32\r
        d3d = Direct3DCreate9(D3D_SDK_VERSION);\r
 \r
        D3DPRESENT_PARAMETERS d3dpp;\r
@@ -56,12 +58,15 @@ CVideoUpdate::CVideoUpdate()
     // Get the alpha information solely from the texture.\r
     d3ddev->SetTextureStageState(0, D3DTSS_ALPHAOP,   D3DTOP_SELECTARG1);\r
     d3ddev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);\r
+#endif // WIN32\r
 }\r
 \r
 CVideoUpdate::~CVideoUpdate()\r
 {\r
+#ifdef WIN32\r
     if (d3ddev != NULL) d3ddev->Release();\r
     if (d3d != NULL) d3d->Release();\r
+#endif // WIN32\r
 }\r
 \r
 bool CVideoUpdate::Start()\r
@@ -91,15 +96,18 @@ bool CVideoUpdate::Start()
        //hide the mouse cursor\r
        SDL_ShowCursor(SDL_DISABLE);\r
 */\r
+#ifdef WIN32\r
     d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_COLORVALUE(0.0f, 0.4f, 1.0f, 1.0f), 1.0f, 0);\r
 \r
     d3ddev->BeginScene();    // begins the 3D scene\r
+#endif // WIN32\r
 \r
                return true;\r
 }\r
 \r
 void CVideoUpdate::Update()\r
 {\r
+#ifdef WIN32\r
        // end frame\r
        d3ddev->EndScene();\r
        d3ddev->Present(NULL, NULL, NULL, NULL);\r
@@ -107,6 +115,7 @@ void CVideoUpdate::Update()
        // start new frame\r
        d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_COLORVALUE(0.0f, 0.4f, 1.0f, 1.0f), 1.0f, 0);\r
        d3ddev->BeginScene();\r
+#endif // WIN32\r
 }\r
 \r
 void CVideoUpdate::Stop()\r