diff --git a/src/port/resource/importers/GenericArrayFactory.cpp b/src/port/resource/importers/GenericArrayFactory.cpp index 27abc55f..7fd6e50c 100644 --- a/src/port/resource/importers/GenericArrayFactory.cpp +++ b/src/port/resource/importers/GenericArrayFactory.cpp @@ -86,6 +86,11 @@ std::shared_ptr ResourceFactoryBinaryGenericArrayV0::ReadResour std::copy_n(reinterpret_cast(&vec), sizeof(Vec3i), std::back_inserter(arr->mData)); break; } + case ArrayType::Vec3iu: { + Vec3iu vec(reader->ReadUInt32(), reader->ReadUInt32(), reader->ReadUInt32()); + std::copy_n(reinterpret_cast(&vec), sizeof(Vec3iu), std::back_inserter(arr->mData)); + break; + } case ArrayType::Vec4f: { Vec4f vec(reader->ReadFloat(), reader->ReadFloat(), reader->ReadFloat(), reader->ReadFloat()); std::copy_n(reinterpret_cast(&vec), sizeof(Vec4f), std::back_inserter(arr->mData)); diff --git a/src/port/resource/type/GenericArray.h b/src/port/resource/type/GenericArray.h index 7043faf5..d28d9b68 100644 --- a/src/port/resource/type/GenericArray.h +++ b/src/port/resource/type/GenericArray.h @@ -26,6 +26,11 @@ struct Vec3i { Vec3i(int32_t x, int32_t y, int32_t z) : x(x), y(y), z(z) {} }; +struct Vec3iu { + uint32_t x, y, z; + Vec3iu(uint32_t x, uint32_t y, uint32_t z) : x(x), y(y), z(z) {} +}; + struct Vec4f { float x, y, z, w; Vec4f(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {} @@ -37,7 +42,7 @@ struct Vec4s { }; enum class ArrayType { - u8, s8, u16, s16, u32, s32, u64, f32, f64, Vec2f, Vec3f, Vec3s, Vec3i, Vec4f, Vec4s, + u8, s8, u16, s16, u32, s32, u64, f32, f64, Vec2f, Vec3f, Vec3s, Vec3i, Vec3iu, Vec4f, Vec4s, }; class GenericArray : public Ship::Resource { @@ -52,4 +57,4 @@ class GenericArray : public Ship::Resource { std::vector mData; size_t mSize; }; -} \ No newline at end of file +}