From 55d472bdcd495be5d0d6008da9ad9a12c6213f0c Mon Sep 17 00:00:00 2001 From: Argent77 <4519923+Argent77@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:13:43 +0200 Subject: [PATCH] Add field "Height" to WED > Polygon structure --- src/org/infinity/resource/wed/Polygon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/infinity/resource/wed/Polygon.java b/src/org/infinity/resource/wed/Polygon.java index b7d562462..573b57774 100644 --- a/src/org/infinity/resource/wed/Polygon.java +++ b/src/org/infinity/resource/wed/Polygon.java @@ -10,7 +10,6 @@ import org.infinity.datatype.Flag; import org.infinity.datatype.IsNumeric; import org.infinity.datatype.SectionCount; -import org.infinity.datatype.Unknown; import org.infinity.resource.AbstractStruct; import org.infinity.resource.AddRemovable; import org.infinity.resource.HasChildStructs; @@ -22,6 +21,7 @@ public abstract class Polygon extends AbstractStruct implements AddRemovable, Ha public static final String WED_POLY_VERTEX_INDEX = "Vertex index"; public static final String WED_POLY_NUM_VERTICES = "# vertices"; public static final String WED_POLY_FLAGS = "Polygon flags"; + public static final String WED_POLY_HEIGHT = "Height"; public static final String WED_POLY_MIN_COORD_X = "Minimum coordinate: X"; public static final String WED_POLY_MAX_COORD_X = "Maximum coordinate: X"; public static final String WED_POLY_MIN_COORD_Y = "Minimum coordinate: Y"; @@ -92,7 +92,7 @@ public int read(ByteBuffer buffer, int offset) throws Exception { addField(new DecNumber(buffer, offset, 4, WED_POLY_VERTEX_INDEX)); addField(new SectionCount(buffer, offset + 4, 4, WED_POLY_NUM_VERTICES, Vertex.class)); addField(new Flag(buffer, offset + 8, 1, WED_POLY_FLAGS, FLAGS_ARRAY)); - addField(new Unknown(buffer, offset + 9, 1)); + addField(new DecNumber(buffer, offset + 9, 1, WED_POLY_HEIGHT)); addField(new DecNumber(buffer, offset + 10, 2, WED_POLY_MIN_COORD_X)); addField(new DecNumber(buffer, offset + 12, 2, WED_POLY_MAX_COORD_X)); addField(new DecNumber(buffer, offset + 14, 2, WED_POLY_MIN_COORD_Y));