mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-27 09:28:10 +03:00
This implements rendering of FLAT_LIB_EMITTER libraries: timed spawning, per-particle motion, fade, and 3-axis rotation. For each visible emitter, render_flat_emitter() builds an emitter base matrix from the ancestor key stack so particles follow their parent timelines. parent_key_mode chooses between filtering ancestor properties via the emitter's inherit_* flags (SELECTIVE) and using ancestor poses wholesale (ANCESTOR_CURRENT / ANCESTOR_AT_BIRTH). For each birth frame in the lifetime window, parts_flat_foreach_emitter_particle() reseeds the RNG from (rand_seed, birth_frame), making particles deterministic across re-renders, and yields each particle's pose, which is composed with the emitter transform and submitted as a quad through the standard parts texture pipeline.