Rendering engine

From Stunts Wiki
Revision as of 22:47, 23 February 2025 by HerrNove (talk | contribs) (Created page with "Stunts' rendering engine has (at least) two layers. Layer 1 determines which tiles should be drawn, and which shapes in each tile. This task is performed by the function call...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stunts' rendering engine has (at least) two layers.

Layer 1 determines which tiles should be drawn, and which shapes in each tile. This task is performed by the function called update_frame.

Layer 2 takes each shape and determines its primitives. This task is performed by the function called transformed_shape_op (at least as of commit aec11f4; a better name could be helpful).

Both layer 1 and layer 2 were ported to C as part of the Restunts project. However, while level 1's code is readable and straightforward (HerrNove left comments in most of the function and can help further is needed), level 2 remains mostly a mystery. Most of the instructions are just uncommented disassembly from IDA, and some parts are simply not implemented.