comparison libvo/sub.c @ 254:57f0156416e3

use subreader's sub struct
author arpi_esp
date Fri, 30 Mar 2001 03:01:50 +0000
parents fbfc2077ba72
children 1e57ff895419
comparison
equal deleted inserted replaced
253:f86bc209160b 254:57f0156416e3
1 1
2 #include "subreader.h"
2 #include "sub.h" 3 #include "sub.h"
3 4
4 //static int vo_font_loaded=-1; 5 //static int vo_font_loaded=-1;
5 font_desc_t* vo_font=NULL; 6 font_desc_t* vo_font=NULL;
6 7
87 // vo_osd_progbar_value=(vo_osd_progbar_value+1)&0xFF; 88 // vo_osd_progbar_value=(vo_osd_progbar_value+1)&0xFF;
88 89
89 } 90 }
90 91
91 92
92 int vo_sub_lines=2; 93 subtitle* vo_sub=NULL;
93 unsigned char* vo_sub_text[8];
94 94
95 void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ 95 void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
96 int i; 96 int i;
97 int y; 97 int y;
98 98
99 y=dys-(1+vo_sub_lines)*vo_font->height; 99 y=dys-(1+vo_sub->lines)*vo_font->height;
100 100
101 for(i=0;i<vo_sub_lines;i++){ 101 for(i=0;i<vo_sub->lines;i++){
102 unsigned char* text="Hello World! HÛDEJÓ!"; //vo_sub_text[i]; 102 unsigned char* text=vo_sub->text[i];// "Hello World! HÛDEJÓ!";
103 int len=strlen(text); 103 int len=strlen(text);
104 int j; 104 int j;
105 int xsize=-vo_font->charspace; 105 int xsize=-vo_font->charspace;
106 int x=0; 106 int x=0;
107 107
142 142
143 if(vo_osd_text){ 143 if(vo_osd_text){
144 vo_draw_text_osd(dxs,dys,draw_alpha); 144 vo_draw_text_osd(dxs,dys,draw_alpha);
145 } 145 }
146 146
147 if(vo_sub_lines>0){ 147 if(vo_sub){
148 vo_draw_text_sub(dxs,dys,draw_alpha); 148 vo_draw_text_sub(dxs,dys,draw_alpha);
149 } 149 }
150 150
151 if(vo_osd_progbar_type>=0){ 151 if(vo_osd_progbar_type>=0){
152 vo_draw_text_progbar(dxs,dys,draw_alpha); 152 vo_draw_text_progbar(dxs,dys,draw_alpha);