diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-05-11 16:32:31 -0600 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2024-05-13 23:06:34 -0600 |
| commit | 4a9e2b9068e35d09f9e24fa5186bf9250e1fda75 (patch) | |
| tree | 543e4b2cbf6b18aaf88c41f9c11606f443388394 | |
| parent | 8212948ad92b5f81b1823038f716c682d28bdf64 (diff) | |
Update MtxFactory.cpp
| -rw-r--r-- | src/factories/MtxFactory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/factories/MtxFactory.cpp b/src/factories/MtxFactory.cpp index eb7d833..169adda 100644 --- a/src/factories/MtxFactory.cpp +++ b/src/factories/MtxFactory.cpp @@ -132,10 +132,10 @@ ExportResult MtxBinaryExporter::Export(std::ostream &write, std::shared_ptr<IPar } std::optional<std::shared_ptr<IParsedData>> MtxFactory::parse(std::vector<uint8_t>& buffer, YAML::Node& node) { - auto count = GetSafeNode<size_t>(node, "count"); + //auto count = GetSafeNode<size_t>(node, "count"); auto [_, segment] = Decompressor::AutoDecode(node, buffer); - LUS::BinaryReader reader(segment.data, count * sizeof(MtxRaw)); + LUS::BinaryReader reader(segment.data, 1 * sizeof(MtxRaw)); reader.SetEndianness(LUS::Endianness::Big); std::vector<MtxRaw> matrix; @@ -143,7 +143,7 @@ std::optional<std::shared_ptr<IParsedData>> MtxFactory::parse(std::vector<uint8_ #define FIXTOF(x) ((float)((x) / 65536.0f)) // Reads the inteer portion, the fractional portion, puts each together into a fixed-point value, and finally converts to float. - for(size_t i = 0; i < count; i++) { + for(size_t i = 0; i < 1; i++) { // Read the integer portion of the fixed-point value (ex. 4) auto i1 = reader.ReadInt16(); auto i2 = reader.ReadInt16(); |
