21 m_pTexture = a_pTexture;
33 m_aLists[ i ].DeleteAll();
43 for (
auto it = m_aLists[ i ].Begin(); it != m_aLists[ i ].End(); it++ )
45 TTRACE(
"[%d] Texture [%s]: W=%d , H=%d\n", uiTexIndex++, it->GetName(), it->GetTexture()->GetWidth(), it->GetTexture()->GetHeight() );
53 return &m_aLists[ a_uiList ];
58 auto pList = &m_aLists[
HashName( a_szName ) ];
60 for (
auto it = pList->Begin(); it != pList->End(); it++ )
64 return it->GetTexture();
73 auto pList = &m_aLists[
HashName( a_szName ) ];
77 pList->InsertHead( pEntry );
101 iHash += a_szName[ i ];
Texture system for the Toshi engine.
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
#define TDEFINE_CLASS_NORUNTIME(...)
TTextureFactory::NameEntry * m_pNameEntry
TNodeList< NameEntry > * GetList(TUINT a_uiList)
NameEntry * RegisterTexture(const TCHAR *a_szName, TTexture *a_pTexture)
virtual void Dump() const
void DeregisterTexture(TTexture *a_pTexture)
TTexture * FindTexture(const TCHAR *a_szName) const
static TUINT32 HashName(const TCHAR *a_szName)
static constexpr TUINT32 NUM_LISTS
static constexpr TUINT32 MAX_TEXTURENAMELEN
NameEntry(const TCHAR *a_szName, TTexture *a_pTexture)
static TSIZE String8Length(const TCHAR *str)
static TINT String8CompareNoCase(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
static TCHAR * String8Copy(TCHAR *dst, const TCHAR *src, TSIZE size=-1)