Skip to content

Commit 05e4010

Browse files
committed
console improvements ported from libctru
extends ansi escape code support and allows codes to be spread across multiple prints
1 parent efb0217 commit 05e4010

File tree

3 files changed

+728
-301
lines changed

3 files changed

+728
-301
lines changed

gc/ogc/consol.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
#define console_init CON_Init
1414
#define SYS_ConsoleInit CON_InitEx
1515

16+
#define CONSOLE_ESC(x) "\x1b[" #x
17+
#define CONSOLE_RESET CONSOLE_ESC(0m)
18+
#define CONSOLE_BLACK CONSOLE_ESC(30m)
19+
#define CONSOLE_RED CONSOLE_ESC(31;1m)
20+
#define CONSOLE_GREEN CONSOLE_ESC(32;1m)
21+
#define CONSOLE_YELLOW CONSOLE_ESC(33;1m)
22+
#define CONSOLE_BLUE CONSOLE_ESC(34;1m)
23+
#define CONSOLE_MAGENTA CONSOLE_ESC(35;1m)
24+
#define CONSOLE_CYAN CONSOLE_ESC(36;1m)
25+
#define CONSOLE_WHITE CONSOLE_ESC(37;1m)
26+
1627
#ifdef __cplusplus
1728
extern "C" {
1829
#endif

0 commit comments

Comments
 (0)