Files
itgmania212121/stepmania/src/RageTextureManager.h
T

61 lines
1.6 KiB
C++
Raw Normal View History

/*
-----------------------------------------------------------------------------
File: RageTextureManager.h
Desc: Interface for loading and releasing textures.
2002-04-16 17:31:00 +00:00
Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
-----------------------------------------------------------------------------
*/
2001-11-03 10:52:42 +00:00
class RageTextureManager;
#ifndef _RAGETEXTUREMANAGER_H_
#define _RAGETEXTUREMANAGER_H_
#include "RageTexture.h"
//#include <d3dx8.h>
//#include <d3d8types.h>
//-----------------------------------------------------------------------------
// RageTextureManager Class Declarations
//-----------------------------------------------------------------------------
class RageTextureManager
{
public:
RageTextureManager( RageScreen* pScreen );
2001-11-03 10:52:42 +00:00
~RageTextureManager();
RageTexture* LoadTexture( CString sTexturePath, const DWORD dwHints = 0, const bool bForceReload = false );
2002-01-16 10:01:32 +00:00
bool IsTextureLoaded( CString sTexturePath );
void UnloadTexture( CString sTexturePath );
2002-04-28 20:42:32 +00:00
void ReloadAll();
2001-11-03 10:52:42 +00:00
2002-04-28 20:42:32 +00:00
void SetPrefs( const DWORD dwMaxSize, const DWORD dwTextureColorDepth )
{
ASSERT( m_dwMaxTextureSize >= 64 );
m_dwMaxTextureSize = dwMaxSize;
m_dwTextureColorDepth = dwTextureColorDepth;
ReloadAll();
};
DWORD GetMaxTextureSize() { return m_dwMaxTextureSize; };
DWORD GetTextureColorDepth() { return m_dwTextureColorDepth; };
2001-11-03 10:52:42 +00:00
protected:
RageScreen* m_pScreen;
DWORD m_dwMaxTextureSize;
DWORD m_dwTextureColorDepth;
2001-11-03 10:52:42 +00:00
// map from file name to a texture holder
CTypedPtrMap<CMapStringToPtr, CString, RageTexture*> m_mapPathToTexture;
2001-11-03 10:52:42 +00:00
};
extern RageTextureManager* TEXTURE; // global and accessable from anywhere in our program
2001-11-03 10:52:42 +00:00
#endif