diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2023-05-02 19:16:22 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2023-05-04 23:49:27 +0100 |
commit | 5194eeb0e7bb5d2a2086c96ed04c2a47f9594d87 (patch) | |
tree | a32ab5c832ae312cb8ddd9fb45dc3f894ac39820 /src/con_.h | |
parent | bb5ce99e6cac43414a4bc61a636888e9f1f69b8c (diff) |
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.
Diffstat (limited to 'src/con_.h')
-rw-r--r-- | src/con_.h | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -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 |