summaryrefslogtreecommitdiffhomepage
path: root/src/con_.h
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2023-05-02 19:16:22 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2023-05-04 23:49:27 +0100
commit5194eeb0e7bb5d2a2086c96ed04c2a47f9594d87 (patch)
treea32ab5c832ae312cb8ddd9fb45dc3f894ac39820 /src/con_.h
parentbb5ce99e6cac43414a4bc61a636888e9f1f69b8c (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_.h13
1 files changed, 3 insertions, 10 deletions
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