diff options
author | Tony J. White <tjw@tjw.org> | 2009-10-03 11:45:48 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:19 +0000 |
commit | d6a0337fb1d80010eb0bb19623d52beef49eeee6 (patch) | |
tree | 169696862fadce29ceb728f41df95504d70c3670 /src/cgame | |
parent | c2f8f9a7f6a4cc3d0ca32a07e46a0803c2304095 (diff) |
* 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)
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 9a40a5c3..070992bd 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1680,14 +1680,18 @@ void CG_AssetCache( void ) cgDC.Assets.sliderThumb = trap_R_RegisterShaderNoMip( ASSET_SLIDER_THUMB ); if( cg_emoticons.integer ) - cgDC.Assets.emoticonCount = BG_LoadEmoticons( cgDC.Assets.emoticons ); + { + cgDC.Assets.emoticonCount = BG_LoadEmoticons( cgDC.Assets.emoticons, + cgDC.Assets.emoticonWidths ); + } else cgDC.Assets.emoticonCount = 0; for( i = 0; i < cgDC.Assets.emoticonCount; i++ ) { cgDC.Assets.emoticonShaders[ i ] = trap_R_RegisterShaderNoMip( - va( "emoticons/%s.tga", cgDC.Assets.emoticons[ i ] ) ); + va( "emoticons/%s_%dx1.tga", cgDC.Assets.emoticons[ i ], + cgDC.Assets.emoticonWidths[ i ] ) ); } } |