diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-30 00:53:31 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-07-30 00:53:31 +0200 |
| commit | 073a859acf16ccbc0f49364e38126bf2bf03aa3d (patch) | |
| tree | 90fac6072c5fe3ccee0505c881f89aa262d4eed7 /libpsn00b/psxgpu/font.c | |
| parent | 0e755e9801a2dcf7b9827c90cc38e9f532d06393 (diff) | |
| download | psn00bsdk-073a859acf16ccbc0f49364e38126bf2bf03aa3d.tar.gz | |
Deprecate u_short, u_int and u_long types in libpsn00b
Diffstat (limited to 'libpsn00b/psxgpu/font.c')
| -rw-r--r-- | libpsn00b/psxgpu/font.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/libpsn00b/psxgpu/font.c b/libpsn00b/psxgpu/font.c index 7a8137c..2d4105f 100644 --- a/libpsn00b/psxgpu/font.c +++ b/libpsn00b/psxgpu/font.c @@ -1,4 +1,4 @@ -#include <sys/types.h> +#include <stdint.h> #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -6,29 +6,28 @@ #include <psxgpu.h> typedef struct _fnt_stream { - char *txtbuff; - char *txtnext; - char *pribuff; - short x,y; - short w,h; - int bg; - int maxchars; + char *txtbuff; + char *txtnext; + char *pribuff; + int16_t x, y; + int16_t w, h; + int bg, maxchars; } _fnt_stream; static _fnt_stream _stream[8]; static int _nstreams = 0; -u_short _font_tpage; -u_short _font_clut; +uint16_t _font_tpage; +uint16_t _font_clut; -extern u_char _gpu_debug_font[]; +extern uint8_t _gpu_debug_font[]; void FntLoad(int x, int y) { RECT pos; TIM_IMAGE tim; - GetTimInfo( (const u_long *) _gpu_debug_font, &tim ); + GetTimInfo( (const uint32_t *) _gpu_debug_font, &tim ); // Load font image pos = *tim.prect; @@ -215,7 +214,7 @@ char *FntFlush(int id) { // Draw the primitives DrawSync(0); - DrawOTag((u_long*)_stream[id].pribuff); + DrawOTag((uint32_t*)_stream[id].pribuff); DrawSync(0); _stream[id].txtnext = _stream[id].txtbuff; @@ -225,7 +224,7 @@ char *FntFlush(int id) { } -char *FntSort(u_long *ot, char *pri, int x, int y, const char *text) { +char *FntSort(uint32_t *ot, char *pri, int x, int y, const char *text) { DR_TPAGE *tpage; SPRT_8 *sprt = (SPRT_8*)pri; |
