From f15a46f43115e066c2faee8bfaf8d2be9855abc6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 20 Oct 2002 05:13:34 +0000 Subject: [PATCH] Don't set RageTexture::m_TextureFormat. (Nothing ever reads it beyond texture creation, so it can be removed.) --- stepmania/src/RageBitmapTexture.cpp | 2 -- stepmania/src/RageMovieTexture.cpp | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 583d54059c..bb1651bc75 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -204,8 +204,6 @@ void RageBitmapTexture::Create( // save information about the texture m_iTextureWidth = ddsd.Width; m_iTextureHeight = ddsd.Height; - m_TextureFormat = ddsd.Format; - if( bStretch ) { diff --git a/stepmania/src/RageMovieTexture.cpp b/stepmania/src/RageMovieTexture.cpp index 5d45fe70d6..63b7625305 100644 --- a/stepmania/src/RageMovieTexture.cpp +++ b/stepmania/src/RageMovieTexture.cpp @@ -492,7 +492,6 @@ HRESULT RageMovieTexture::CreateD3DTexture() m_iTextureWidth = ddsd.Width; m_iTextureHeight = ddsd.Height; - m_TextureFormat = ddsd.Format; if( m_iTextureWidth < m_iImageWidth || m_iTextureHeight < m_iImageHeight ) { @@ -504,9 +503,9 @@ HRESULT RageMovieTexture::CreateD3DTexture() m_iImageHeight = min(m_iImageHeight, m_iTextureHeight); } - if( m_TextureFormat != D3DFMT_A8R8G8B8 && - m_TextureFormat != D3DFMT_A1R5G5B5 ) - throw RageException( "Texture is format we can't handle! Format = 0x%x!", m_TextureFormat ); + if( ddsd.Format != D3DFMT_A8R8G8B8 && + ddsd.Format != D3DFMT_A1R5G5B5 ) + throw RageException( "Texture is format we can't handle! Format = 0x%x!", ddsd.Format ); return S_OK;