aboutsummaryrefslogtreecommitdiff
path: root/examples/system/console
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/console
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/console')
-rw-r--r--examples/system/console/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/examples/system/console/main.c b/examples/system/console/main.c
index 405f0d6..92df0a8 100644
--- a/examples/system/console/main.c
+++ b/examples/system/console/main.c
@@ -2,7 +2,7 @@
* LibPSn00b Example Programs
*
* Text Console Example
- * 2020 Meido-Tek Productions / PSn00bSDK Project
+ * 2020 - 2021 Meido-Tek Productions / PSn00bSDK Project
*
* This example demonstrates a tty text console implementation for gameplay
* sections, or sections with continuously updating graphics. The console is
@@ -15,10 +15,13 @@
*
* Changelog:
*
- * April 23, 2020 - Initial version.
+ * May 10, 2021 - Variable types updated for psxgpu.h changes.
+ *
+ * April 23, 2020 - Initial version.
*
*/
-
+
+#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -48,7 +51,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 */
@@ -101,7 +104,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 ) {