aboutsummaryrefslogtreecommitdiff
path: root/examples/system/console/main.c
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-08-12 11:27:55 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-08-12 11:27:55 +0200
commitedb967394d22420c9aaad529862a670c016cc2c7 (patch)
treea18b6062eedda22d2c1aabb852d2c633199cce2c /examples/system/console/main.c
parent7abb3b78727c8d4672197951e62b1c5916b3a54a (diff)
downloadpsn00bsdk-edb967394d22420c9aaad529862a670c016cc2c7.tar.gz
Replace ball16c.h headers in examples with .TIM files
Diffstat (limited to 'examples/system/console/main.c')
-rw-r--r--examples/system/console/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/system/console/main.c b/examples/system/console/main.c
index 92df0a8..b4f91b4 100644
--- a/examples/system/console/main.c
+++ b/examples/system/console/main.c
@@ -21,7 +21,7 @@
*
*/
-#include <sys/types.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -32,8 +32,6 @@
#include <psxgte.h>
#include <psxgpu.h>
#include <psxsio.h>
-#include "ball16c.h"
-
#define MAX_BALLS 1024
@@ -50,10 +48,10 @@
DISPENV disp;
DRAWENV draw;
-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 */
+char pribuff[2][65536]; /* Primitive packet buffers */
+uint32_t ot[2][OT_LEN]; /* Ordering tables */
+char *nextpri; /* Pointer to next packet buffer offset */
+int db = 0; /* Double buffer index */
/* Ball struct and array */
@@ -65,6 +63,8 @@ typedef struct {
BALL_TYPE balls[MAX_BALLS];
+/* Ball texture reference */
+extern const uint32_t ball16c[];
/* TIM image parameters for loading the ball texture and drawing sprites */
TIM_IMAGE tim;
@@ -104,7 +104,7 @@ void init() {
/* Upload the ball texture */
printf("Upload texture... ");
- GetTimInfo( (u_long*)ball16c, &tim ); /* Get TIM parameters */
+ GetTimInfo( ball16c, &tim ); /* Get TIM parameters */
LoadImage( tim.prect, tim.paddr ); /* Upload texture to VRAM */
if( tim.mode & 0x8 ) {