comparison libvo/sub.c @ 1502:ccb1f3ddb29a

atlka@pg.gda.pl: utf8 opion corrected added draw_osd() funcion to libvo/vo_*.c files corrected indicators (brightness, sound etc.) to be in 0..100 range if we have Name.utf file it automatically switches to utf8 mode
author atlka
date Mon, 13 Aug 2001 11:33:34 +0000
parents d40f2b686846
children 1af1f37efd67
comparison
equal deleted inserted replaced
1501:d40f2b686846 1502:ccb1f3ddb29a
185 break; 185 break;
186 } 186 }
187 memy-=vo_font->height; 187 memy-=vo_font->height;
188 xsize=lastxsize=-vo_font->charspace; 188 xsize=lastxsize=-vo_font->charspace;
189 } 189 }
190 xsize+=w+vo_font->charspace;
191 if ((dxs<xsize && lastStripPosition>0) || j==len-1)
192 {
193 if (j==len-1) lastStripPosition=len;
194 else xsize=lastxsize;
195 j=lastStripPosition;
196
197 x=dxs/2-xsize/2;
198
199 for(k=previousStrip;k<lastStripPosition;k++){
200 int c=text[k];
201 int font;
202 if (sub_unicode && (c>=0x80)) c=(c<<8)+text[++k];
203 font=vo_font->font[c];
204 if(x>=0 && x+vo_font->width[c]<dxs)
205 if(font>=0)
206 draw_alpha(x,y,
207 vo_font->width[c],
208 vo_font->pic_a[font]->h,
209 vo_font->pic_b[font]->bmp+vo_font->start[c],
210 vo_font->pic_a[font]->bmp+vo_font->start[c],
211 vo_font->pic_a[font]->w);
212 x+=vo_font->width[c]+vo_font->charspace;
213 }
214 x=0;
215 y+=vo_font->height;
216 previousStrip=lastStripPosition;
217 xsize=lastxsize=-vo_font->charspace;
218 }
219 } 190 }
220 } 191 }
221 192
222 y = memy; 193 y = memy;
223 194