summaryrefslogtreecommitdiffhomepage
path: root/src/dbg.c
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/dbg.c
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/dbg.c')
-rw-r--r--src/dbg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dbg.c b/src/dbg.c
index 06b88f8..2eb88f6 100644
--- a/src/dbg.c
+++ b/src/dbg.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2022 Michael Smith <mikesmiffy128@gmail.com>
+ * Copyright © 2023 Michael Smith <mikesmiffy128@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -19,12 +19,13 @@
#endif
#include "con_.h"
+#include "engineapi.h"
#include "intdefs.h"
#include "ppmagic.h"
#include "udis86.h"
void dbg_hexdump(char *name, const void *p, int len) {
- struct con_colour nice_colour = {160, 64, 200, 255}; // a nice purple colour
+ struct rgba nice_colour = {160, 64, 200, 255}; // a nice purple colour
con_colourmsg(&nice_colour, "Hex dump \"%s\" (%p):", name, p);
for (const uchar *cp = p; cp - (uchar *)p < len; ++cp) {
// group into words and wrap every 8 words
@@ -38,7 +39,7 @@ void dbg_hexdump(char *name, const void *p, int len) {
}
void dbg_asmdump(char *name, const void *p, int len) {
- struct con_colour nice_colour = {40, 160, 140, 255}; // a nice teal colour
+ struct rgba nice_colour = {40, 160, 140, 255}; // a nice teal colour
struct ud udis;
ud_init(&udis);
ud_set_mode(&udis, 32);