@@ -59,6 +59,7 @@ extern "C" {
5959#define GU_FACE_NORMAL_REVERSE (19)
6060#define GU_PATCH_FACE (20)
6161#define GU_FRAGMENT_2X (21)
62+ #define GU_MAX_STATUS (22)
6263
6364/* Matrix modes */
6465#define GU_PROJECTION (0)
@@ -285,6 +286,15 @@ extern "C" {
285286#define GU_SYNC_WHAT_STALL (3)
286287#define GU_SYNC_WHAT_CANCEL (4)
287288
289+ /* Call mode */
290+ #define GU_CALL_NORMAL (0)
291+ #define GU_CALL_SIGNAL (1)
292+
293+ /* Signal models */
294+ #define GU_SIGNAL_WAIT (1)
295+ #define GU_SIGNAL_NOWAIT (2)
296+ #define GU_SIGNAL_PAUSE (3)
297+
288298/* Signals */
289299#define GU_CALLBACK_SIGNAL (1)
290300#define GU_CALLBACK_FINISH (4)
@@ -293,6 +303,10 @@ extern "C" {
293303#define GU_BEHAVIOR_SUSPEND (1)
294304#define GU_BEHAVIOR_CONTINUE (2)
295305
306+ /* Break mode */
307+ #define GU_BREAK_PAUSE (0)
308+ #define GU_BREAK_CANCEL (1)
309+
296310/* Color Macros, maps 8 bit unsigned channels into one 32-bit value */
297311#define GU_ABGR (a ,b ,g ,r ) (((a) << 24)|((b) << 16)|((g) << 8)|(r))
298312#define GU_ARGB (a ,r ,g ,b ) GU_ABGR((a),(b),(g),(r))
@@ -429,8 +443,22 @@ void sceGuInit(void);
429443**/
430444void sceGuTerm (void );
431445
432- void sceGuBreak (int a0 );
433- void sceGuContinue (void );
446+ /**
447+ * Break the display list
448+ *
449+ * @param mode - Mode to break the display list. Valid modes are:
450+ * - GU_BREAK_PAUSE - Pause the display list
451+ * - GU_BREAK_CANCEL - Cancel drawing queue
452+ * @return 0 for success, < 0 for failure
453+ **/
454+ int sceGuBreak (int mode );
455+
456+ /**
457+ * Continue the display list
458+ *
459+ * @return 0 for success, < 0 for failure
460+ **/
461+ int sceGuContinue (void );
434462
435463/**
436464 * Setup signal handler
@@ -962,7 +990,18 @@ void sceGuColorMaterial(int components);
962990**/
963991void sceGuAlphaFunc (int func , int value , int mask );
964992
993+ /**
994+ * Set the ambient light color
995+ *
996+ * @param color - The light color to set
997+ **/
965998void sceGuAmbient (unsigned int color );
999+
1000+ /**
1001+ * Set the ambient color
1002+ *
1003+ * @param color - The color to set
1004+ **/
9661005void sceGuAmbientColor (unsigned int color );
9671006
9681007/**
@@ -1244,10 +1283,10 @@ void sceGuTexLevelMode(unsigned int mode, float bias);
12441283 * - GU_ENVIRONMENT_MAP
12451284 *
12461285 * @param mode - Which mode to use
1247- * @param a1 - Unknown
1248- * @param a2 - Unknown
1286+ * @param lu - Light U
1287+ * @param lv - Light V
12491288**/
1250- void sceGuTexMapMode (int mode , unsigned int a1 , unsigned int a2 );
1289+ void sceGuTexMapMode (int mode , unsigned int lu , unsigned int lv );
12511290
12521291/**
12531292 * Set texture-mode parameters
@@ -1262,10 +1301,10 @@ void sceGuTexMapMode(int mode, unsigned int a1, unsigned int a2);
12621301 *
12631302 * @param tpsm - Which texture format to use
12641303 * @param maxmips - Number of mipmaps to use (0-8)
1265- * @param a2 - Unknown, set to 0
1304+ * @param mc - Multiclut on/off (0/1)
12661305 * @param swizzle - GU_TRUE(1) to swizzle texture-reads
12671306**/
1268- void sceGuTexMode (int tpsm , int maxmips , int a2 , int swizzle );
1307+ void sceGuTexMode (int tpsm , int maxmips , int mc , int swizzle );
12691308
12701309/**
12711310 * Set texture offset
@@ -1345,7 +1384,7 @@ void sceGuClutLoad(int num_blocks, const void* cbp);
13451384 * @param cpsm - Which pixel format to use for the palette
13461385 * @param shift - Shifts color index by that many bits to the right
13471386 * @param mask - Masks the color index with this bitmask after the shift (0-0xFF)
1348- * @param a3 - Unknown, set to 0
1387+ * @param csa - Read-out start location (16-palette units)
13491388**/
13501389void sceGuClutMode (unsigned int cpsm , unsigned int shift , unsigned int mask , unsigned int a3 );
13511390
@@ -1410,7 +1449,12 @@ void sceGuDrawBezier(int vtype, int ucount, int vcount, const void* indices, con
14101449**/
14111450void sceGuPatchDivide (unsigned int ulevel , unsigned int vlevel );
14121451
1413- void sceGuPatchFrontFace (unsigned int a0 );
1452+ /**
1453+ * Set front face for patches (beziers and splines)
1454+ *
1455+ * @param mode - Desired front face mode (GU_CW | GU_CCW)
1456+ **/
1457+ void sceGuPatchFrontFace (unsigned int mode );
14141458
14151459/**
14161460 * Set primitive for patches (beziers and splines)
@@ -1465,7 +1509,17 @@ void sceGuBoneMatrix(unsigned int index, const ScePspFMatrix4* matrix);
14651509**/
14661510void sceGuMorphWeight (int index , float weight );
14671511
1468- void sceGuDrawArrayN (int primitive_type , int vertex_type , int count , int a3 , const void * indices , const void * vertices );
1512+ /**
1513+ * Draw an array of primitives
1514+ *
1515+ * @param primitive_type - Type of primitive to draw
1516+ * @param vertex_type - Type of vertex to draw
1517+ * @param vcount - Number of vertices to draw
1518+ * @param primcount - Number of primitives to draw
1519+ * @param indices - Pointer to index buffer
1520+ * @param vertices - Pointer to vertex buffer
1521+ **/
1522+ void sceGuDrawArrayN (int primitive_type , int vertex_type , int vcount , int primcount , const void * indices , const void * vertices );
14691523
14701524/**
14711525 * Set how the display should be set
0 commit comments