| 121 | } |
| 122 | |
| 123 | void writeLayerStructure(std::ofstream& s, Layer* lay) { |
| 124 | write32(s, static_cast<int>(lay->flags())); // Flags |
| 125 | write16(s, static_cast<int>(lay->type())); // Type |
| 126 | write_string(s, lay->name()); |
| 127 | |
| 128 | if (lay->type() == ObjectType::LayerImage) { |
| 129 | CelConstIterator it, begin = static_cast<const LayerImage*>(lay)->getCelBegin(); |
| 130 | CelConstIterator end = static_cast<const LayerImage*>(lay)->getCelEnd(); |
| 131 | |
| 132 | // Cels |
| 133 | write32(s, static_cast<const LayerImage*>(lay)->getCelsCount()); |
| 134 | for (it=begin; it != end; ++it) { |
| 135 | write32(s, (*it)->id()); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void writeCel(std::ofstream& s, Cel* cel) { |
| 141 | write_cel(s, cel); |
nothing calls this directly
no test coverage detected