#include "stdafx.h" /* ----------------------------------------------------------------------------- File: RageTexture.h Desc: Abstract class for a texture with metadata. Copyright (c) 2001 Chris Danford. All rights reserved. ----------------------------------------------------------------------------- */ //----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- #include "RageTexture.h" #include "RageUtil.h" //----------------------------------------------------------------------------- // RageTexture constructor //----------------------------------------------------------------------------- RageTexture::RageTexture( LPRageScreen pScreen, CString sFilePath ) { // RageLog( "RageTexture::RageTexture()" ); // save a pointer to the D3D device m_pd3dDevice = pScreen->GetDevice(); assert( m_pd3dDevice != NULL ); // save the file path m_sFilePath = sFilePath; // m_pd3dTexture = NULL; m_iRefCount = 1; m_uSourceWidth = m_uSourceHeight = 0; m_uTextureWidth = m_uTextureHeight = 0; m_uImageWidth = m_uImageHeight = 0; m_uFramesWide = m_uFramesHigh = 1; } RageTexture::~RageTexture() { } void RageTexture::CreateFrameRects() { GetFrameDimensionsFromFileName( m_sFilePath, &m_uFramesWide, &m_uFramesHigh ); /////////////////////////////////// // Fill in the m_FrameRects with the bounds of each frame in the animation. /////////////////////////////////// for( UINT j=0; j