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

Method Save2

ogsr_engine/Layers/xrRender/ParticleEffectActions.cpp:175–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void EParticleAction::Save2(CInifile& ini, const shared_str& sect)
176{
177 ini.w_u32(sect.c_str(), "version", PARTICLE_ACTION_VERSION_COP);
178 ini.w_string(sect.c_str(), "action_name", actionName.c_str());
179 ini.w_u32(sect.c_str(), "flags", flags.get());
180
181 u32 counter = 0;
182 string256 buff;
183 for (PFloatMapIt f_it = floats.begin(); f_it != floats.end(); ++f_it, ++counter)
184 {
185 xr_sprintf(buff, sizeof(buff), "flt_%04d", counter);
186 ini.w_float(sect.c_str(), buff, f_it->second.val);
187 }
188 counter = 0;
189 for (PVectorMapIt v_it = vectors.begin(); v_it != vectors.end(); ++v_it, ++counter)
190 {
191 xr_sprintf(buff, sizeof(buff), "vec_%04d", counter);
192 ini.w_fvector3(sect.c_str(), buff, v_it->second.val);
193 }
194
195 counter = 0;
196 for (PDomainMapIt d_it = domains.begin(); d_it != domains.end(); ++d_it, ++counter)
197 {
198 xr_sprintf(buff, sizeof(buff), "domain_%s_%04d", sect.c_str(), counter);
199 d_it->second.Save2(ini, buff);
200 }
201
202 counter = 0;
203 for (PBoolMapIt b_it = bools.begin(); b_it != bools.end(); ++b_it, ++counter)
204 {
205 xr_sprintf(buff, sizeof(buff), "bool_%04d", counter);
206 ini.w_bool(sect.c_str(), buff, b_it->second.val);
207 }
208
209 counter = 0;
210 for (PIntMapIt i_it = ints.begin(); i_it != ints.end(); ++i_it, ++counter)
211 {
212 xr_sprintf(buff, sizeof(buff), "int_%04d", counter);
213 ini.w_s32(sect.c_str(), buff, i_it->second.val);
214 }
215}
216
217void EParticleAction::appendFloat(LPCSTR name, float v, float mn, float mx)
218{

Callers

nothing calls this directly

Calls 10

w_stringMethod · 0.80
w_fvector3Method · 0.80
w_boolMethod · 0.80
w_u32Method · 0.45
c_strMethod · 0.45
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
w_floatMethod · 0.45
w_s32Method · 0.45

Tested by

no test coverage detected