1
0
Fork 0
forked from fte/fteqw

Fixed colour codes in centerprints.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2385 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-09-18 22:47:06 +00:00
parent 9d84f0a60d
commit 7e3b3d3df7

View file

@ -199,6 +199,7 @@ void CopyAndMarkup(conchar_t *dest, qbyte *src, int maxlength)
if (*src >= '0' && *src <= '9') if (*src >= '0' && *src <= '9')
{ {
ext = q3codemasks[*src - '0'] | (ext&~CON_Q3MASK); ext = q3codemasks[*src - '0'] | (ext&~CON_Q3MASK);
src++;
continue; continue;
} }
else if (*src == '&') // extended code else if (*src == '&') // extended code
@ -460,6 +461,7 @@ void SCR_DrawCenterString (int pnum)
int x, y; int x, y;
int remaining; int remaining;
int hd = 1; int hd = 1;
int screenwidth;
vrect_t rect; vrect_t rect;
@ -486,6 +488,8 @@ void SCR_DrawCenterString (int pnum)
y += rect.y; y += rect.y;
screenwidth = 40;//vid.width/8;
if ((start[0]&255) == '/') if ((start[0]&255) == '/')
{ {
if ((start[1]&255) == 'O') if ((start[1]&255) == 'O')
@ -506,10 +510,10 @@ void SCR_DrawCenterString (int pnum)
do do
{ {
// scan the width of the line // scan the width of the line
for (l=0 ; l<40 ; l++) for (l=0 ; l<=screenwidth ; l++)
if ((start[l]&255) == '\n' || !(start[l]&255)) if ((start[l]&255) == '\n' || !(start[l]&255))
break; break;
if (l == 40) if (l == screenwidth+1)
{ {
while(l > 0 && (start[l-1]&255)>' ' && (start[l-1]&255) != ' '+128) while(l > 0 && (start[l-1]&255)>' ' && (start[l-1]&255) != ' '+128)
{ {