[437] | 1 | #include <stdlib.h>
|
---|
| 2 | #include <stdarg.h>
|
---|
| 3 |
|
---|
| 4 | #include "Daodan_Console.h"
|
---|
[677] | 5 | #include "Oni_Symbols.h"
|
---|
[437] | 6 |
|
---|
| 7 | void DDrConsole_Print(const char* text)
|
---|
| 8 | {
|
---|
| 9 | COrTextArea_Print(COgConsoleLines, 1, COgDefaultTextShade, COgDefaultTextShadow, text, 0, COgFadeTimeValue);
|
---|
| 10 | }
|
---|
| 11 |
|
---|
[446] | 12 | void 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 |
|
---|
[437] | 19 | void DDrConsole_PrintF(const char* fmt, ...)
|
---|
| 20 | {
|
---|
[677] | 21 | char* buffer;
|
---|
[437] | 22 | va_list ap;
|
---|
| 23 | va_start(ap, fmt);
|
---|
[677] | 24 | buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1);
|
---|
[437] | 25 |
|
---|
| 26 | vsprintf(buffer, fmt, ap);
|
---|
| 27 | va_end(ap);
|
---|
| 28 |
|
---|
| 29 | DDrConsole_Print(buffer);
|
---|
| 30 | free(buffer);
|
---|
| 31 | return;
|
---|
| 32 | }
|
---|
[476] | 33 |
|
---|
| 34 | TStColorFormattingCharacter DDrDSayColors[] = {
|
---|
[677] | 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
|
---|
[477] | 43 | //New Colors Here...
|
---|
[677] | 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
|
---|
[689] | 49 | {0, 0, 0} //POWER RANGERS GO!
|
---|
[476] | 50 | };
|
---|
| 51 |
|
---|
[689] | 52 |
|
---|