source: Daodan/src/Daodan_Console.c@ 699

Last change on this file since 699 was 692, checked in by alloc, 12 years ago

Daodan: Lots of cleanups (mostly unnecessary includes removed, empty files deleted, case of filenames corrected)

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