aboutsummaryrefslogtreecommitdiff
path: root/examples/beginner/cppdemo
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-07-01 08:45:46 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-07-01 08:45:46 +0800
commit01fe30bd8bae59ab954751b08bcc1d158eff7edb (patch)
treeaa83e37f4e59207ec41b3d47796875755462c63f /examples/beginner/cppdemo
parentda79082d2c5e0dcbc899a359f6f49ec8cca90d66 (diff)
downloadpsn00bsdk-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/beginner/cppdemo')
-rw-r--r--examples/beginner/cppdemo/main.cpp15
1 files changed, 10 insertions, 5 deletions
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 <sys/types.h>
@@ -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] );