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

Method Save

ogsr_engine/Layers/xrRender/PSLibrary.cpp:149–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149bool CPSLibrary::Save(const char* nm)
150{
151 CMemoryWriter F;
152
153 F.open_chunk(PS_CHUNK_VERSION);
154 F.w_u16(PS_VERSION);
155 F.close_chunk();
156
157 F.open_chunk(PS_CHUNK_SECONDGEN);
158 u32 chunk_id = 0;
159 for (auto it = m_PEDs.begin(); it != m_PEDs.end(); ++it, ++chunk_id)
160 {
161 F.open_chunk(chunk_id);
162 it->second->Save(F);
163 F.close_chunk();
164 }
165 F.close_chunk();
166
167 F.open_chunk(PS_CHUNK_THIRDGEN);
168 chunk_id = 0;
169 for (auto g_it = m_PGDs.begin(); g_it != m_PGDs.end(); ++g_it, ++chunk_id)
170 {
171 F.open_chunk(chunk_id);
172 g_it->second->Save(F);
173 F.close_chunk();
174 }
175 F.close_chunk();
176
177 return F.save_to(nm);
178}
179
180void CPSLibrary::Reload()
181{

Callers

nothing calls this directly

Calls 6

close_chunkMethod · 0.80
save_toMethod · 0.80
open_chunkMethod · 0.45
w_u16Method · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected