diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-23 15:12:55 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-23 15:12:55 +0000 |
commit | c090d0da98cfc613b7b9b7227dd505735df224a6 (patch) | |
tree | 0e27f5b57f9efcde040f3b8381544468612f47d6 /Gui/skin/font.c | |
parent | 469f2d1b7e6c2251cbc9418b111f5bc700c7a262 (diff) | |
download | mpv-c090d0da98cfc613b7b9b7227dd505735df224a6.tar.bz2 mpv-c090d0da98cfc613b7b9b7227dd505735df224a6.tar.xz |
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4819 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/skin/font.c')
-rw-r--r-- | Gui/skin/font.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Gui/skin/font.c b/Gui/skin/font.c index 5d0efbb073..3ad8f587ec 100644 --- a/Gui/skin/font.c +++ b/Gui/skin/font.c @@ -7,7 +7,7 @@ #include "skin.h" #include "font.h" #include "cut.h" -#include "../error.h" +#include "../../mp_msg.h" int items; @@ -44,8 +44,7 @@ int fntRead( char * path,char * fname,int id ) unsigned char * ptmp; unsigned char command[32]; unsigned char param[256]; - int c,i; - int linenumber = 0; + int c,linenumber = 0; strcpy( tmp,path ); strcat( tmp,fname ); strcat( tmp,".fnt" ); if ( ( f=fopen( tmp,"rt" ) ) == NULL ) return -1; @@ -55,7 +54,7 @@ int fntRead( char * path,char * fname,int id ) c=tmp[ strlen( tmp ) - 1 ]; if ( ( c == '\n' )||( c == '\r' ) ) tmp[ strlen( tmp ) - 1 ]=0; c=tmp[ strlen( tmp ) - 1 ]; if ( ( c == '\n' )||( c == '\r' ) ) tmp[ strlen( tmp ) - 1 ]=0; - for ( c=0;c < strlen( tmp );c++ ) + for ( c=0;c < (int)strlen( tmp );c++ ) if ( tmp[c] == ';' ) { tmp[c]=0; @@ -76,18 +75,14 @@ int fntRead( char * path,char * fname,int id ) cutItem( param,tmp,',',1 ); Fonts[id]->Fnt[i].y=atoi( tmp ); cutItem( param,tmp,',',2 ); Fonts[id]->Fnt[i].sx=atoi( tmp ); cutItem( param,tmp,',',3 ); Fonts[id]->Fnt[i].sy=atoi( tmp ); - #ifdef DEBUG - dbprintf( 3,"[font] char: '%s' params: %d,%d %dx%d\n",command,Fonts[id]->Fnt[i].x,Fonts[id]->Fnt[i].y,Fonts[id]->Fnt[i].sx,Fonts[id]->Fnt[i].sy ); - #endif + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[font] char: '%s' params: %d,%d %dx%d\n",command,Fonts[id]->Fnt[i].x,Fonts[id]->Fnt[i].y,Fonts[id]->Fnt[i].sx,Fonts[id]->Fnt[i].sy ); } else { if ( !strcmp( command,"image" ) ) { strcpy( tmp,path ); strcat( tmp,param ); - #ifdef DEBUG - dbprintf( 3,"[font] font imagefile: %s\n",tmp ); - #endif + mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[font] font imagefile: %s\n",tmp ); if ( skinBPRead( tmp,&Fonts[id]->Bitmap ) ) return -2; } } @@ -109,7 +104,7 @@ int fntTextWidth( int id,char * str ) int size = 0; int i; if ( !Fonts[id] ) return 0; - for ( i=0;i < strlen( str );i++ ) + for ( i=0;i < (int)strlen( str );i++ ) if ( Fonts[id]->Fnt[ (int)str[i] ].sx != -1 ) size+=Fonts[id]->Fnt[ (int)str[i] ].sx; return size; } @@ -118,7 +113,7 @@ int fntTextHeight( int id,char * str ) { int max = 0,i; if ( !Fonts[id] ) return 0; - for ( i=0;i < strlen( str );i++ ) + for ( i=0;i < (int)strlen( str );i++ ) if ( Fonts[id]->Fnt[ (int)str[i] ].sy > max ) max=Fonts[id]->Fnt[ (int)str[i] ].sy; return max; } @@ -150,7 +145,7 @@ txSample * fntRender( int id,int px,int sx,char * fmt,... ) obuf=(unsigned long *)tmp->Image; ibuf=(unsigned long *)Fonts[id]->Bitmap.Image; - for ( i=0;i < strlen( p );i++ ) + for ( i=0;i < (int)strlen( p );i++ ) { int c = (int)p[i]; if ( Fonts[id]->Fnt[c].x == -1 ) c=32; |