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

Method Load

ogsr_engine/xrGame/level_sounds.cpp:10–34  ·  view source on GitHub ↗

----------------------------------------------------------------------------- static level sounds -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

8// static level sounds
9//-----------------------------------------------------------------------------
10void SStaticSound::Load(IReader& F)
11{
12 R_ASSERT(F.find_chunk(0));
13
14 xr_string wav_name;
15 F.r_stringZ(wav_name);
16 m_Source.create(wav_name.c_str(), st_Effect, sg_SourceType);
17 F.r_fvector3(m_Position);
18 m_Volume = F.r_float();
19 m_Freq = F.r_float();
20 m_ActiveTime.x = F.r_s32();
21 m_ActiveTime.y = F.r_s32();
22 m_PlayTime.x = F.r_s32();
23 m_PlayTime.y = F.r_s32();
24 m_PauseTime.x = F.r_s32();
25 m_PauseTime.y = F.r_s32();
26 if (m_PauseTime.y < m_PauseTime.x)
27 {
28 Msg("!![%s] Invalid m_PauseTime detected in [level.snd_static]! wav_name: [%s]", __FUNCTION__, wav_name.c_str());
29 m_PauseTime.y = m_PauseTime.x;
30 }
31
32 m_NextTime = 0;
33 m_StopTime = 0;
34}
35
36void SStaticSound::LoadIni(CInifile::Sect& section)
37{

Callers

nothing calls this directly

Calls 15

MsgFunction · 0.85
_GetItemCountFunction · 0.85
find_chunkMethod · 0.80
existMethod · 0.80
r_openMethod · 0.80
open_chunk_iteratorMethod · 0.80
r_closeMethod · 0.80
section_existMethod · 0.80
line_existMethod · 0.80
CInifileClass · 0.70
r_stringZMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected