setfont command

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5367 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Alejandro V. Garcia
2010-07-14 08:33:20 +00:00
parent 5d8eb89062
commit 3ac4069326
3 changed files with 16 additions and 1 deletions
+6
View File
@@ -2896,6 +2896,12 @@ docargument [H] [height] [] [0];
docident [setfont] [Changes the current font.];
docargument [N] [Font name] [name of the font] [0];
docident [shadowcasters] [];
docargument [V] [] [min 1/max 0/default 0];
+6
View File
@@ -3205,6 +3205,12 @@ Output:
<argument token="A" description="" valueNotes="value"/>
</arguments>
</command>
<command name="setfont">
<description>Changes the current font.</description>
<arguments>
<argument token="N" description="Font name" valueNotes="name of the font"/>
</arguments>
</command>
<variable name="fov">
<description>Sets the field of view (fov).</description>
<value token="N" description="the FOV value" minValue="75" maxValue="120" defaultValue="90"/>
+4 -1
View File
@@ -63,6 +63,7 @@ bool setfont(const char *name)
curfont = f;
return true;
}
COMMAND(setfont, ARG_1STR);
font *getfont(const char *name)
{
@@ -308,7 +309,7 @@ static void text_color(char c, char *stack, int size, int &sp, bvec color, int a
else stack[sp] = c;
switch(abs(stack[sp]))
{
case '0': color = bvec( 64, 255, 128 ); break; // green: player talk
case '0': color = bvec( 2, 255, 128 ); break; // green: player talk
case '1': color = bvec( 96, 160, 255 ); break; // blue: team chat
case '2': color = bvec( 255, 192, 64 ); break; // yellow: gameplay action messages, only actions done by players
case '3': color = bvec( 255, 64, 64 ); break; // red: important errors and notes
@@ -318,6 +319,8 @@ static void text_color(char c, char *stack, int size, int &sp, bvec color, int a
case '7': color = bvec( 128, 48, 48 ); break; // dark red: dead admin
case '8': color = bvec( 192, 64, 192 ); break; // magenta
case '9': color = bvec( 255, 128, 0 ); break; // orange
case 'a': case 'A':color = bvec( 10, 10, 10 ); break; // black
case 'z': case 'Z':color = bvec( 0x30, 0x67, 0x54); break; // sea green
// white (provided color): everything else
//default: color = bvec( 255, 255, 255 ); break;
}