MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / read_cel

Function read_cel

src/doc/cel_io.cpp:32–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32Cel* read_cel(std::istream& is, SubObjectsIO* subObjects, bool setId)
33{
34 ObjectId id = read32(is);
35 frame_t frame(read16(is));
36 ObjectId celDataId = read32(is);
37 CelDataRef celData(subObjects->getCelDataRef(celDataId));
38 if (!celData)
39 return nullptr;
40
41 std::unique_ptr<Cel> cel(new Cel(frame, celData));
42 if (setId)
43 cel->setId(id);
44 return cel.release();
45}
46
47}

Callers 3

readCelMethod · 0.85
onRedoMethod · 0.85
read_layerFunction · 0.85

Calls 3

getCelDataRefMethod · 0.45
setIdMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected