diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 11:47:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:21 +0000 |
commit | 5b3eabc250ee85929de8541f916d762f489c8b1f (patch) | |
tree | 3985f7f6ed95b994e471fc11adec39d49ee3f0d5 | |
parent | 97e55ebf684547b2298df1c8c77f3902e3041bd4 (diff) |
* 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
-rw-r--r-- | src/ui/ui_shared.c | 26 |
1 files 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; |