From d4db1a6657c988a667b890c0868bdf7e9489baf7 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 31 Aug 2008 21:49:57 +0000 Subject: [PATCH] Changed BYTE* to u8* after all, since these pointers are not directly related to Windows API. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@411 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp | 8 ++++---- Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp index 0d105f43b6..546610bbc1 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.cpp @@ -3,7 +3,7 @@ namespace D3D { - LPDIRECT3DTEXTURE9 CreateTexture2D(const BYTE* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt) + LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt) { DWORD *pBuffer = (DWORD *)buffer; LPDIRECT3DTEXTURE9 pTexture; @@ -33,7 +33,7 @@ namespace D3D { for (int y = 0; y < height; y++) { - DWORD* pBits = (DWORD*)((BYTE*)Lock.pBits + (y * Lock.Pitch)); + DWORD* pBits = (DWORD*)((u8*)Lock.pBits + (y * Lock.Pitch)); memcpy(pBits,pIn, width * 4); pIn += pitch; } @@ -47,7 +47,7 @@ namespace D3D return pTexture; } - void ReplaceTexture2D(LPDIRECT3DTEXTURE9 pTexture, const BYTE* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt) + void ReplaceTexture2D(LPDIRECT3DTEXTURE9 pTexture, const u8* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt) { DWORD *pBuffer = (DWORD *)buffer; int level=0; @@ -60,7 +60,7 @@ namespace D3D { for (int y = 0; y < height; y++) { - DWORD* pBits = (DWORD*)((BYTE*)Lock.pBits + (y * Lock.Pitch)); + DWORD* pBits = (DWORD*)((u8*)Lock.pBits + (y * Lock.Pitch)); memcpy(pBits,pIn, width*4); pIn += pitch; } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h index 6049f557b2..878ac4ba60 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DTexture.h @@ -11,8 +11,8 @@ namespace D3D void FilterDown(DWORD *buffer, int w, int h, const int pitch); // __________________________________________________________________________________________________ // calls filterdown which will trash _pBuffer as temp storage for mips - LPDIRECT3DTEXTURE9 CreateTexture2D(const BYTE* buffer, const int width, const int height, const int pitch, D3DFORMAT fmt = D3DFMT_A8R8G8B8); - void ReplaceTexture2D(LPDIRECT3DTEXTURE9 pTexture, const BYTE* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt); + LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int height, const int pitch, D3DFORMAT fmt = D3DFMT_A8R8G8B8); + void ReplaceTexture2D(LPDIRECT3DTEXTURE9 pTexture, const u8* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt); LPDIRECT3DTEXTURE9 CreateRenderTarget(const int width, const int height); LPDIRECT3DSURFACE9 CreateDepthStencilSurface(const int width, const int height); -} \ No newline at end of file +}