mirror of
https://github.com/zeldaret/oot
synced 2026-08-22 06:44:46 -04:00
[iQue] Create/update macros for printing debug strings (#2398)
This commit is contained in:
+28
-1
@@ -1,6 +1,7 @@
|
||||
#ifndef MACROS_H
|
||||
#define MACROS_H
|
||||
|
||||
#include "terminal.h"
|
||||
#include "versions.h"
|
||||
|
||||
#ifndef AVOID_UB
|
||||
@@ -54,11 +55,37 @@
|
||||
#elif IDO_PRINTF_WORKAROUND
|
||||
#define PRINTF(args) (void)0
|
||||
#elif defined(__GNUC__) && __GNUC__ < 3
|
||||
#define PRINTF(format, args...) (void)0
|
||||
#define PRINTF(format, args...) while (0) osSyncPrintf(format, ##args)
|
||||
#else
|
||||
#define PRINTF(format, ...) (void)0
|
||||
#endif
|
||||
|
||||
#if DEBUG_FEATURES
|
||||
#define PRINTF_COLOR_BLACK() PRINTF(VT_FGCOL(BLACK))
|
||||
#define PRINTF_COLOR_RED() PRINTF(VT_FGCOL(RED))
|
||||
#define PRINTF_COLOR_GREEN() PRINTF(VT_FGCOL(GREEN))
|
||||
#define PRINTF_COLOR_YELLOW() PRINTF(VT_FGCOL(YELLOW))
|
||||
#define PRINTF_COLOR_BLUE() PRINTF(VT_FGCOL(BLUE))
|
||||
#define PRINTF_COLOR_MAGENTA() PRINTF(VT_FGCOL(MAGENTA))
|
||||
#define PRINTF_COLOR_CYAN() PRINTF(VT_FGCOL(CYAN))
|
||||
#define PRINTF_COLOR_WHITE() PRINTF(VT_FGCOL(WHITE))
|
||||
#define PRINTF_COLOR_WARNING() PRINTF(VT_COL(YELLOW, BLACK))
|
||||
#define PRINTF_COLOR_ERROR() PRINTF(VT_COL(RED, WHITE))
|
||||
#define PRINTF_RST() PRINTF(VT_RST)
|
||||
#else
|
||||
#define PRINTF_COLOR_BLACK() (void)0
|
||||
#define PRINTF_COLOR_RED() (void)0
|
||||
#define PRINTF_COLOR_GREEN() (void)0
|
||||
#define PRINTF_COLOR_YELLOW() (void)0
|
||||
#define PRINTF_COLOR_BLUE() (void)0
|
||||
#define PRINTF_COLOR_MAGENTA() (void)0
|
||||
#define PRINTF_COLOR_CYAN() (void)0
|
||||
#define PRINTF_COLOR_WHITE() (void)0
|
||||
#define PRINTF_COLOR_WARNING() (void)0
|
||||
#define PRINTF_COLOR_ERROR() (void)0
|
||||
#define PRINTF_RST() (void)0
|
||||
#endif
|
||||
|
||||
#if DEBUG_FEATURES
|
||||
#define LOG(exp, value, format, file, line) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user