diff options
| author | John Wilbert M. Villamor <lameguy64@gmail.com> | 2021-07-01 08:45:46 +0800 |
|---|---|---|
| committer | John Wilbert M. Villamor <lameguy64@gmail.com> | 2021-07-01 08:45:46 +0800 |
| commit | 01fe30bd8bae59ab954751b08bcc1d158eff7edb (patch) | |
| tree | aa83e37f4e59207ec41b3d47796875755462c63f /examples/graphics/render2tex | |
| parent | da79082d2c5e0dcbc899a359f6f49ec8cca90d66 (diff) | |
| download | psn00bsdk-01fe30bd8bae59ab954751b08bcc1d158eff7edb.tar.gz | |
Added int*_t and uint*_t variable types and updated type definitions in psxgpu and psxcd, to improve compatibility with code written for the official SDK.
Diffstat (limited to 'examples/graphics/render2tex')
| -rw-r--r-- | examples/graphics/render2tex/main.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/examples/graphics/render2tex/main.c b/examples/graphics/render2tex/main.c index 6ae450a..37b50d7 100644 --- a/examples/graphics/render2tex/main.c +++ b/examples/graphics/render2tex/main.c @@ -2,7 +2,7 @@ * LibPSn00b Example Programs * * Off-screen Render to Texture Example - * 2019 Meido-Tek Productions / PSn00bSDK Project + * 2019 - 2021 Meido-Tek Productions / PSn00bSDK Project * * Demonstrates quick render to texture for multi-texture style effects, * view screens and more. This example also shows how to use multiple @@ -13,10 +13,13 @@ * * Changelog: * - * Oct 26, 2019 - Initial version. + * May 10, 2021 - Variable types updated for psxgpu.h changes. + * + * Oct 26, 2019 - Initial version. * */ +#include <sys/types.h> #include <stdio.h> #include <psxgpu.h> #include <psxgte.h> @@ -44,8 +47,8 @@ typedef struct DB { DISPENV disp; /* Display environment */ DRAWENV draw; /* Drawing environment */ - int ot[OT_LEN]; /* Main ordering table */ - int sub_ot[2][4]; /* Second ordering table for r2t stuff */ + u_long ot[OT_LEN]; /* Main ordering table */ + u_long sub_ot[2][4]; /* Second ordering table for r2t stuff */ char p[PACKET_LEN]; /* Packet buffer */ } DB; @@ -113,7 +116,7 @@ MATRIX light_mtx = { /* Reference texture data */ -extern int tim_blendpattern[]; +extern u_long tim_blendpattern[]; /* TPage and CLUT values */ @@ -128,8 +131,8 @@ void display(); /* This function sorts a cube that is drawn * to an offscreen area specified by *area */ -void sort_cube(int *ot, RECT *area); -void sort_multitex(int *ot, RECT *area, int count); +void sort_cube(u_long *ot, RECT *area); +void sort_multitex(u_long *ot, RECT *area, int count); /* Main function */ int main() { @@ -393,7 +396,7 @@ void display() { } -void sort_multitex(int *ot, RECT *area, int count) +void sort_multitex(u_long *ot, RECT *area, int count) { DR_TPAGE *ptpage; FILL *pfill; @@ -526,7 +529,7 @@ void sort_multitex(int *ot, RECT *area, int count) } -void sort_cube(int *ot, RECT *area) +void sort_cube(u_long *ot, RECT *area) { int i,p; POLY_FT4* pol4; |
