benilla-re systems structs docs

M2ParticleRecord

struct · models · 504 bytes

Meaning
Holds a particle emitter record of an MD20 file: flags, bone, tracks, gradients and motion terms
Confidence
verified, proof one
Finding
models/emission#particle-record

Finding: Particle record in models: emission

A particle record is 0x1f8 bytes. The ten float tracks follow the element track layout and give each parameter its first value at creation and its animated value each frame.

offsetholds
+0x004flags (Record flags)
+0x008position relative to the bone
+0x014, +0x016bone, texture index (16-bit)
+0x018, +0x020model name and child emitter model name, count and pointer each
+0x028, +0x02a, +0x02cblend; emitter type 1 plane, 2 sphere, 3 spline; 0 head, 1 tail, 2 both
+0x030, +0x032texture grid rows, columns
+0x034 to +0x130speed, variation, vertical range, horizontal range, gravity, lifespan, rate, area length, area width, z source
+0x14c to +0x164gradient midpoint, three colours, three scales
+0x168 to +0x17ahead and tail cell ramps and repeats (particles#gradients)
+0x17ctail length
+0x180 to +0x1d8twinkle, spin, drag, model ranges, wind, follow mapping, spline points
+0x1dcenabled, a byte track

The derivation is in the doc.

Fields 15

offsetsizetypenamemeaningconfidencefinding
0x00044uint32_tm_flagsHolds the record flagsverified, proof onemodels/emission#record-flags
0x000812float[3]m_positionHolds the emitter position relative to its boneverified, proof onemodels/emission#particle-record
0x00142uint16_tm_boneHolds the bone the emitter ridesverified, proof onemodels/emission#particle-record
0x00162uint16_tm_textureHolds the texture indexverified, proof onemodels/emission#particle-record
0x00282uint16_tm_blendHolds the blendverified, proof onemodels/emission#record-flags
0x002a2uint16_tm_emitterTypeHolds the emitter type: 1 plane, 2 sphere, 3 splineverified, proof onemodels/emission#particle-record
0x002c2uint16_tm_particleTypeHolds 0 head, 1 tail, 2 bothverified, proof onemodels/emission#particle-record
0x00304uint16_t[2]m_gridHolds the texture grid rows and columnsverified, proof onemodels/emission#particle-record
0x0034280uint8_t[280]m_tracksHolds the ten float tracks, speed through z sourceverified, proof onemodels/emission#particle-record
0x014c4floatm_midpointHolds the gradient midpointverified, proof onemodels/particles#gradients
0x015012uint32_t[3]m_colorsHolds the three gradient coloursverified, proof onemodels/particles#gradients
0x015c12float[3]m_scalesHolds the three gradient sizesverified, proof onemodels/particles#gradients
0x016820uint16_t[10]m_cellsHolds the head and tail cell ranges and repeats of both gradientsverified, proof onemodels/particles#gradients
0x017c4floatm_tailLengthHolds the tail length factorverified, proof onemodels/emission#record-flags
0x01dc28uint8_t[28]m_enabledTrackHolds the enabled byte trackverified, proof onemodels/emission#particle-record