source: Daodan/src/Daodan_Console.c@ 682

Last change on this file since 682 was 677, checked in by alloc, 12 years ago

Daodan: Updated src to work with MinGW

File size: 1.3 KB
RevLine 
[437]1#include <stdlib.h>
2#include <stdarg.h>
[677]3//#include <stdint.h>
[437]4
5#include "Daodan_Console.h"
6#include "BFW_Utility.h"
[677]7#include "Oni_Symbols.h"
[437]8
9void DDrConsole_Print(const char* text)
10{
11 COrTextArea_Print(COgConsoleLines, 1, COgDefaultTextShade, COgDefaultTextShadow, text, 0, COgFadeTimeValue);
12}
13
[446]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
[437]21void DDrConsole_PrintF(const char* fmt, ...)
22{
[677]23 char* buffer;
[437]24 va_list ap;
25 va_start(ap, fmt);
[677]26 buffer = malloc(vsnprintf(NULL, 0, fmt, ap) + 1);
[437]27
28 vsprintf(buffer, fmt, ap);
29 va_end(ap);
30
31 DDrConsole_Print(buffer);
32 free(buffer);
33 return;
34}
[476]35
36TStColorFormattingCharacter DDrDSayColors[] = {
[677]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
[477]45 //New Colors Here...
[677]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
[477]51 {0} //POWER RANGERS GO!
[476]52};
53
54
Note: See TracBrowser for help on using the repository browser.