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/beginner/cppdemo/main.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'examples/beginner/cppdemo') diff --git a/examples/beginner/cppdemo/main.cpp b/examples/beginner/cppdemo/main.cpp index 1a98cac..58bfcda 100644 --- a/examples/beginner/cppdemo/main.cpp +++ b/examples/beginner/cppdemo/main.cpp @@ -3,7 +3,12 @@ * Basically a quick little example that showcases C++ classes are * functioning in PSn00bSDK. - Lameguy64 * - * Written in December ‎18, ‎2020. + * First written in December ‎18, ‎2020. + * + * Changelog: + * + * May 10, 2021 - Variable types updated for psxgpu.h changes. + * */ #include @@ -14,7 +19,7 @@ class GraphClass { - u_int *_ot[2]; + u_long *_ot[2]; u_char *_pri[2]; u_char *_nextpri; @@ -28,8 +33,8 @@ public: GraphClass( int ot_len = 8, int pri_len = 8192 ) { - _ot[0] = (u_int*)malloc( sizeof(u_int)*ot_len ); - _ot[1] = (u_int*)malloc( sizeof(u_int)*ot_len ); + _ot[0] = (u_long*)malloc( sizeof(u_long)*ot_len ); + _ot[1] = (u_long*)malloc( sizeof(u_long)*ot_len ); _db = 0; _ot_count = ot_len; @@ -96,7 +101,7 @@ public: } /* GetNextPri */ - u_int *GetOt( void ) + u_long *GetOt( void ) { return( _ot[_db] ); -- cgit v1.2.3