From 01fe30bd8bae59ab954751b08bcc1d158eff7edb Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Thu, 1 Jul 2021 08:45:46 +0800 Subject: 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. --- examples/cdrom/cdbrowse/main.c | 9 ++++++--- examples/cdrom/cdxa/main.c | 11 +++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'examples/cdrom') 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 #include #include #include @@ -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 #include #include #include @@ -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 ) { -- cgit v1.2.3