From 5b3eabc250ee85929de8541f916d762f489c8b1f Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 3 Oct 2009 11:47:35 +0000 Subject: * Revert risujin's colour fix since it's 'fixed' in SVN now * Fix for controls menu bindings * Add and delete files that were added and deleted in tremulous SVN and I missed in the merge --- src/ui/ui_shared.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 850ac52f..027ca75a 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -4839,7 +4839,6 @@ void Item_Text_Wrapped_Paint( itemDef_t *item ) int paintLines, totalLines, lineNum = 0; float paintY; int i; - char lastCode = 0, newCode = 0; UI_CreateCacheEntry( textPtr, &item->window.rect, item->textscale ); @@ -4890,10 +4889,6 @@ void Item_Text_Wrapped_Paint( itemDef_t *item ) { int lineLength = &textPtr[ i ] - p; - // track any color escape sequences - if( i && Q_IsColorString( textPtr + i - 1 ) ) - newCode = textPtr[ i ]; - if( lineLength >= sizeof( buff ) - 1 ) break; @@ -4902,24 +4897,9 @@ void Item_Text_Wrapped_Paint( itemDef_t *item ) itemDef_t lineItem; int width, height; - // if there was a color escape before we need to insert it on the - // start of every line again, otherwise don't insert a color escape - // in order to preserve the item's assigned color - if( lastCode ) - { - buff[ 0 ] = Q_COLOR_ESCAPE; - buff[ 1 ] = lastCode; - strncpy( buff + 2, p, lineLength ); - buff[ lineLength + 2 ] = '\0'; - } - else - { - strncpy( buff, p, lineLength ); - buff[ lineLength ] = '\0'; - } - - lastCode = newCode; - + memset( &lineItem, 0, sizeof( itemDef_t ) ); + strncpy( buff, p, lineLength ); + buff[ lineLength ] = '\0'; p = &textPtr[ i + 1 ]; lineItem.type = ITEM_TYPE_TEXT; -- cgit