124{
126
127 if ( !ms_pTRBFiles[ a_eAssetType ] )
128 {
129
130 ms_pTRBFiles[ a_eAssetType ] = new TTRB;
131 }
132 else
133 {
134 ms_pTRBFiles[ a_eAssetType ]->Close();
135 }
136
137 if ( a_bStream && AAssetStreaming::IsSingletonCreated() )
138 {
139 ATRBLoaderJob trbLoaderJob;
140 trbLoaderJob.
InitJob( ms_pTRBFiles[ a_eAssetType ], a_szFileName );
141
142 AAssetStreaming::GetSingleton()->AddMainThreadJob( &trbLoaderJob );
143
144 while ( AAssetStreaming::GetSingleton()->HasActiveJobs() )
145 {
147#ifndef BARNYARD_COMMUNITY_PATCH
149#endif
150 AAssetStreaming::GetSingleton()->Update();
151 }
152 }
153 else
154 {
155 auto eError = ms_pTRBFiles[ a_eAssetType ]->Load( a_szFileName );
156
158 {
159 delete ms_pTRBFiles[ a_eAssetType ];
160 ms_pTRBFiles[ a_eAssetType ] =
TNULL;
161
163 }
164 }
165
167}
void ThreadSleep(TUINT dwMilliseconds)
void InitJob(Toshi::TTRB *a_pTRB, const TCHAR *a_szFileName)