From d6a0337fb1d80010eb0bb19623d52beef49eeee6 Mon Sep 17 00:00:00 2001 From: "Tony J. White" Date: Sat, 3 Oct 2009 11:45:48 +0000 Subject: * add variable width to emoticons support. In addition to being a .tga in the /emoticons/ dir of fs_game, emoticon file names need to end with "_{WIDTH}x1.tga". For example, /emoticons/dretch_1x1.tga (square) or /emoticons/rifle_2x1.tga (double-wide) --- src/ui/ui_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ui/ui_main.c') diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 8d18372d..730cc498 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -206,14 +206,19 @@ void AssetCache( void ) uiInfo.uiDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB ); if( ui_emoticons.integer ) - uiInfo.uiDC.Assets.emoticonCount = BG_LoadEmoticons( uiInfo.uiDC.Assets.emoticons ); + { + uiInfo.uiDC.Assets.emoticonCount = BG_LoadEmoticons( + uiInfo.uiDC.Assets.emoticons, + uiInfo.uiDC.Assets.emoticonWidths ); + } else uiInfo.uiDC.Assets.emoticonCount = 0; for( i = 0; i < uiInfo.uiDC.Assets.emoticonCount; i++ ) { uiInfo.uiDC.Assets.emoticonShaders[ i ] = trap_R_RegisterShaderNoMip( - va( "emoticons/%s.tga", uiInfo.uiDC.Assets.emoticons[ i ] ) ); + va( "emoticons/%s_%dx1.tga", uiInfo.uiDC.Assets.emoticons[ i ], + uiInfo.uiDC.Assets.emoticonWidths[ i ] ) ); } } -- cgit