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/cdrom | |
| 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/cdrom')
| -rw-r--r-- | examples/cdrom/cdbrowse/main.c | 9 | ||||
| -rw-r--r-- | examples/cdrom/cdxa/main.c | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/examples/cdrom/cdbrowse/main.c b/examples/cdrom/cdbrowse/main.c index 772ddc1..ead2df0 100644 --- a/examples/cdrom/cdbrowse/main.c +++ b/examples/cdrom/cdbrowse/main.c @@ -2,7 +2,7 @@ * LibPSn00b Example Programs * * CD File Browser Example - * 2020 Meido-Tek Productions / PSn00bSDK Project + * 2020 - 2021 Meido-Tek Productions / PSn00bSDK Project * * Demonstrates listing and browsing directory contents of a CD-ROM containing * an ISO9660 file system, using the directory query functions of the libpsxcd @@ -47,11 +47,14 @@ * * Changelog: * + * May 10, 2021: Variable types updated for psxgpu.h changes. + * * February 25, 2020: Initial version. * * July 12, 2020: Updated CD-ROM directory query logic on disc change slightly. */ +#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -85,7 +88,7 @@ DISPENV disp[2]; DRAWENV draw[2]; char pribuff[2][65536]; /* Primitive packet buffers */ -unsigned int ot[2][OT_LEN]; /* Ordering tables */ +u_long ot[2][OT_LEN]; /* Ordering tables */ char *nextpri; /* Pointer to next packet buffer offset */ int db = 0; /* Double buffer index */ @@ -190,7 +193,7 @@ void init() /* Upload the ball texture */ - GetTimInfo((unsigned int*)ball16c, &tim); /* Get TIM parameters */ + GetTimInfo((u_long*)ball16c, &tim); /* Get TIM parameters */ LoadImage(tim.prect, tim.paddr); /* Upload texture to VRAM */ if( tim.mode & 0x8 ) { diff --git a/examples/cdrom/cdxa/main.c b/examples/cdrom/cdxa/main.c index 0112437..16f1c82 100644 --- a/examples/cdrom/cdxa/main.c +++ b/examples/cdrom/cdxa/main.c @@ -2,7 +2,7 @@ * LibPSn00b Example Programs * * CD-XA Audio Example - * 2019 Meido-Tek Productions / PSn00bSDK Project + * 2019 - 2021 Meido-Tek Productions / PSn00bSDK Project * * Demonstrates playback and looping of CD-XA audio using the * new libpsxcd library. @@ -110,10 +110,13 @@ * * Changelog: * - * November 22, 2019 - Initial version + * May 10, 2021 - Variable types updated for psxgpu.h changes. + * + * November 22, 2019 - Initial version * */ +#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -148,7 +151,7 @@ DISPENV disp[2]; DRAWENV draw[2]; char pribuff[2][65536]; /* Primitive packet buffers */ -unsigned int ot[2][OT_LEN]; /* Ordering tables */ +u_long ot[2][OT_LEN]; /* Ordering tables */ char *nextpri; /* Pointer to next packet buffer offset */ int db = 0; /* Double buffer index */ @@ -274,7 +277,7 @@ void init() /* Upload the ball texture */ - GetTimInfo((unsigned int*)ball16c, &tim); /* Get TIM parameters */ + GetTimInfo((u_long*)ball16c, &tim); /* Get TIM parameters */ LoadImage(tim.prect, tim.paddr); /* Upload texture to VRAM */ if( tim.mode & 0x8 ) { |
