Add Direct3D 8 implementation.

Bug swiftshader:5

Change-Id: I6aec7237f2db6222702e828a2b9dae1a1a6ac9af
Reviewed-on: https://swiftshader-review.googlesource.com/7191
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/D3D9/D3D9.rc b/src/D3D9/D3D9.rc
index 9245d0c..d0ea0d0 100644
--- a/src/D3D9/D3D9.rc
+++ b/src/D3D9/D3D9.rc
@@ -7,7 +7,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "windows.h"
+#include "Windows.h"
 #include "../Common/Version.h"
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS
diff --git a/src/D3D9/Direct3DDevice9.cpp b/src/D3D9/Direct3DDevice9.cpp
index ddc6606..515ab4b 100644
--- a/src/D3D9/Direct3DDevice9.cpp
+++ b/src/D3D9/Direct3DDevice9.cpp
@@ -343,7 +343,7 @@
 
 		TRACE("unsigned long count = %d, const D3DRECT *rects = 0x%0.8p, unsigned long flags = 0x%0.8X, unsigned long color = 0x%0.8X, float z = %f, unsigned long stencil = %d", count, rects, flags, color, z, stencil);
 
-		if(rects == 0 && count != 0)
+		if(!rects && count != 0)
 		{
 			return INVALIDCALL();
 		}
diff --git a/src/D3D9/Direct3DSwapChain9.cpp b/src/D3D9/Direct3DSwapChain9.cpp
index b3d1586..4b510aa 100644
--- a/src/D3D9/Direct3DSwapChain9.cpp
+++ b/src/D3D9/Direct3DSwapChain9.cpp
@@ -184,7 +184,7 @@
 				dRect.y1 = destRect->bottom;
 			}
 
-			frameBuffer->blit(window, source, sourceRect ? &sRect : 0, destRect ? &dRect : 0, format, stride);
+			frameBuffer->blit(window, source, sourceRect ? &sRect : nullptr, destRect ? &dRect : nullptr, format, stride);
 		}
 
 		backBuffer[0]->unlockInternal();   // FIXME: External