Replaced type "DWORD" by "u32", except where "DWORD" is used to access the Windows API.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@429 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f3f17b4a19
commit
1154027808
|
@ -41,7 +41,7 @@ public:
|
|||
fread(&m_dolheader, 1, sizeof(SDolHeader), pStream);
|
||||
|
||||
// swap memory
|
||||
DWORD* p = (DWORD*)&m_dolheader;
|
||||
u32* p = (u32*)&m_dolheader;
|
||||
for (int i=0; i<(sizeof(SDolHeader)>>2); i++)
|
||||
p[i] = Common::swap32(p[i]);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef void (__cdecl* TVideo_Initialize)(SVideoInitialize*);
|
|||
typedef void (__cdecl* TVideo_Prepare)();
|
||||
typedef void (__cdecl* TVideo_Shutdown)();
|
||||
typedef void (__cdecl* TVideo_SendFifoData)(u8*);
|
||||
typedef void (__cdecl* TVideo_UpdateXFB)(u8*, DWORD, DWORD);
|
||||
typedef void (__cdecl* TVideo_UpdateXFB)(u8*, u32, u32);
|
||||
typedef BOOL (__cdecl* TVideo_Screenshot)(TCHAR*);
|
||||
typedef void (__cdecl* TVideo_EnterLoop)();
|
||||
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
|
||||
|
|
|
@ -44,7 +44,6 @@ typedef unsigned char u8;
|
|||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned int BOOL;
|
||||
typedef unsigned int DWORD;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
typedef char s8;
|
||||
|
|
|
@ -38,12 +38,10 @@
|
|||
|
||||
#define BOOL unsigned int
|
||||
#define WORD unsigned short
|
||||
#define DWORD unsigned int
|
||||
#define HWND void*
|
||||
#define HINSTANCE void*
|
||||
#define INT int
|
||||
#define CHAR char
|
||||
#define TCHAR char
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -23,14 +23,14 @@ typedef void (*TKeyPressed)(int keycode, BOOL shift, BOOL control); // sets th
|
|||
typedef struct
|
||||
{
|
||||
// fifo registers
|
||||
volatile DWORD CPBase;
|
||||
volatile DWORD CPEnd;
|
||||
DWORD CPHiWatermark;
|
||||
DWORD CPLoWatermark;
|
||||
volatile u32 CPBase;
|
||||
volatile u32 CPEnd;
|
||||
u32 CPHiWatermark;
|
||||
u32 CPLoWatermark;
|
||||
volatile s32 CPReadWriteDistance;
|
||||
volatile DWORD CPWritePointer;
|
||||
volatile DWORD CPReadPointer;
|
||||
volatile DWORD CPBreakpoint;
|
||||
volatile u32 CPWritePointer;
|
||||
volatile u32 CPReadPointer;
|
||||
volatile u32 CPBreakpoint;
|
||||
|
||||
volatile bool bFF_GPReadEnable;
|
||||
volatile bool bFF_BPEnable;
|
||||
|
@ -142,7 +142,7 @@ EXPORT void CALL Video_SendFifoData(u8* _uData);
|
|||
// input: pointer to the XFB, width and height of the XFB
|
||||
// output: none
|
||||
//
|
||||
EXPORT void CALL Video_UpdateXFB(u8* _pXFB, DWORD _dwWidth, DWORD _dwHeight);
|
||||
EXPORT void CALL Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight);
|
||||
|
||||
// __________________________________________________________________________________________________
|
||||
// Function: Video_Screenshot
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace D3D
|
|||
{
|
||||
LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int height,const int pitch, D3DFORMAT fmt)
|
||||
{
|
||||
DWORD *pBuffer = (DWORD *)buffer;
|
||||
u32* pBuffer = (u32*)buffer;
|
||||
LPDIRECT3DTEXTURE9 pTexture;
|
||||
|
||||
// crazy bitmagic
|
||||
|
@ -26,15 +26,15 @@ namespace D3D
|
|||
D3DLOCKED_RECT Lock;
|
||||
pTexture->LockRect(level, &Lock, NULL, 0 );
|
||||
|
||||
DWORD* pIn = pBuffer;
|
||||
u32* pIn = pBuffer;
|
||||
switch(fmt)
|
||||
{
|
||||
case D3DFMT_A8R8G8B8:
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
DWORD* pBits = (DWORD*)((u8*)Lock.pBits + (y * Lock.Pitch));
|
||||
memcpy(pBits,pIn, width * 4);
|
||||
u32* pBits = (u32*)((u8*)Lock.pBits + (y * Lock.Pitch));
|
||||
memcpy(pBits, pIn, width * 4);
|
||||
pIn += pitch;
|
||||
}
|
||||
}
|
||||
|
@ -49,18 +49,18 @@ namespace D3D
|
|||
|
||||
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;
|
||||
u32* pBuffer = (u32*)buffer;
|
||||
int level = 0;
|
||||
D3DLOCKED_RECT Lock;
|
||||
pTexture->LockRect(level, &Lock, NULL, 0 );
|
||||
DWORD* pIn = pBuffer;
|
||||
u32* pIn = pBuffer;
|
||||
switch(fmt)
|
||||
{
|
||||
case D3DFMT_A8R8G8B8:
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
DWORD* pBits = (DWORD*)((u8*)Lock.pBits + (y * Lock.Pitch));
|
||||
u32* pBits = (u32*)((u8*)Lock.pBits + (y * Lock.Pitch));
|
||||
memcpy(pBits,pIn, width*4);
|
||||
pIn += pitch;
|
||||
}
|
||||
|
|
|
@ -9,17 +9,17 @@ namespace D3D
|
|||
CD3DFont font;
|
||||
|
||||
#define MAX_NUM_VERTICES 50*6
|
||||
struct FONT2DVERTEX {
|
||||
float x,y,z;
|
||||
float rhw;
|
||||
int color;
|
||||
float tu, tv;
|
||||
struct FONT2DVERTEX {
|
||||
float x,y,z;
|
||||
float rhw;
|
||||
u32 color;
|
||||
float tu, tv;
|
||||
};
|
||||
|
||||
#define D3DFVF_FONT2DVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1)
|
||||
#define D3DFVF_FONT3DVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_NORMAL|D3DFVF_TEX1)
|
||||
|
||||
inline FONT2DVERTEX InitFont2DVertex( float x, float y, DWORD color, float tu, float tv )
|
||||
inline FONT2DVERTEX InitFont2DVertex( float x, float y, u32 color, float tu, float tv )
|
||||
{
|
||||
FONT2DVERTEX v; v.x=x; v.y=y; v.z=0; v.rhw=1.0f; v.color = color; v.tu = tu; v.tv = tv;
|
||||
return v;
|
||||
|
@ -236,7 +236,7 @@ namespace D3D
|
|||
}
|
||||
}
|
||||
|
||||
int CD3DFont::DrawTextScaled( float x, float y, float fXScale, float fYScale, float spacing, int dwColor, const char* strText, bool center )
|
||||
int CD3DFont::DrawTextScaled( float x, float y, float fXScale, float fYScale, float spacing, u32 dwColor, const char* strText, bool center )
|
||||
{
|
||||
SaveRenderStates();
|
||||
SetRenderStates();
|
||||
|
@ -356,10 +356,10 @@ namespace D3D
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
void quad2d(float x1, float y1, float x2, float y2, DWORD color, float u1, float v1, float u2, float v2)
|
||||
void quad2d(float x1, float y1, float x2, float y2, u32 color, float u1, float v1, float u2, float v2)
|
||||
{
|
||||
SaveRenderStates();
|
||||
struct Q2DVertex { float x,y,z,rhw; int color; float u, v; } coords[4] = {
|
||||
struct Q2DVertex { float x,y,z,rhw; u32 color; float u, v; } coords[4] = {
|
||||
{x1-0.5f, y1-0.5f, 0, 1, color, u1, v1},
|
||||
{x2-0.5f, y1-0.5f, 0, 1, color, u2, v1},
|
||||
{x2-0.5f, y2-0.5f, 0, 1, color, u2, v2},
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace D3D
|
|||
int Shutdown();
|
||||
int DrawTextScaled( float x, float y,
|
||||
float fXScale, float fYScale,
|
||||
float spacing, int dwColor,
|
||||
float spacing, u32 dwColor,
|
||||
const char* strText, bool center=true );
|
||||
|
||||
|
||||
|
@ -40,5 +40,5 @@ namespace D3D
|
|||
|
||||
extern CD3DFont font;
|
||||
|
||||
void quad2d(float x1, float y1, float x2, float y2, DWORD color, float u1=0, float v1=0, float u2=1, float v2=1);
|
||||
void quad2d(float x1, float y1, float x2, float y2, u32 color, float u1=0, float v1=0, float u2=1, float v2=1);
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ void Decode(void)
|
|||
u32 Cmd2 = g_pDataReader->Read32();
|
||||
|
||||
int dwTransferSize = ((Cmd2>>16)&15) + 1;
|
||||
DWORD dwAddress = Cmd2 & 0xFFFF;
|
||||
u32 dwAddress = Cmd2 & 0xFFFF;
|
||||
static u32 pData[16];
|
||||
for (int i=0; i<dwTransferSize; i++)
|
||||
pData[i] = g_pDataReader->Read32();
|
||||
|
|
|
@ -80,7 +80,7 @@ void TextureCache::Cleanup()
|
|||
}
|
||||
}
|
||||
|
||||
void TextureCache::Load(int stage, DWORD address, int width, int height, int format, int tlutaddr, int tlutfmt)
|
||||
void TextureCache::Load(int stage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt)
|
||||
{
|
||||
if (address == 0)
|
||||
return;
|
||||
|
@ -195,7 +195,7 @@ void TextureCache::Load(int stage, DWORD address, int width, int height, int for
|
|||
}
|
||||
|
||||
|
||||
void TextureCache::CopyEFBToRenderTarget(DWORD address, RECT *source)
|
||||
void TextureCache::CopyEFBToRenderTarget(u32 address, RECT *source)
|
||||
{
|
||||
TexCache::iterator iter;
|
||||
LPDIRECT3DTEXTURE9 tex;
|
||||
|
|
|
@ -30,7 +30,7 @@ class TextureCache
|
|||
};
|
||||
|
||||
|
||||
typedef std::map<DWORD,TCacheEntry> TexCache;
|
||||
typedef std::map<u32,TCacheEntry> TexCache;
|
||||
|
||||
static u8 *temp;
|
||||
static TexCache textures;
|
||||
|
@ -40,8 +40,8 @@ public:
|
|||
static void Cleanup();
|
||||
static void Shutdown();
|
||||
static void Invalidate();
|
||||
static void Load(int stage, DWORD address, int width, int height, int format, int tlutaddr, int tlutfmt);
|
||||
static void CopyEFBToRenderTarget(DWORD address, RECT *source);
|
||||
static void Load(int stage, u32 address, int width, int height, int format, int tlutaddr, int tlutfmt);
|
||||
static void CopyEFBToRenderTarget(u32 address, RECT *source);
|
||||
};
|
||||
|
||||
#endif
|
|
@ -202,7 +202,7 @@ void Video_Shutdown(void)
|
|||
DeInit();
|
||||
}
|
||||
|
||||
void Video_UpdateXFB(u8* /*_pXFB*/, DWORD /*_dwWidth*/, DWORD /*_dwHeight*/)
|
||||
void Video_UpdateXFB(u8* /*_pXFB*/, u32 /*_dwWidth*/, u32 /*_dwHeight*/)
|
||||
{
|
||||
/*
|
||||
ConvertXFB(tempBuffer, _pXFB, _dwWidth, _dwHeight);
|
||||
|
|
|
@ -218,9 +218,9 @@ void Decode(void)
|
|||
case GX_LOAD_XF_REG:
|
||||
{
|
||||
u32 Cmd2 = g_pDataReader->Read32();
|
||||
|
||||
|
||||
int dwTransferSize = ((Cmd2>>16)&15) + 1;
|
||||
DWORD dwAddress = Cmd2 & 0xFFFF;
|
||||
u32 dwAddress = Cmd2 & 0xFFFF;
|
||||
static u32 pData[16];
|
||||
for (int i=0; i<dwTransferSize; i++)
|
||||
pData[i] = g_pDataReader->Read32();
|
||||
|
|
|
@ -274,7 +274,7 @@ BOOL Video_Screenshot(TCHAR* _szFilename)
|
|||
}
|
||||
|
||||
|
||||
void Video_UpdateXFB(u8* _pXFB, DWORD _dwWidth, DWORD _dwHeight)
|
||||
void Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue