mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 23:22:01 +00:00
Fixes for coloration and stuff.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@688 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2029117eda
commit
87f7ea06ef
4 changed files with 40 additions and 36 deletions
|
@ -1167,9 +1167,9 @@ void Con_DrawConsole (int lines, qboolean noback)
|
||||||
// draw it
|
// draw it
|
||||||
y = con->vislines-22 + 8;
|
y = con->vislines-22 + 8;
|
||||||
for (i = 0; i < strlen(dlbar); i++)
|
for (i = 0; i < strlen(dlbar); i++)
|
||||||
Draw_Character ( (i+1)<<3, y, dlbar[i]);
|
Draw_ColouredCharacter ( (i+1)<<3, y, (unsigned char)dlbar[i] | M_COLOR_WHITE);
|
||||||
|
|
||||||
Draw_Character ((n+1+x)*8, y, '\x83');
|
Draw_ColouredCharacter ((n+1+x)*8, y, (unsigned char)'\x83' | M_COLOR_WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the input prompt, user text, and cursor if desired
|
// draw the input prompt, user text, and cursor if desired
|
||||||
|
|
|
@ -73,7 +73,7 @@ static void NM_Print (int cx, int cy, qbyte *str)
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
Draw_ColouredCharacter (cx, cy, (*str)|128);
|
Draw_ColouredCharacter (cx, cy, (*str)|128+M_COLOR_WHITE);
|
||||||
str++;
|
str++;
|
||||||
cx += 8;
|
cx += 8;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ static void NM_PrintWhite (int cx, int cy, qbyte *str)
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
Draw_ColouredCharacter (cx, cy, (*str));
|
Draw_ColouredCharacter (cx, cy, (*str)+M_COLOR_WHITE);
|
||||||
str++;
|
str++;
|
||||||
cx += 8;
|
cx += 8;
|
||||||
}
|
}
|
||||||
|
@ -293,9 +293,9 @@ void M_DrawServerList(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
text = "No servers found";
|
text = "No servers found";
|
||||||
NM_PrintColoured((vid.width-strlen(text)*8)/2, 8*5, 0, text);
|
NM_PrintColoured((vid.width-strlen(text)*8)/2, 8*5, COLOR_WHITE, text);
|
||||||
NM_PrintColoured((vid.width-strlen(text2)*8)/2, 8*5+8, 0, text2);
|
NM_PrintColoured((vid.width-strlen(text2)*8)/2, 8*5+8, COLOR_WHITE, text2);
|
||||||
NM_PrintColoured((vid.width-strlen(text3)*8)/2, 8*5+16, 0, text3);
|
NM_PrintColoured((vid.width-strlen(text3)*8)/2, 8*5+16, COLOR_WHITE, text3);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -362,17 +362,17 @@ void M_DrawServerList(void)
|
||||||
if (*server->name)
|
if (*server->name)
|
||||||
{
|
{
|
||||||
if (blink)
|
if (blink)
|
||||||
colour = 6;
|
colour = COLOR_CYAN;
|
||||||
else if (server->special & SS_FAVORITE)
|
else if (server->special & SS_FAVORITE)
|
||||||
colour = 2;
|
colour = COLOR_GREEN;
|
||||||
else if (server->special & SS_FTESERVER)
|
else if (server->special & SS_FTESERVER)
|
||||||
colour = 1;
|
colour = COLOR_RED;
|
||||||
else if (server->special & SS_QUAKE2)
|
else if (server->special & SS_QUAKE2)
|
||||||
colour = 3;
|
colour = COLOR_YELLOW;
|
||||||
else if (server->special & SS_NETQUAKE)
|
else if (server->special & SS_NETQUAKE)
|
||||||
colour = 5;
|
colour = COLOR_MAGENTA;
|
||||||
else
|
else
|
||||||
colour = 0;
|
colour = COLOR_WHITE;
|
||||||
|
|
||||||
x = vid.width;
|
x = vid.width;
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ void M_DrawSources (void)
|
||||||
text = "All servers were filtered out\n";
|
text = "All servers were filtered out\n";
|
||||||
else
|
else
|
||||||
text = "No sources were found\n";
|
text = "No sources were found\n";
|
||||||
NM_PrintColoured((vid.width-strlen(text)*8)/2, 8*5, 0, text);
|
NM_PrintColoured((vid.width-strlen(text)*8)/2, 8*5, COLOR_WHITE, text);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -461,15 +461,15 @@ void M_DrawSources (void)
|
||||||
if (blink)
|
if (blink)
|
||||||
NM_PrintColoured(46, y, 6, va("%s", mast->name)); //blinking.
|
NM_PrintColoured(46, y, 6, va("%s", mast->name)); //blinking.
|
||||||
else if (mast->type == MT_MASTERQW || mast->type == MT_MASTERQ2)
|
else if (mast->type == MT_MASTERQW || mast->type == MT_MASTERQ2)
|
||||||
NM_PrintColoured(46, y, 0, va("%s", mast->name)); //white.
|
NM_PrintColoured(46, y, COLOR_WHITE, va("%s", mast->name)); //white.
|
||||||
#ifdef NQPROT
|
#ifdef NQPROT
|
||||||
else if (mast->type == MT_SINGLENQ)
|
else if (mast->type == MT_SINGLENQ)
|
||||||
NM_PrintColoured(46, y, 2, va("%s", mast->name)); //green.
|
NM_PrintColoured(46, y, COLOR_GREEN, va("%s", mast->name)); //green.
|
||||||
#endif
|
#endif
|
||||||
else if (mast->type == MT_SINGLEQW || mast->type == MT_SINGLEQ2)
|
else if (mast->type == MT_SINGLEQW || mast->type == MT_SINGLEQ2)
|
||||||
NM_PrintColoured(46, y, 2, va("%s", mast->name)); //green.
|
NM_PrintColoured(46, y, COLOR_GREEN, va("%s", mast->name)); //green.
|
||||||
else
|
else
|
||||||
NM_PrintColoured(46, y, 1, va("%s", mast->name)); //red.
|
NM_PrintColoured(46, y, COLOR_RED, va("%s", mast->name)); //red.
|
||||||
y+=8;
|
y+=8;
|
||||||
snum++;
|
snum++;
|
||||||
}
|
}
|
||||||
|
@ -512,9 +512,9 @@ void M_DrawSListOptions (void)
|
||||||
for (op = 0; op < NUMSLISTOPTIONS; op++)
|
for (op = 0; op < NUMSLISTOPTIONS; op++)
|
||||||
{
|
{
|
||||||
if (slist_option == op && (int)(realtime*3)&1)
|
if (slist_option == op && (int)(realtime*3)&1)
|
||||||
c = 6; //cyan
|
c = COLOR_CYAN; //cyan
|
||||||
else
|
else
|
||||||
c = options[op].cvar->value>0 || (*options[op].cvar->string && *options[op].cvar->string != '0');//red if on.
|
c = (options[op].cvar->value>0 || (*options[op].cvar->string && *options[op].cvar->string != '0'))?COLOR_RED:COLOR_WHITE;//red if on.
|
||||||
switch(options[op].type)
|
switch(options[op].type)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -599,12 +599,12 @@ void M_DrawServers(void)
|
||||||
lofs = width/2 - 7*4;
|
lofs = width/2 - 7*4;
|
||||||
for (snum = 0; snum < NUMSLISTHEADERS; snum++)
|
for (snum = 0; snum < NUMSLISTHEADERS; snum++)
|
||||||
{
|
{
|
||||||
NM_PrintColoured(width*snum+width/2 - strlen(titles[snum])*4, 0, slist_type==snum, titles[snum]);
|
NM_PrintColoured(width*snum+width/2 - strlen(titles[snum])*4, 0, slist_type==snum?COLOR_RED:COLOR_WHITE, titles[snum]);
|
||||||
}
|
}
|
||||||
NM_PrintColoured(8, 8, 0, "\35");
|
NM_PrintColoured(8, 8, COLOR_WHITE, "\35");
|
||||||
for (snum = 16; snum < vid.width-16; snum+=8)
|
for (snum = 16; snum < vid.width-16; snum+=8)
|
||||||
NM_PrintColoured(snum, 8, 0, "\36");
|
NM_PrintColoured(snum, 8, COLOR_WHITE, "\36");
|
||||||
NM_PrintColoured(snum, 8, 0, "\37");
|
NM_PrintColoured(snum, 8, COLOR_WHITE, "\37");
|
||||||
|
|
||||||
switch(slist_type)
|
switch(slist_type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,23 +36,25 @@ extern consolecolours_t consolecolours[MAXCONCOLOURS];
|
||||||
#define CON_BLINKTEXT 0x4000
|
#define CON_BLINKTEXT 0x4000
|
||||||
#define CON_2NDCHARSETTEXT 0x8000
|
#define CON_2NDCHARSETTEXT 0x8000
|
||||||
|
|
||||||
#define COLOR_WHITE '0'
|
#define COLOR_BLACK 0
|
||||||
#define COLOR_RED '1'
|
#define COLOR_RED 1
|
||||||
#define COLOR_GREEN '2'
|
#define COLOR_GREEN 2
|
||||||
#define COLOR_YELLOW '3'
|
#define COLOR_YELLOW 3
|
||||||
#define COLOR_BLUE '4'
|
#define COLOR_BLUE 4
|
||||||
#define COLOR_CYAN '5'
|
#define COLOR_MAGENTA 5
|
||||||
#define COLOR_MAGENTA '6'
|
#define COLOR_CYAN 6
|
||||||
#define COLOR_BLACK '7'
|
#define COLOR_WHITE 7
|
||||||
|
|
||||||
#define S_COLOR_WHITE "^0" //q3 uses 7. Fix some time?
|
#define M_COLOR_WHITE ((COLOR_WHITE)<<8)
|
||||||
|
|
||||||
|
#define S_COLOR_BLACK "^0"
|
||||||
#define S_COLOR_RED "^1"
|
#define S_COLOR_RED "^1"
|
||||||
#define S_COLOR_GREEN "^2"
|
#define S_COLOR_GREEN "^2"
|
||||||
#define S_COLOR_YELLOW "^3"
|
#define S_COLOR_YELLOW "^3"
|
||||||
#define S_COLOR_BLUE "^4"
|
#define S_COLOR_BLUE "^4"
|
||||||
#define S_COLOR_CYAN "^5"
|
#define S_COLOR_MAGENTA "^5"
|
||||||
#define S_COLOR_MAGENTA "^6"
|
#define S_COLOR_CYAN "^6"
|
||||||
#define S_COLOR_BLACK "^7" //q3 uses 0
|
#define S_COLOR_WHITE "^7"
|
||||||
|
|
||||||
#define CON_TEXTSIZE 16384
|
#define CON_TEXTSIZE 16384
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -485,6 +485,7 @@ SOURCE=..\client\cl_cam.c
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\client\cl_cg.c
|
SOURCE=..\client\cl_cg.c
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
@ -841,6 +842,7 @@ SOURCE=..\client\clq2_ents.c
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\client\clq3_parse.c
|
SOURCE=..\client\clq3_parse.c
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue