diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2022-09-26 16:49:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-26 16:49:56 +0800 |
| commit | c4a2533d21dfd05cde841ea48c67b05e0e6a853f (patch) | |
| tree | c7ef61653b157b69fb0956709366996ddbc4ecfa /examples/system/console/main.c | |
| parent | a8b404b3400c3ebd8e0b923dcaefcc49ea563e36 (diff) | |
| parent | 86f0064afb8200e60dd80827535cac30d0eab028 (diff) | |
| download | psn00bsdk-c4a2533d21dfd05cde841ea48c67b05e0e6a853f.tar.gz | |
Merge pull request #55 from spicyjpeg/psxmdec
Full MDEC support, C library refactors, cleanups and bugfixes (v0.20)
Diffstat (limited to 'examples/system/console/main.c')
| -rw-r--r-- | examples/system/console/main.c | 16 |
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 ) { |
