source: Daodan/src/Daodan_Console.c@ 441

Last change on this file since 441 was 437, checked in by rossy, 15 years ago

Daodan_Console

File size: 529 bytes
RevLine 
[437]1#include <stdlib.h>
2#include <stdarg.h>
3#include <stdint.h>
4
5#include "Daodan_Console.h"
6#include "BFW_Utility.h"
7
8void DDrConsole_Print(const char* text)
9{
10 COrTextArea_Print(COgConsoleLines, 1, COgDefaultTextShade, COgDefaultTextShadow, text, 0, COgFadeTimeValue);
11}
12
13void 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}
Note: See TracBrowser for help on using the repository browser.