| 30 | } |
| 31 | |
| 32 | Cel* 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 | } |
no test coverage detected