source: Daodan/src/Daodan_Console.c@ 577

Last change on this file since 577 was 477, checked in by gumby, 15 years ago

Added in all colors
Fixed Guard whatever for Daodan_Console.h

File size: 1.3 KB
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
[446]13void DDrConsole_PrintColored(const char* text, int priority, RGBA color, RGBA shade)
14{
15 int* intcolor = (int*)&color;
16 int* intshade = (int*)&shade;
17 COrTextArea_Print(COgConsoleLines, 1, *intcolor, *intshade, text, 0, COgFadeTimeValue);
18}
19
[437]20void DDrConsole_PrintF(const char* fmt, ...)
21{
22 va_list ap;
23 va_start(ap, fmt);
24 char* 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}
[476]33
34TStColorFormattingCharacter DDrDSayColors[] = {
[477]35 {'r', 0, 0, 0xFFEB5050}, //red
36 {'y', 0, 0, 0xFFFCFF1C}, //yellow
37 {'b', 0, 0, 0xFF93BBE9}, //blue
38 {'u', 0, 0, 0xFFF67603}, //umber
39 {'g', 0, 0, 0xFFA2DAA5}, //green
40 {'l', 0, 0, 0xFFBE90D9}, //lilac
41 {'o', 0, 0, 0xFFFBA500}, //orange
42 {'c', 0, 0, 0xFF93EAEB}, //cyan
43 //New Colors Here...
44 {'k', 0, 0, 0xFF000000}, //black
45 {'v', 0, 0, 0xFFEB40EB}, //violet
46 {'w', 0, 0, 0xFFFFFFFF}, //white...
47 {'e', 0, 0, 0xFF505050}, //darkgrey
48 {'f', 0, 0, 0xFFAAAAAA}, //grey
49 {0} //POWER RANGERS GO!
[476]50};
51
52
Note: See TracBrowser for help on using the repository browser.