aboutsummaryrefslogtreecommitdiff
path: root/examples/system/childexec/parent.c
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/system/childexec/parent.c
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/system/childexec/parent.c')
-rw-r--r--examples/system/childexec/parent.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/system/childexec/parent.c b/examples/system/childexec/parent.c
index ed5710a..58f03f7 100644
--- a/examples/system/childexec/parent.c
+++ b/examples/system/childexec/parent.c
@@ -2,7 +2,7 @@
* LibPSn00b Example Programs
*
* Child Program Execution Example
- * 2020 Meido-Tek Productions / PSn00bSDK Project
+ * 2020 - 2021 Meido-Tek Productions / PSn00bSDK Project
*
* This example demonstrates how to execute a child PS-EXE from a parent
* PS-EXE using the Exec() function, and transferring execution back from
@@ -14,8 +14,13 @@
*
* Example by Lameguy64
*
+ * Changelog:
+ *
+ * May 10, 2021 - Variable types updated for psxgpu.h changes.
+ *
*/
+#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -43,7 +48,7 @@ DISPENV disp;
DRAWENV draw;
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 */
@@ -98,7 +103,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 ) {