CTextureManager Class Reference

Eine Klasse zum Texturemangament. More...

#include <TextureManager.h>

List of all members.

Public Member Functions

 CTextureManager (void)
 ~CTextureManager (void)
int LoadTexture (const char *szFilename, int nTextureID=-1)
int LoadTextureFromMemory (UBYTE *pData, int nWidth, int nHeight, int nBPP, int nTextureID=-1)
void FreeTexture (int nID)
void FreeAll (void)
char * GetErrorMessage (void)
int GetNumTextures (void)
int GetAvailableSpace (void)
int GetTexID (int nIndex)

Static Public Member Functions

static CTextureManagerGetSingleton (void)
static void Destroy (void)

Private Member Functions

UBYTE * LoadBitmapFile (const char *filename, int &nWidth, int &nHeight, int &nBPP)
UBYTE * LoadTargaFile (const char *filename, int &nWidth, int &nHeight, int &nBPP)
int GetNewTextureID (int nPossibleTextureID)
bool CheckSize (int nDimension)

Static Private Member Functions

static void Initialize (void)

Private Attributes

char szErrorMessage [80]
int nNumTextures
int nAvailable
int * nTexIDs

Static Private Attributes

static CTextureManagerm_Singleton = 0


Detailed Description

Eine Klasse zum Texturemangament.

Verwaltet Texturen und deren IDs


Constructor & Destructor Documentation

CTextureManager::CTextureManager void   ) 
 

No use for a constructor because this singlton is never created, when GetSingleton is called for the first time and issued a 'new' command the constructor is called, however because of the memory isn't valid until AFTER the constructor it just is a bad idea... Use Initialize and Destroy for your dirty work

CTextureManager::~CTextureManager void   ) 
 


Member Function Documentation

bool CTextureManager::CheckSize int  nDimension  )  [private]
 

void CTextureManager::Destroy void   )  [static]
 

void CTextureManager::FreeAll void   ) 
 

void CTextureManager::FreeTexture int  nID  ) 
 

int CTextureManager::GetAvailableSpace void   ) 
 

char * CTextureManager::GetErrorMessage void   ) 
 

int CTextureManager::GetNewTextureID int  nPossibleTextureID  )  [private]
 

int CTextureManager::GetNumTextures void   ) 
 

CTextureManager & CTextureManager::GetSingleton void   )  [static]
 

int CTextureManager::GetTexID int  nIndex  ) 
 

void CTextureManager::Initialize void   )  [static, private]
 

UBYTE * CTextureManager::LoadBitmapFile const char *  filename,
int &  nWidth,
int &  nHeight,
int &  nBPP
[private]
 

UBYTE * CTextureManager::LoadTargaFile const char *  filename,
int &  nWidth,
int &  nHeight,
int &  nBPP
[private]
 

int CTextureManager::LoadTexture const char *  szFilename,
int  nTextureID = -1
 

int CTextureManager::LoadTextureFromMemory UBYTE *  pData,
int  nWidth,
int  nHeight,
int  nBPP,
int  nTextureID = -1
 


Member Data Documentation

CTextureManager * CTextureManager::m_Singleton = 0 [static, private]
 

Note : Being a singleton all the data we 'want' is located in CTextureManager::m_Singleton, so although it looks really ugly to have so many 'm_Singleton->'s this is so the code will actually work as designed ;)

int CTextureManager::nAvailable [private]
 

int CTextureManager::nNumTextures [private]
 

int* CTextureManager::nTexIDs [private]
 

char CTextureManager::szErrorMessage[80] [private]
 


The documentation for this class was generated from the following files:
Generated on Sun Jan 15 17:55:58 2006 for Show The Flow by  doxygen 1.4.5