mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
fc91e63a90
The function name is mislabeled. `LoadClut2` really exists and it was introduced in PSY-Q 3.5, but it only loads a row of 16 colors into the VRAM. The implementation we have at [src/main/psxsdk/libgpu/ext.c](https://github.com/Xeeynamo/sotn-decomp/blob/master/src/main/psxsdk/libgpu/ext.c#L31) loads 256 colors though, which matches the implementation of `LoadClut`. From `PSX/CHANGE_E.TXT` in the PlayStation Programmer Tool - Runtime Library Version 3.5: ``` LoadClut2 Loads Clut for 16 colors. Syntax u_short LoadClut2(u_long *clut, int x, int y) Arguments clut Starting address of the texture color x, y Destination frame buffer address Explanation This function loads the texture color data(CLUT) starting at the address specified by "clut" to the frame buffer(x, y) and then calculates CLUT ID for the texture CLUT just loaded. Return Value CLUT ID for loaded CLUT Remarks This function transfers the CLUT data of only 16 colors. ``` |
||
---|---|---|
.. | ||
kernel.h | ||
libapi.h | ||
libc.h | ||
libcard.h | ||
libcd.h | ||
libetc.h | ||
libgpu.h | ||
libgs.h | ||
libgte.h | ||
libsnd.h | ||
libspu.h | ||
romio.h |