Browse Source

Restore hud_utf8

pull/2/head
Alibek Omarov 7 years ago
parent
commit
545b781934
  1. 8
      engine/client/cl_game.c
  2. 2
      engine/client/cl_main.c
  3. 1
      engine/client/client.h

8
engine/client/cl_game.c

@ -1838,6 +1838,9 @@ static int pfnDrawCharacter( int x, int y, int number, int r, int g, int b ) @@ -1838,6 +1838,9 @@ static int pfnDrawCharacter( int x, int y, int number, int r, int g, int b )
if( !cls.creditsFont.valid )
return 0;
if( hud_utf8->value )
number = Con_UtfProcessChar( number );
number &= 255;
if( number < 32 ) return 0;
@ -2879,11 +2882,8 @@ pfnVGUI2DrawCharacterAdditive @@ -2879,11 +2882,8 @@ pfnVGUI2DrawCharacterAdditive
*/
static int GAME_EXPORT pfnVGUI2DrawCharacterAdditive( int x, int y, int ch, int r, int g, int b, unsigned int font )
{
/// TODO: fix UTF-8
#if 0
if( !hud_utf8->integer )
if( !hud_utf8->value )
ch = Con_UtfProcessChar( ch );
#endif
return pfnDrawCharacter( x, y, ch, r, g, b );
}

2
engine/client/cl_main.c

@ -67,6 +67,7 @@ convar_t *cl_interp; @@ -67,6 +67,7 @@ convar_t *cl_interp;
convar_t *cl_dlmax;
convar_t *cl_lw;
convar_t *cl_charset;
convar_t *hud_utf8;
//
// userinfo
@ -2532,6 +2533,7 @@ void CL_InitLocal( void ) @@ -2532,6 +2533,7 @@ void CL_InitLocal( void )
cl_interp = Cvar_Get( "ex_interp", "0.1", FCVAR_ARCHIVE, "Interpolate object positions starting this many seconds in past" );
cl_timeout = Cvar_Get( "cl_timeout", "60", 0, "connect timeout (in-seconds)" );
cl_charset = Cvar_Get( "cl_charset", "utf-8", FCVAR_ARCHIVE, "1-byte charset to use (iconv style)" );
hud_utf8 = Cvar_Get( "hud_utf8", "0", FCVAR_ARCHIVE, "Use utf-8 encoding for hud text" );
rcon_client_password = Cvar_Get( "rcon_password", "", 0, "remote control client password" );
rcon_address = Cvar_Get( "rcon_address", "", 0, "remote control address" );

1
engine/client/client.h

@ -701,6 +701,7 @@ extern convar_t *cl_bmodelinterp; @@ -701,6 +701,7 @@ extern convar_t *cl_bmodelinterp;
extern convar_t *cl_righthand;
extern convar_t *cl_lw; // local weapons
extern convar_t *cl_charset;
extern convar_t *hud_utf8;
extern convar_t *cl_showevents;
extern convar_t *scr_centertime;
extern convar_t *scr_viewsize;

Loading…
Cancel
Save