docs(format-spec): tighten WOB layout description with exact field sizes/types

The previous WOB section was loose ('bounds(4)' was actually boundRadius;
group size annotations missed the prefixed string lengths). Updated to
show every byte: 4-byte field sizes, 12-byte vec3s, 2-byte length
prefixes, 48-byte interleaved vertices. Reverse-engineering a WOB from
the spec is now possible without reading the source.
This commit is contained in:
Kelsi 2026-05-06 04:38:15 -07:00
parent 079ff5bfb5
commit 15630f7723

View file

@ -35,12 +35,12 @@ Novel file formats for custom WoW zone content. No Blizzard IP.
## WOB — Wowee Open Building (binary)
- Extension: `.wob`
- Magic: `WOB1` (0x31424F57)
- Layout: magic(4) + groupCount(4) + portalCount(4) + doodadCount(4) + bounds(4) + name + groups + portals + doodads
- Group: name + vertexCount(4) + indexCount(4) + texCount(4) + outdoor(1) + bounds(24)
+ vertices(pos+normal+uv+color) + indices + texPaths + materialCount(4) + materials
- Material: texturePath + flags(4) + shader(4) + blendMode(4)
- Doodad: modelPath + position(12) + rotation(12) + scale(4)
- Portal: groupA(4) + groupB(4) + vertexCount(4) + vertices
- Layout: magic(4) + groupCount(4) + portalCount(4) + doodadCount(4) + boundRadius(4) + nameLen(2) + name + groups + portals + doodads
- Group: nameLen(2) + name + vertexCount(4) + indexCount(4) + texCount(4) + outdoor(1) + boundMin(12) + boundMax(12)
+ vertices(pos+normal+uv+color = 48 bytes) + indices(uint32) + texPaths(prefixed) + materialCount(4) + materials
- Material: pathLen(2) + texturePath + flags(4) + shader(4) + blendMode(4)
- Doodad: pathLen(2) + modelPath + position(12) + rotation(12 euler degrees) + scale(4)
- Portal: groupA(4) + groupB(4) + vertexCount(4) + vertices(12 bytes each)
- toWMOModel restoration:
- Materials are deduplicated across all groups by (texture, blend, flags)
- Texture paths .png → .blp (renderer's PNG override is keyed on .blp)