Difference between revisions of "Rendering engine"

From Stunts Wiki
Line 5: Line 5:
 
Layer 2 takes each shape and determines its primitives. This task is performed by the function called [https://github.com/4d-stunts/restunts/blob/master/src/restunts/c/shape3d.c transformed_shape_op] (at least as of commit aec11f4; a better name could be helpful).
 
Layer 2 takes each shape and determines its primitives. This task is performed by the function called [https://github.com/4d-stunts/restunts/blob/master/src/restunts/c/shape3d.c 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.
+
Both layer 1 and layer 2 were ported to C language as part of the [[Restunts]] project. However, while level 1's code is readable and straightforward ([[HerrNove]] left comments in most of the functions and can support if further help 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.
  
 
[[Category:Internals]]
 
[[Category:Internals]]

Revision as of 23:15, 23 February 2025

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 language as part of the Restunts project. However, while level 1's code is readable and straightforward (HerrNove left comments in most of the functions and can support if further help 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.