OpenBarnyard
 
Loading...
Searching...
No Matches
AMaterialLibrary.h
Go to the documentation of this file.
1#pragma once
2#include "ATexture.h"
3
4#include <File/TTRB.h>
5
6#include <Toshi/T2DList.h>
7
8#ifdef TOSHI_SKU_WINDOWS
10#endif // TOSHI_SKU_WINDOWS
11
12class AMaterialLibrary : public Toshi::T2DList<AMaterialLibrary>::Node
13{
14public:
29
30public:
32
33 TBOOL LoadTTLData( void* a_pTTLData );
34 TBOOL LoadTTLFile( const TCHAR* a_szFilePath );
35 TBOOL LoadTRBFile( Toshi::TTRB* a_pTRB );
36
37 void Destroy();
38
39 TINT FindTextureIndex( const TCHAR* a_szTextureName );
40
42 {
43 return m_iNumTextures;
44 }
45
46 ATexture* GetTexture( TINT a_uiIndex )
47 {
48 TASSERT( a_uiIndex < m_iNumTextures );
49 return m_pTextures + a_uiIndex;
50 }
51
52 void SetPath( const TCHAR* a_szFilePath )
53 {
54 m_Path = a_szFilePath;
55 }
56
57private:
58 void DestroyTextures();
59
60private:
61 inline static TBOOL ms_bSkipLoadedTextures = TFALSE;
62
63private:
64 Toshi::TString8 m_Path;
65 ATexture* m_pTexturesArray;
66 ATexture* m_pTextures;
67 TINT m_iNumTextures;
68 Toshi::TTRB m_TRB;
69};
TRB (Toshi Relocatable Binary) resource system for the Toshi engine.
#define TASSERT(X,...)
Definition Defines.h:138
unsigned int TUINT
Definition Typedefs.h:8
char TCHAR
Definition Typedefs.h:20
int TINT
Definition Typedefs.h:7
#define TFALSE
Definition Typedefs.h:24
bool TBOOL
Definition Typedefs.h:6
void SetPath(const TCHAR *a_szFilePath)
TBOOL LoadTTLFile(const TCHAR *a_szFilePath)
TBOOL LoadTTLData(void *a_pTTLData)
TINT FindTextureIndex(const TCHAR *a_szTextureName)
TBOOL LoadTRBFile(Toshi::TTRB *a_pTRB)
ATexture * GetTexture(TINT a_uiIndex)
TINT GetNumTextures() const