1 |
#include <stdlib.h> |
2 |
#include <stdarg.h> |
3 |
#include <stdint.h> |
4 |
|
5 |
#include "Daodan_Console.h" |
6 |
#include "BFW_Utility.h" |
7 |
|
8 |
void DDrConsole_Print(const char* text) |
9 |
{ |
10 |
COrTextArea_Print(COgConsoleLines, 1, COgDefaultTextShade, COgDefaultTextShadow, text, 0, COgFadeTimeValue); |
11 |
} |
12 |
|
13 |
void DDrConsole_PrintF(const char* fmt, ...) |
14 |
{ |
15 |
va_list ap; |
16 |
va_start(ap, fmt); |
17 |
char* buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1); |
18 |
|
19 |
vsprintf(buffer, fmt, ap); |
20 |
va_end(ap); |
21 |
|
22 |
DDrConsole_Print(buffer); |
23 |
free(buffer); |
24 |
return; |
25 |
} |