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/graphics/balls/main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'examples/graphics/balls') diff --git a/examples/graphics/balls/main.c b/examples/graphics/balls/main.c index 89c8063..e429a4b 100644 --- a/examples/graphics/balls/main.c +++ b/examples/graphics/balls/main.c @@ -2,7 +2,7 @@ * LibPSn00b Example Programs * * Balls Example - * 2019 Meido-Tek Productions / PSn00bSDK Project + * 2019 - 2021 Meido-Tek Productions / PSn00bSDK Project * * Draws a bunch of ball sprites that bounce around the screen, * along with a ball snake that might be difficult to see. @@ -12,10 +12,13 @@ * * Changelog: * - * November 20, 2018 - Initial version. + * May 10, 2021 - Variable types updated for psxgpu.h changes. + * + * November 20, 2018 - Initial version. * */ +#include #include #include #include @@ -39,10 +42,10 @@ DISPENV disp; DRAWENV draw; -char pribuff[2][65536]; /* Primitive packet buffers */ -unsigned int ot[2][OT_LEN]; /* Ordering tables */ -char *nextpri; /* Pointer to next packet buffer offset */ -int db = 0; /* Double buffer index */ +char pribuff[2][65536]; /* Primitive packet buffers */ +u_long ot[2][OT_LEN]; /* Ordering tables */ +char *nextpri; /* Pointer to next packet buffer offset */ +int db = 0; /* Double buffer index */ /* Ball struct and array */ @@ -93,7 +96,7 @@ void init() { /* Upload the ball texture */ printf("Upload 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