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

Method Save2

ogsr_engine/Layers/xrRender/ParticleGroup.cpp:132–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void CPGDef::Save2(CInifile& ini)
133{
134 ini.w_u16("_group", "version", PGD_VERSION);
135
136 ini.w_u32("_group", "flags", m_Flags.get());
137
138 ini.w_u32("_group", "effects_count", m_Effects.size());
139
140 ini.w_float("_group", "timelimit", m_fTimeLimit);
141
142 u32 counter = 0;
143 string256 buff;
144 for (EffectIt it = m_Effects.begin(); it != m_Effects.end(); ++it, ++counter)
145 {
146 xr_sprintf(buff, sizeof(buff), "effect_%04d", counter);
147
148 ini.w_string(buff, "effect_name", (*it)->m_EffectName.c_str());
149 ini.w_string(buff, "on_play_child", (*it)->m_Flags.test(SEffect::flOnPlayChild) ? (*it)->m_OnPlayChildName.c_str() : "");
150 ini.w_string(buff, "on_birth_child", (*it)->m_Flags.test(SEffect::flOnBirthChild) ? (*it)->m_OnBirthChildName.c_str() : "");
151 ini.w_string(buff, "on_death_child", (*it)->m_Flags.test(SEffect::flOnDeadChild) ? (*it)->m_OnDeadChildName.c_str() : "");
152 ini.w_float(buff, "time0", (*it)->m_Time0);
153 ini.w_float(buff, "time1", (*it)->m_Time1);
154 ini.w_u32(buff, "flags", (*it)->m_Flags.get());
155 }
156}
157
158//------------------------------------------------------------------------------
159// Particle Group item

Callers

nothing calls this directly

Calls 10

w_stringMethod · 0.80
w_u16Method · 0.45
w_u32Method · 0.45
getMethod · 0.45
sizeMethod · 0.45
w_floatMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected