Nico de Poel
ebbc01c672
Overhaul of geometry representation, with correct UV'ing and more finely tesselated surfaces.
3 years ago
Nico de Poel
5549e3f126
Textures are now showing up somewhat correctly!
Most of the actual changes are on the data conversion side.
3 years ago
Nico de Poel
e1d239150e
Made polygon building faster by checking ahead of time if we have enough primitive buffer space, instead of checking it per polygon.
Also the primitive buffer management is now all done through inline functions.
3 years ago
Nico de Poel
ddffc8860e
Fixes to make things work on real hardware again:
- Struct pointers need to be 32-bit aligned, otherwise the PS1 will crash
- For this purpose, some structs have been padded to make them a multiple of 4 bytes in size
- Vector data needs to be copied into scratch RAM at a 32-bit aligned address
3 years ago
Nico de Poel
a05a800da0
Implemented PVS decompression, leaf visibility check using PVS data, and front-to-back traversal of the BSP tree.
3 years ago
Nico de Poel
79f1e52d1e
Rewrote scratchpad function to work more as I envisioned it:
sequential calls will pass on a variable to each other that gets updated with the new offset position in the scratch buffer.
3 years ago
Nico de Poel
a6e9aa1b21
First simple test with scratch memory, just to verify that it works.
3 years ago
Nico de Poel
a68b2c370f
Set up some helper functions for memory management, including scratchpad memory. Moved the primitive buffer here too.
This will probably have to become inline functions or macros at some point, but for now it's just pure C.
3 years ago