cleanup of textures and fix of many misc bugs

This commit is contained in:
Chris Danford
2001-11-25 23:22:20 +00:00
parent ae2aa31944
commit 8449179efa
7 changed files with 145 additions and 51 deletions
+13 -13
View File
@@ -55,7 +55,7 @@ LPDIRECT3DTEXTURE8 RageBitmapTexture::GetD3DTexture()
}
VOID RageBitmapTexture::Create()
void RageBitmapTexture::Create()
{
HRESULT hr;
@@ -63,18 +63,18 @@ VOID RageBitmapTexture::Create()
// load texture
if (FAILED (hr = D3DXCreateTextureFromFileEx(
m_pd3dDevice,
m_sFilePath,
D3DX_DEFAULT, D3DX_DEFAULT,
D3DX_DEFAULT,
0,
D3DFMT_A4R4G4B4, // this is our preferred format
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT,
0, // no color key
&ddii,
NULL, // no palette
m_pd3dDevice, // device
m_sFilePath, // soure file
D3DX_DEFAULT, D3DX_DEFAULT, // width, height
D3DX_DEFAULT, // mip map levels
0, // usage (is a render target?)
D3DFMT_A4R4G4B4, // our preferred texture format
D3DPOOL_MANAGED, // which memory pool
D3DX_DEFAULT, // filter
D3DX_DEFAULT, // mip filter
0, // no color key
&ddii, // struct to fill with source image info
NULL, // no palette
&m_pd3dTexture ) ) )
RageErrorHr( ssprintf("D3DXCreateTextureFromFileEx() failed for file '%s'.", m_sFilePath), hr );