Files
itgmania212121/stepmania/src/RageTextureManager.h
T

44 lines
1.3 KiB
C++
Raw Normal View History

2002-05-19 01:59:48 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
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:
RageTextureManager( int iTextureColorDepth, int iSecsBeforeUnload );
2001-11-03 10:52:42 +00:00
~RageTextureManager();
RageTexture* LoadTexture( CString sTexturePath );
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
void SetPrefs( int iTextureColorDepth, int iSecsBeforeUnload );
2002-09-18 20:42:33 +00:00
int GetTextureColorDepth() { return m_iTextureColorDepth; };
int GetSecsBeforeUnload() { return m_iSecondsBeforeUnload; };
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;
2001-11-03 10:52:42 +00:00
2002-09-07 08:20:10 +00:00
std::map<CString, 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