The goal is to implement Spyro 1's handwritten assembly rendering functions in C.
The gold standard should be receiving the same graphical and memory output as the game.
From there, optimizations can be made.
This serves the following purposes:
-Understanding of the functions in an easier to read form
-Understanding of the model format
-Assist potential porting to other platforms
C reimplementations of rendering functions are going to perform worse, due to more frequent memory usage (stack)
Includes and symbols are taken from the decomp.
A sample compile script is included. To build, it's recommended to merge the files of this repo with the decomp and compile its PSX.ELF once for symbols.
For easy testing, I recommend compiling to devkit memory regions in pcsx-redux and placing a jump from the original function.
State:
The function that draws untextured flat or gouraud shaded models (gems, HUD models, letters...), known as func_80022A2C in the decomp, is fully implemented, with seemingly perfect visual accuracy.
To do:
-confirm memory accuracy
-refactor to deduplicate code
-improve naming and comments
-improve performance
-work on other rendering functions
-use decomp as submodule?