BlockStream Padding

From COD Engine Research

Block Stream Padding

Data inserted into the block stream is padded depending on data type.

Type Size Root block Padding / alignment rules Loader path Confidence
LocalizeEntry 0x08 LARGE No explicit padding proven. Two direct XString cells at +0x00 and +0x04. 0x104278 Proven
RawFile 0x10 LARGE No explicit root padding proven. buffer payload at +0x0C is 1-byte aligned. Payload length is compressedLen when +0x04 != 0, else len + 1. 0x103ec0 Proven
StringTable 0x10 LARGE No explicit padding proven. Cell array pointer at +0x0C; count is columns * rows. 0x103b18 Proven
StringTableCell 0x08 LARGE No explicit padding proven. Direct XString at +0x00; hash at +0x04 is copied unchanged. 0x1039d8 Proven
MenuList 0x0C LARGE No explicit padding proven. Name XString at +0x00. Menu pointer table at +0x08; entries are 4-byte alias pointer cells to MenuDef. 0x10f0b8 Proven
RectangleDef 0x14 LARGE Explicit trailing padding field at +0x12 (ushort) after two 1-byte alignment fields at +0x10 and +0x11. Embedded in Window Strong
Window 0xB0 LARGE No extra root padding proven beyond embedded field layout. Direct XStrings at +0x00 and +0x2C. Alias material/background pointer at +0xAC. 0x10e538 Proven
MenuDef 0x2F0 LARGE No explicit root padding proven. Root Window at +0x00. Event-handler pointers at +0x0E4..+0x0F4. Direct statement/XString pointers at +0x0F8..+0x0124. Item pointer table at +0x0128. Expression-support pointer at +0x02EC. 0x10ecd8 Proven
ItemDef 0x1CC LARGE Explicit pad bytes at +0x1B5..+0x1B7. No other root padding proven. Event-handler pointers at +0x138..+0x160. Alias sound wrapper at +0x16C. Type-data branch at +0x184. 0x10e940 Proven
StructuredDataDefSet 0x0C LARGE No explicit padding proven. Name XString at +0x00. Def array pointer at +0x08; count at +0x04. 0x103630 Proven
StructuredDataDef 0x34 LARGE No explicit padding proven. Array pointers at +0x0C, +0x14, +0x1C, +0x24 use counts at +0x08, +0x10, +0x18, +0x20. 0x103400 Proven
StructuredDataEnum 0x0C LARGE No explicit padding proven. Entry array pointer at +0x08; entries are count * 0x08. 0x103278 Proven
StructuredDataEnumEntry 0x08 LARGE Explicit trailing padding field at +0x06 (ushort). Direct XString at +0x00; index at +0x04. 0x103138 Proven
StructuredDataStructProperty 0x10 LARGE No explicit padding proven. Direct XString at +0x00; embedded type and offset are part of the fixed root. 0x102e78 Proven
StructuredDataStruct 0x10 LARGE No explicit padding proven. Property array pointer at +0x04; entries are count * 0x10. 0x102fb8 Proven
StructuredDataIndexedArray 0x10 LARGE No explicit padding proven. Parent loader allocates count * 0x10. 0x0E3BB8 Proven
StructuredDataEnumedArray 0x10 LARGE No explicit padding proven. Parent loader allocates count * 0x10. 0x0E3AE0 Proven
WeaponVariantDef 0x74 LARGE Hide-tag array at +0x0C is 2-byte aligned. Animation pointer array at +0x10 is 4-byte aligned. Accuracy Vec2[] arrays at +0x68/+0x6C are 4-byte aligned. Explicit trailing pad byte at +0x73. 0x1152F8 Proven
WeaponDef 0x684 LARGE Model and XString pointer arrays are 4-byte aligned. Note-track ushort arrays are 2-byte aligned. Surface/hit-location float arrays are 4-byte aligned. Alias asset wrappers use TEMP alias-cell semantics. Not every scalar gap is individually proven yet. 0x114678 Proven for major pointer-bearing fields; partial for all scalar gaps
TracerDef 0x70 LARGE body, TEMP wrapper Name at +0x00 resolves in LARGE. Material at +0x04 is a TEMP alias-wrapper pointer aligned to 4. No other pointer-bearing fields proven. 0x10E148 body, 0x10E1B8 wrapper Proven
FxEffectDef 0x20 LARGE body, TEMP wrapper Root body pushes LARGE. elemDefs pointer at +0x1C is 4-byte aligned. 0x113038 Strong loader-graph proof
FxElemDef 0xFC LARGE velSamples at +0xB4 is 4-byte aligned. visSamples at +0xB8 is 4-byte aligned. Multi-visual arrays are 4-byte aligned. Extended default byte payload is 1-byte aligned. Trail-index payloads are 2-byte aligned. 0x112E20 Proven for loader behavior; some semantic field names remain IW-family backed
FxElemDefVisuals[] 0x04 each LARGE Array path is 4-byte aligned when visualCount > 1 and elemType != 11. 0x112D20 / 0x112C98 Strong
FxElemMarkVisuals[] 0x08 each LARGE Array path is 4-byte aligned when elemType == 11. 0x112D20 / 0x1105E0 Strong
FxTrailDef 0x24 LARGE Root is 4-byte aligned. Vertex payload is 4-byte aligned. Index payload is 2-byte aligned. 0x0F4AE8 Strong
FxSparkFountainDef 0x34 LARGE Root is 4-byte aligned. 0x0E6DF8 Strong
SndAliasList 0x0C TEMP root, nested LARGE Name resolves in LARGE. Alias array payload is 4-byte aligned in LARGE. 0x10A900 body via wrapper Strong loader-trace proof
SndAlias 0x64 LARGE Five direct strings at +0x00..+0x10. SoundFile[] at +0x14 is 4-byte aligned in TEMP. SndCurve* wrapper at +0x50 uses 4-byte TEMP alias alignment. SpeakerMap at +0x60 resolves in current LARGE stream. 0x10A600 Strong
SoundFile 0x10 TEMP Explicit pad bytes at +0x02..+0x03. Root is fixed-size. Loaded-sound union branch then pushes LARGE. 0x10A4A8 Strong
LoadedSound 0x1C TEMP root, nested LARGE/PHYSICAL Name resolves in LARGE. Seek-table payload at +0x14 is 4-byte aligned in LARGE. Physical audio payload at +0x18 is 64-byte aligned in PHYSICAL. 0x109FC0 body Strong
SndCurve 0x88 TEMP root, nested LARGE Explicit pad bytes at +0x06..+0x07. Filename XString resolves in LARGE. 0x109C50 Strong
SpeakerMap 0x198 LARGE Explicit 3-byte padding at +0x01..+0x03. Name XString at +0x04. 0x109B10 Strong
MaterialTechniqueSet 0x9C LARGE Name XString at +0x00. Technique pointer table starts at +0x08; fixed count 37 on PS3; pointer cells are 4 bytes each. 0x107E80 Strong
MaterialTechnique 0x08 LARGE Pass count is ushort at +0x06. Pass array follows root. 0x107C88 Strong
MaterialPass 0x18 LARGE Explicit 3-byte padding after PrecompiledIndex. Shader-argument array at +0x14 is 4-byte aligned. 0x107BF8 Strong
MaterialVertexShaderProgram 0x08 LARGE root, TEMP payload Shader bytecode payload is 16-byte aligned in current TEMP stream. Reader implementation mirrors PS3 shader path Modeled from loader pattern, not yet directly tagged
MaterialPixelShaderProgram 0x14 LARGE root, TEMP payload Shader bytecode payload is 16-byte aligned in current TEMP stream. Reader implementation mirrors PS3 shader path Modeled from loader pattern, not yet directly tagged
Material 0xA8 LARGE Proven/aligned payload rules currently encoded are: ushort payload at +0x90 is 2-byte aligned, texture table at +0x98 is 4-byte aligned, constant table at +0x9C is 16-byte aligned, state-bit table at +0xA0 is 4-byte aligned, unknown XString pointer array at +0xA4 is 4-byte aligned. Root has explicit 2-byte pad at +0x8E. Material loader family Partial