Skip to content

Commit 1e69b7c

Browse files
authored
Merge pull request #313 from veka0/sceGuClutMode-docs-improvement
Clarify csa parameter in sceGuClutMode documentation
2 parents 449be35 + 50557e1 commit 1e69b7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gu/pspgu.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,11 +1412,13 @@ void sceGuClutLoad(int num_blocks, const void* cbp);
14121412
* - GU_PSM_5551
14131413
* - GU_PSM_4444
14141414
* - GU_PSM_8888
1415+
*
1416+
* @note Final color index is computed by GE in the following way: `((pixelValue >> shift) & mask) | (csa << 4)`
14151417
*
14161418
* @param cpsm - Which pixel format to use for the palette
14171419
* @param shift - Shifts color index by that many bits to the right
14181420
* @param mask - Masks the color index with this bitmask after the shift (0-0xFF)
1419-
* @param csa - Read-out start location (16-palette units)
1421+
* @param csa - This value is shifted to the left by 4 bits and bitwise ORed with color index after applying mask
14201422
**/
14211423
void sceGuClutMode(unsigned int cpsm, unsigned int shift, unsigned int mask, unsigned int csa);
14221424

0 commit comments

Comments
 (0)