MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Load

Method Load

ogsr_engine/xrSound/SoundRender_Environment.cpp:189–208  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

187
188//////////////////////////////////////////////////////////////////////////
189void SoundEnvironment_LIB::Load(LPCSTR f_name)
190{
191 // R_ASSERT(library.empty());
192
193 IReader* F = FS.r_open(f_name);
194 IReader* C;
195
196 for (u32 chunk = 0; 0 != (C = F->open_chunk(chunk)); chunk++)
197 {
198 CSoundRender_Environment* E = xr_new<CSoundRender_Environment>();
199 if (E->load(C))
200 library.push_back(E);
201 else
202 xr_delete(E);
203
204 C->close();
205 }
206
207 FS.r_close(F);
208}
209
210bool SoundEnvironment_LIB::Save(LPCSTR f_name) const
211{

Callers 1

env_loadMethod · 0.45

Calls 7

xr_deleteFunction · 0.85
r_openMethod · 0.80
r_closeMethod · 0.80
open_chunkMethod · 0.45
loadMethod · 0.45
push_backMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected