diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-12-18 14:00:52 +0100 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-12-18 14:00:52 +0100 |
| commit | 3b7c46ab74548a9a79bfb867551c51dd877c8f4d (patch) | |
| tree | b001e9875385df3a917e51399e2d20ee559d65b0 /libpsn00b/include | |
| parent | 70833192a803061008d2221b27e9baada6042c90 (diff) | |
| download | psn00bsdk-3b7c46ab74548a9a79bfb867551c51dd877c8f4d.tar.gz | |
Misc. bugfixes, add support for DRAWENV texture windows
Diffstat (limited to 'libpsn00b/include')
| -rw-r--r-- | libpsn00b/include/psxgpu.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libpsn00b/include/psxgpu.h b/libpsn00b/include/psxgpu.h index b0c5302..26e560f 100644 --- a/libpsn00b/include/psxgpu.h +++ b/libpsn00b/include/psxgpu.h @@ -39,6 +39,11 @@ typedef enum _GPU_VideoMode { #define setTPage(p, tp, abr, x, y) ((p)->tpage = getTPage(tp, abr, x, y)) #define setClut(p, x, y) ((p)->clut = getClut(x, y)) +#define setColor0(p, rgb) (((P_COLOR *) &((p)->r0))->color = (rgb)) +#define setColor1(p, rgb) (((P_COLOR *) &((p)->r1))->color = (rgb)) +#define setColor2(p, rgb) (((P_COLOR *) &((p)->r2))->color = (rgb)) +#define setColor3(p, rgb) (((P_COLOR *) &((p)->r3))->color = (rgb)) + #define setRGB0(p, r, g, b) ((p)->r0 = (r), (p)->g0 = (g), (p)->b0 = (b)) #define setRGB1(p, r, g, b) ((p)->r1 = (r), (p)->g1 = (g), (p)->b1 = (b)) #define setRGB2(p, r, g, b) ((p)->r2 = (r), (p)->g2 = (g), (p)->b2 = (b)) @@ -198,9 +203,15 @@ typedef enum _GPU_VideoMode { typedef struct _P_TAG { uint32_t addr:24; uint32_t len:8; - uint8_t r, g, b, code; + uint32_t color:24; + uint32_t code:8; } P_TAG; +typedef struct _P_COLOR { + uint32_t color:24; + uint32_t pad:8; +} P_COLOR; + typedef struct _POLY_F3 { uint32_t tag; uint8_t r0, g0, b0, code; @@ -402,7 +413,7 @@ typedef struct _SPRT_FIXED SPRT_16; typedef struct _DR_ENV { uint32_t tag; - uint32_t code[15]; + uint32_t code[8]; } DR_ENV; typedef struct _DR_AREA { |
