benilla-re systems structs docs

M2FixupParticles

function · models · orchestration

Address
0x71f210 · 1078 bytes, up to 0x71f645
Meaning
Bounds-checks the 504-byte particle emitters and fixes up their arrays and tracks
Confidence
verified, proof one
Finding
models/shared#header-fixup

Finding: Header fixup in models: the shared model

The file starts with an MD20 header of version 0x100 or 0x101 and at least 0x154 bytes. Every array is a count and an offset; the fixup checks that the array ends inside the file and replaces the offset with a pointer, or with 0 for an empty array, and does the same inside the views, colours, textures, transparencies, texture frames, texture transforms, attachments, events, lights, cameras, ribbons and particles. Any check that fails makes the load fail.

headerarrayelement
+0x08name1 byte
+0x14 to +0x2cglobal sequences, sequences, sequence lookup, playable table4, 0x44, 2, 4 bytes
+0x34, +0x3c, +0x44bones, key bone lookup, vertices0x6c, 2, 0x30 bytes
+0x4c, +0x54, +0x5cviews, colours, textures0x2c, 0x38, 0x10 bytes
+0x64, +0x6c, +0x74transparency, texture frames, texture transforms0x1c, 0x1c, 0x54 bytes
+0x7c to +0xacreplaceable lookup, materials, then five 16-bit lookups2, 4, 2 bytes
+0xec to +0xfccollision indices, vertices, normals2, 12, 12 bytes
+0x104 to +0x134attachments, attachment lookup, events, lights, cameras, camera lookup, ribbons0x30, 2, 0x2c, 0xd4, 0x7c, 2, 0xdc bytes
+0x13c; +0x144, +0x14cparticles; two 16-bit arrays in version 0x1010x1f8; 2 bytes

The derivation is in the doc.

Callers 1

Callees 4

Calls and jumps by a bare address, from tables/calls.tsv.