Rev 14 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14 | Rev 18 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | #define HARNESS_TRACE_H |
2 | #define HARNESS_TRACE_H |
3 | 3 | ||
4 | #include "brender |
4 | #include "brender.h" |
5 | #include <stdlib.h> |
5 | #include <stdlib.h> |
6 | 6 | ||
7 | extern int harness_debug_level; |
7 | extern int harness_debug_level; |
8 | 8 | ||
9 | void debug_printf(const char* fmt, const char* fn, const char* fmt2, ...); |
9 | void debug_printf(const char* fmt, const char* fn, const char* fmt2, ...); |
- | 10 | void panic_printf(const char* fmt, const char* fn, const char* fmt2, ...); |
|
10 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v); |
11 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v); |
11 | void debug_print_matrix34(const char* fmt, const char* fn, char* name, br_matrix34* m); |
12 | void debug_print_matrix34(const char* fmt, const char* fn, char* name, br_matrix34* m); |
12 | void debug_print_matrix4(const char* fmt, const char* fn, char* name, br_matrix4* m); |
13 | void debug_print_matrix4(const char* fmt, const char* fn, char* name, br_matrix4* m); |
13 | 14 | ||
14 | #define BLUE |
15 | #define BLUE |
Line 38... | Line 39... | ||
38 | #define LOG_MATRIX4(msg, m) debug_print_matrix4("\033[0;34m[DEBUG] %s ", __FUNCTION__, msg, m) |
39 | #define LOG_MATRIX4(msg, m) debug_print_matrix4("\033[0;34m[DEBUG] %s ", __FUNCTION__, msg, m) |
39 | #define LOG_INFO(...) debug_printf("[INFO] %s ", __FUNCTION__, __VA_ARGS__) |
40 | #define LOG_INFO(...) debug_printf("[INFO] %s ", __FUNCTION__, __VA_ARGS__) |
40 | #define LOG_WARN(...) debug_printf("\033[0;33m[WARN] %s ", __FUNCTION__, __VA_ARGS__) |
41 | #define LOG_WARN(...) debug_printf("\033[0;33m[WARN] %s ", __FUNCTION__, __VA_ARGS__) |
41 | #define LOG_PANIC(...) \ |
42 | #define LOG_PANIC(...) \ |
42 | do { \ |
43 | do { \ |
43 | |
44 | panic_printf("[PANIC] %s ", __FUNCTION__, __VA_ARGS__); \ |
44 | abort(); \ |
45 | abort(); \ |
45 | } while (0) |
46 | } while (0) |
46 | 47 | ||
47 | #define LOG_WARN_ONCE(...) \ |
48 | #define LOG_WARN_ONCE(...) \ |
48 | static int warn_printed = 0; \ |
49 | static int warn_printed = 0; \ |