From 5194eeb0e7bb5d2a2086c96ed04c2a47f9594d87 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 2 May 2023 19:16:22 +0100 Subject: Refactor the RGBA colour struct into engineapi.h In both the engine and SST it's used in more places than just console printing, so it makes more sense to give it a more appropriate nanme and location. --- src/con_.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/con_.h') diff --git a/src/con_.h b/src/con_.h index a6b2837..6d67e51 100644 --- a/src/con_.h +++ b/src/con_.h @@ -38,15 +38,6 @@ struct con_cmdargs { const char *argv[CON_CMD_MAX_ARGC]; }; -/* an RGBA colour, passed to con_colourmsg */ -struct con_colour { - union { - struct { u8 r, g, b, a; }; - u32 val; - uchar bytes[4]; - }; -}; - #define CON_CMD_MAXCOMPLETE 64 #define CON_CMD_MAXCOMPLLEN 64 @@ -196,8 +187,10 @@ void con_warn(const char *fmt, ...) _CON_PRINTF(1, 2) __asm__("Warning"); #error Need an equivalent of asm names for your compiler! #endif +struct rgba; // in engineapi.h - forward declare here to avoid warnings + extern void *_con_iface; -extern void (*_con_colourmsgf)(void *this, const struct con_colour *c, +extern void (*_con_colourmsgf)(void *this, const struct rgba *c, const char *fmt, ...) _CON_PRINTF(3, 4); /* * This provides the same functionality as ConColorMsg which was removed from -- cgit v1.2.3