Rev 1 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 18 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | 14 | ||
15 | va_start(ap, fmt2); |
15 | va_start(ap, fmt2); |
16 | vprintf(fmt2, ap); |
16 | vprintf(fmt2, ap); |
17 | va_end(ap); |
17 | va_end(ap); |
18 | 18 | ||
- | 19 | puts("\033[0m"); |
|
- | 20 | } |
|
- | 21 | ||
- | 22 | void panic_printf(const char* fmt, const char* fn, const char* fmt2, ...) { |
|
- | 23 | va_list ap; |
|
- | 24 | ||
- | 25 | FILE* fp = fopen("dethrace.log", "w"); |
|
- | 26 | ||
- | 27 | puts("\033[0;31m"); |
|
- | 28 | printf(fmt, fn); |
|
- | 29 | ||
- | 30 | if (fp != NULL) { |
|
- | 31 | fprintf(fp, fmt, fn); |
|
- | 32 | } |
|
- | 33 | ||
- | 34 | va_start(ap, fmt2); |
|
- | 35 | vprintf(fmt2, ap); |
|
- | 36 | if (fp != NULL) { |
|
- | 37 | vfprintf(fp, fmt2, ap); |
|
- | 38 | } |
|
- | 39 | va_end(ap); |
|
- | 40 | if (fp != NULL) { |
|
- | 41 | fclose(fp); |
|
- | 42 | } |
|
19 | puts("\033[0m"); |
43 | puts("\033[0m"); |
20 | } |
44 | } |
21 | 45 | ||
22 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v) { |
46 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v) { |
23 | printf(fmt, fn); |
47 | printf(fmt, fn); |