Files
itgmania212121/stepmania/src/RageTextureManager.h
T

54 lines
1.6 KiB
C++
Raw Normal View History

2002-11-16 07:36:02 +00:00
#ifndef RAGE_TEXTURE_MANAGER_H
#define RAGE_TEXTURE_MANAGER_H
/*
-----------------------------------------------------------------------------
2002-05-19 01:59:48 +00:00
Class: RageTextureManager
Desc: Interface for loading and releasing textures.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
2001-11-03 10:52:42 +00:00
#include "RageTexture.h"
2002-09-07 08:20:10 +00:00
#include <map>
2001-11-03 10:52:42 +00:00
//-----------------------------------------------------------------------------
// RageTextureManager Class Declarations
//-----------------------------------------------------------------------------
class RageTextureManager
{
public:
2003-01-11 20:15:00 +00:00
RageTextureManager( int iTextureColorDepth, int iSecsBeforeUnload, int iMaxTextureResolution );
virtual void Update( float fDeltaTime );
2001-11-03 10:52:42 +00:00
~RageTextureManager();
RageTexture* LoadTexture( RageTextureID ID );
bool IsTextureLoaded( CString sTexturePath ); // XXX
void UnloadTexture( RageTextureID ID );
void UnloadTexture( RageTexture *t );
2002-04-28 20:42:32 +00:00
void ReloadAll();
2001-11-03 10:52:42 +00:00
2003-01-11 20:15:00 +00:00
bool SetPrefs( int iTextureColorDepth, int iSecsBeforeUnload, int iMaxTextureResolution );
2002-09-18 20:42:33 +00:00
int GetTextureColorDepth() { return m_iTextureColorDepth; };
2003-01-11 20:15:00 +00:00
int GetMaxTextureResolution() { return m_iMaxTextureResolution; };
int GetSecsBeforeUnload() { return m_iSecondsBeforeUnload; };
void InvalidateTextures();
2001-11-03 10:52:42 +00:00
protected:
void GCTextures();
2002-09-18 20:42:33 +00:00
int m_iTextureColorDepth;
int m_iSecondsBeforeUnload;
2003-01-11 20:15:00 +00:00
int m_iMaxTextureResolution;
2001-11-03 10:52:42 +00:00
std::map<RageTextureID, RageTexture*> m_mapPathToTexture;
2001-11-03 10:52:42 +00:00
};
2002-05-19 01:59:48 +00:00
extern RageTextureManager* TEXTUREMAN; // global and accessable from anywhere in our program
2002-11-16 07:36:02 +00:00
#endif