mirror of
https://github.com/pspdev/pspsdk.git
synced 2026-01-10 16:10:24 +00:00
- Adding assertions to each specific sceGu function - Also adding printf for verbose output
23 lines
701 B
C
23 lines
701 B
C
/*
|
|
* PSP Software Development Kit - https://github.com/pspdev
|
|
* -----------------------------------------------------------------------
|
|
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
|
*
|
|
* Copyright (c) 2005 Jesper Svennevid
|
|
*/
|
|
|
|
#include "guInternal.h"
|
|
|
|
void sceGuClutLoad(int num_blocks, const void *cbp)
|
|
{
|
|
#ifdef GU_DEBUG
|
|
printf("sceGuClutLoad(%d, %p);\n", num_blocks, cbp);
|
|
assert(gu_init && "GU not initialized");
|
|
assert(num_blocks > 0 && num_blocks <= 65535 && "Invalid number of CLUT blocks");
|
|
#endif
|
|
|
|
sendCommandi(CLUT_BUF_PTR, ((unsigned int)cbp));
|
|
sendCommandi(CLUT_BUF_WIDTH, (((unsigned int)cbp) >> 8) & 0xf0000);
|
|
sendCommandi(CLUT_LOAD, num_blocks);
|
|
}
|