| 117 | } |
| 118 | |
| 119 | void PmxSetting::Read(std::istream *stream) |
| 120 | { |
| 121 | uint8_t count; |
| 122 | stream->read((char*) &count, sizeof(uint8_t)); |
| 123 | if (count < 8) |
| 124 | { |
| 125 | throw DeadlyImportError("MMD: invalid size"); |
| 126 | } |
| 127 | stream->read((char*) &encoding, sizeof(uint8_t)); |
| 128 | stream->read((char*) &uv, sizeof(uint8_t)); |
| 129 | stream->read((char*) &vertex_index_size, sizeof(uint8_t)); |
| 130 | stream->read((char*) &texture_index_size, sizeof(uint8_t)); |
| 131 | stream->read((char*) &material_index_size, sizeof(uint8_t)); |
| 132 | stream->read((char*) &bone_index_size, sizeof(uint8_t)); |
| 133 | stream->read((char*) &morph_index_size, sizeof(uint8_t)); |
| 134 | stream->read((char*) &rigidbody_index_size, sizeof(uint8_t)); |
| 135 | uint8_t temp; |
| 136 | for (int i = 8; i < count; i++) |
| 137 | { |
| 138 | stream->read((char*)&temp, sizeof(uint8_t)); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | void PmxVertexSkinningBDEF1::Read(std::istream *stream, PmxSetting *setting) |
| 143 | { |
no test coverage detected