Commit 75f28a2
fix: update raw.ksy with verified field names, v<32 support, missing color_a
Changes verified against Ghidra RE of ReadNewTerrainFormat, RAWReadHeightmap,
RAWReadColorandLightMaps, RAWReadFlairData, RAWReadSceneMap, RAWReadMeshData,
and FUN_0103aaf0 (blend map reader) in legouniverse.exe 1.10.64. Validated
against all 309 .raw files across multiple client versions (v31 and v32).
- Rename density → scale (matches client field name)
- Rename diffuse_res → color_map_resolution, diffuse_res_pixels → color_map_pixels
- Rename bits → blend_channel_mask
- Add color_a (u1) to flair_attributes (was missing, 35 vs 36 byte mismatch)
- Remove size: 36 override on flairs (struct is now correctly 36 bytes)
- Add version >= 32 and vert_size != 0 guards on mesh data (matches client)
- Replace unknown1/unknown2 catch-alls with proper v<32 field definitions:
- color_map_pixels_legacy: width*width*4 bytes (BGRA per-pixel swizzle)
- scene_map_v31: width*width bytes (v==31 per-cell read with border skip)
- scene_map_skip: 1 byte (v<31 zero-fill)
- No diffuse DDS, blend_channel_mask, or blend DDS for v<32
- No mesh data for v<32
- Add doc annotations throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent eb15852 commit 75f28a2
1 file changed
Lines changed: 39 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
56 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
74 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
75 | 84 | | |
76 | 85 | | |
| 86 | + | |
77 | 87 | | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
81 | 91 | | |
82 | 92 | | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
87 | | - | |
88 | 98 | | |
89 | 99 | | |
90 | 100 | | |
91 | | - | |
| 101 | + | |
92 | 102 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
98 | 115 | | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
102 | 119 | | |
103 | 120 | | |
104 | 121 | | |
| 122 | + | |
105 | 123 | | |
106 | 124 | | |
107 | 125 | | |
108 | 126 | | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
112 | 131 | | |
| 132 | + | |
113 | 133 | | |
114 | 134 | | |
115 | 135 | | |
| |||
127 | 147 | | |
128 | 148 | | |
129 | 149 | | |
| 150 | + | |
| 151 | + | |
130 | 152 | | |
131 | 153 | | |
132 | 154 | | |
| |||
0 commit comments