diff --git a/engine/client/cl_font.c b/engine/client/cl_font.c index 1d8547d2..1f46d566 100644 --- a/engine/client/cl_font.c +++ b/engine/client/cl_font.c @@ -173,7 +173,7 @@ static int CL_CalcTabStop( const cl_font_t *font, int x ) return stop; } -int CL_DrawCharacter( float x, float y, int number, rgba_t color, cl_font_t *font, int flags ) +int CL_DrawCharacter( float x, float y, int number, const rgba_t color, cl_font_t *font, int flags ) { wrect_t *rc; float w, h; @@ -231,7 +231,7 @@ int CL_DrawCharacter( float x, float y, int number, rgba_t color, cl_font_t *fon return font->charWidths[number]; } -int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *font, int flags ) +int CL_DrawString( float x, float y, const char *s, const rgba_t color, cl_font_t *font, int flags ) { rgba_t current_color; int draw_len = 0; @@ -287,7 +287,7 @@ int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *fon return draw_len; } -int CL_DrawStringf( cl_font_t *font, float x, float y, rgba_t color, int flags, const char *fmt, ... ) +int CL_DrawStringf( cl_font_t *font, float x, float y, const rgba_t color, int flags, const char *fmt, ... ) { va_list va; char buf[MAX_VA_STRING]; diff --git a/engine/client/client.h b/engine/client/client.h index 705a6571..221ad125 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -807,11 +807,11 @@ qboolean Con_LoadFixedWidthFont( const char *fontname, cl_font_t *font, float sc qboolean Con_LoadVariableWidthFont( const char *fontname, cl_font_t *font, float scale, convar_t *rendermode, uint texFlags ); void CL_FreeFont( cl_font_t *font ); void CL_SetFontRendermode( cl_font_t *font ); -int CL_DrawCharacter( float x, float y, int number, rgba_t color, cl_font_t *font, int flags ); -int CL_DrawString( float x, float y, const char *s, rgba_t color, cl_font_t *font, int flags ); +int CL_DrawCharacter( float x, float y, int number, const rgba_t color, cl_font_t *font, int flags ); +int CL_DrawString( float x, float y, const char *s, const rgba_t color, cl_font_t *font, int flags ); void CL_DrawCharacterLen( cl_font_t *font, int number, int *width, int *height ); void CL_DrawStringLen( cl_font_t *font, const char *s, int *width, int *height, int flags ); -int CL_DrawStringf( cl_font_t *font, float x, float y, rgba_t color, int flags, const char *fmt, ... ) FORMAT_CHECK( 6 ); +int CL_DrawStringf( cl_font_t *font, float x, float y, const rgba_t color, int flags, const char *fmt, ... ) FORMAT_CHECK( 6 ); // @@ -1107,7 +1107,7 @@ int Con_UtfMoveRight( char *str, int pos, int length ); void Con_DefaultColor( int r, int g, int b, qboolean gameui ); cl_font_t *Con_GetCurFont( void ); cl_font_t *Con_GetFont( int num ); -int Con_DrawString( int x, int y, const char *string, rgba_t setColor ); // legacy, use cl_font.c +int Con_DrawString( int x, int y, const char *string, const rgba_t setColor ); // legacy, use cl_font.c void GAME_EXPORT Con_DrawStringLen( const char *pText, int *length, int *height ); // legacy, use cl_font.c void Con_CharEvent( int key ); void Key_Console( int key ); diff --git a/engine/client/console.c b/engine/client/console.c index 307d8e83..45bd2750 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -759,7 +759,7 @@ Con_DrawString client version of routine ==================== */ -int Con_DrawString( int x, int y, const char *string, rgba_t setColor ) +int Con_DrawString( int x, int y, const char *string, const rgba_t setColor ) { return CL_DrawString( x, y, string, setColor, con.curFont, FONT_DRAW_UTF8 ); } diff --git a/engine/ref_api.h b/engine/ref_api.h index b9d865a6..a5719b42 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -348,7 +348,7 @@ typedef struct ref_api_s void (*Con_NXPrintf)( struct con_nprint_s *info, const char *fmt, ... ) FORMAT_CHECK( 2 ); void (*CL_CenterPrint)( const char *s, float y ); void (*Con_DrawStringLen)( const char *pText, int *length, int *height ); - int (*Con_DrawString)( int x, int y, const char *string, rgba_t setColor ); + int (*Con_DrawString)( int x, int y, const char *string, const rgba_t setColor ); void (*CL_DrawCenterPrint)( void ); // entity management