MCPcopy Create free account
hub / github.com/OpenMW/openmw / open

Method open

components/esm4/reader.cpp:270–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 }
269
270 void Reader::open(Files::IStreamPtr&& stream, const std::filesystem::path& filename)
271 {
272 openRaw(std::move(stream), filename);
273
274 // should at least have the size of ESM3 record header (20 or 24 bytes for ESM4)
275 if (mFileSize < 16)
276 throw std::runtime_error("File too small");
277 std::uint32_t modVer = 0;
278 if (getExact(modVer)) // get the first 4 bytes of the record header only
279 {
280 // FIXME: need to setup header/context
281 if (modVer == REC_TES4)
282 {
283 }
284 else
285 {
286 }
287 }
288
289 throw std::runtime_error("Unknown file format"); // can't yet use fail() as mCtx is not setup
290 }
291
292 void Reader::open(const std::filesystem::path& filename)
293 {

Callers 1

shallowLoadFunction · 0.45

Calls 2

openFunction · 0.50

Tested by

no test coverage detected