Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 18 | Rev 20 | ||
---|---|---|---|
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 | } |
- | |
43 | puts("\033[0m"); |
19 | puts("\033[0m"); |
44 | } |
20 | } |
45 | 21 | ||
46 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v) { |
22 | void debug_print_vector3(const char* fmt, const char* fn, char* msg, br_vector3* v) { |
47 | printf(fmt, fn); |
23 | printf(fmt, fn); |