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
This commit is contained in:
Maarten ter Huurne 2008-08-31 21:49:57 +00:00
parent 532c675a3a
commit d4db1a6657
2 changed files with 7 additions and 7 deletions

View File

@ -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;
}

View File

@ -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);
}