2002-05-19 01:59:48 +00:00
|
|
|
#pragma once
|
2001-11-04 19:34:28 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-05-19 01:59:48 +00:00
|
|
|
Class: RageTextureManager
|
2001-11-04 19:34:28 +00:00
|
|
|
|
|
|
|
|
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-04 19:34:28 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
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:
|
2002-11-11 04:53:31 +00:00
|
|
|
RageTextureManager( int iTextureColorDepth, int iSecsBeforeUnload );
|
2001-11-03 10:52:42 +00:00
|
|
|
~RageTextureManager();
|
|
|
|
|
|
2002-11-11 04:53:31 +00:00
|
|
|
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
|
|
|
|
2002-11-11 04:53:31 +00:00
|
|
|
void SetPrefs( int iTextureColorDepth, int iSecsBeforeUnload );
|
2002-09-18 20:42:33 +00:00
|
|
|
int GetTextureColorDepth() { return m_iTextureColorDepth; };
|
2002-11-11 04:53:31 +00:00
|
|
|
int GetSecsBeforeUnload() { return m_iSecondsBeforeUnload; };
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2001-11-03 10:52:42 +00:00
|
|
|
protected:
|
2002-10-19 19:18:40 +00:00
|
|
|
void GCTextures();
|
2002-03-30 20:00:13 +00:00
|
|
|
|
2002-09-18 20:42:33 +00:00
|
|
|
int m_iTextureColorDepth;
|
2002-09-21 16:29:14 +00:00
|
|
|
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
|