source: Daodan/MSVC/Daodan_Console.c@ 983

Last change on this file since 983 was 567, checked in by gumby, 14 years ago

Daodan MSVC

File size: 1.3 KB
Line 
1#include <stdlib.h>
2#include <stdarg.h>
3//#include <stdint.h>
4
5#include "Daodan_Console.h"
6#include "BFW_Utility.h"
7#include "Oni_Symbols.h"
8
9void DDrConsole_Print(const char* text)
10{
11 COrTextArea_Print(COgConsoleLines, 1, COgDefaultTextShade, COgDefaultTextShadow, text, 0, COgFadeTimeValue);
12}
13
14void DDrConsole_PrintColored(const char* text, int priority, RGBA color, RGBA shade)
15{
16 int* intcolor = (int*)&color;
17 int* intshade = (int*)&shade;
18 COrTextArea_Print(COgConsoleLines, 1, *intcolor, *intshade, text, 0, COgFadeTimeValue);
19}
20
21void DDrConsole_PrintF(const char* fmt, ...)
22{
23 char* buffer;
24 va_list ap;
25 va_start(ap, fmt);
26 buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1);
27
28 vsprintf(buffer, fmt, ap);
29 va_end(ap);
30
31 DDrConsole_Print(buffer);
32 free(buffer);
33 return;
34}
35
36TStColorFormattingCharacter DDrDSayColors[] = {
37 {'r', 0, 0xFFEB5050}, //red
38 {'y', 0, 0xFFFCFF1C}, //yellow
39 {'b', 0, 0xFF93BBE9}, //blue
40 {'u', 0, 0xFFF67603}, //umber
41 {'g', 0, 0xFFA2DAA5}, //green
42 {'l', 0, 0xFFBE90D9}, //lilac
43 {'o', 0, 0xFFFBA500}, //orange
44 {'c', 0, 0xFF93EAEB}, //cyan
45 //New Colors Here...
46 {'k', 0, 0xFF000000}, //black
47 {'v', 0, 0xFFEB40EB}, //violet
48 {'w', 0, 0xFFFFFFFF}, //white...
49 {'e', 0, 0xFF505050}, //darkgrey
50 {'f', 0, 0xFFAAAAAA}, //grey
51 {0} //POWER RANGERS GO!
52};
53
54
Note: See TracBrowser for help on using the repository browser.