MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Load

Method Load

engine/Poseidon/World/Entities/Weapons/Weapons.cpp:20–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19using namespace Poseidon;
20void RandomSound::Load(const ParamEntry& entry, const char* name)
21{
22 const ParamEntry& list = entry >> name;
23 _pars.Realloc(list.GetSize() / 2);
24 _pars.Resize(0);
25 for (int i = 0; i < list.GetSize(); i += 2)
26 {
27 RString singleName = list[i];
28 // load single sound parameter
29 SoundProbab extPars;
30 const ParamEntry& single = entry >> singleName;
31 GetValue(extPars, single);
32 extPars._probability = list[i + 1];
33 _pars.Add(extPars);
34 }
35 _pars.Compact();
36}
37
38const SoundPars& RandomSound::SelectSound(float probab) const
39{

Callers 2

MissileMethod · 0.45
SmokeShellMethod · 0.45

Calls 9

GetValueFunction · 0.85
GetPackedColorFunction · 0.85
strcmpiFunction · 0.50
ReallocMethod · 0.45
GetSizeMethod · 0.45
ResizeMethod · 0.45
AddMethod · 0.45
CompactMethod · 0.45
FindEntryMethod · 0.45

Tested by

no test coverage detected