Basically, this functions use the way Rice emulate the N64's RDP pipeline modifying few internal values, render and put the values back...
From my knowledge of RDP, Texture Rectangle is a special RDP primitive (Hardware Sprites) that should not rely on the rest of the RDP pipeline.
I would think original author do this to benefit of the Rice's texture and combiner pipeline for free but doing so, it touch a lot of global things while the N64 behavior is actually quite simple and isolated that I think a full dedicated Hardware Sprite pipeline would be simpler.
I still need some investigations to be sure of what needs to be changed. It doesn't look so trivial.
This is a path to hell.
Basically, this functions use the way Rice emulate the N64's RDP pipeline modifying few internal values, render and put the values back...
From my knowledge of RDP, Texture Rectangle is a special RDP primitive (Hardware Sprites) that should not rely on the rest of the RDP pipeline.
I would think original author do this to benefit of the Rice's texture and combiner pipeline for free but doing so, it touch a lot of global things while the N64 behavior is actually quite simple and isolated that I think a full dedicated Hardware Sprite pipeline would be simpler.
I still need some investigations to be sure of what needs to be changed. It doesn't look so trivial.