⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 display_aviq.h

📁 Sunplus 8202S source code.
💻 H
📖 第 1 页 / 共 2 页
字号:
/*
*  AVIQ new search function
*  <note:> system performance too bad ,and have some bugs... we must fine tune , terry
*/
#include "memmap0.h"

//
// DispCookOSD0
//      Prepare the content of OSD0 to temp buffer
//      (from OSD0_TEMP_YA-th KBytes in DRAM, size=38*16*1*24*4/8=7104 Bytes)
//
//      input   : bChange
//                  1 : re-generate all content
//                  0 : only update timing display parts
//                dwTime :
//                  < 0 : remain time (-00:00:00)
//                  > 0 : elapsed time( 00:00:00)
//
//      output  : none
//
//      side-effect : none
//
//      notes:
//      0     5          15  18   22  25
//      CD    TRACK      SPK PBC  REP TIME
//      VCD   TRACK      SPK PBC  REP TIME
//      SVCD  TRACK      SPK PBC  REP TIME
//      DVD   TITLE      CHAPTER      TIME
//      MP3   TRACK      SPK      REP TIME
//
//      Color table
//          palette_16color_setup(defined in osd1.c)
//


void hi_light_time(int pos)
{
    int time=0,shift_base=0;
	
    if((index_x-5)<=1)
    {
        time=goto_hour;
        shift_base=4;
    }
    else if((index_x-5)<=3)
    {
        time=goto_min;
        shift_base=3;
    }
    else if((index_x-5)<=5)
    {
        time=goto_sec;
        shift_base=2;
    }
    
    if((index_x-5)%2==0)//even
    {
        psprintf(linebuf, "%01d", time/10); 
        io_write("p");
        do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf,DISP_SHADOW,DISP_YGREEN); 
    }    
    else
    {
        psprintf(linebuf, "%01d", time%10); 
        io_write("o");
        do_DispOSD0String(pos+(index_x-shift_base), 0, linebuf,DISP_SHADOW,DISP_YGREEN);  
        
    }   
}

void hi_light_chapter(int id,int pos)//kenny 2002/4/13
{
    if(index_x==2)
    {
        psprintf(linebuf, "%01d",id/100);  
        io_write("n");
        do_DispOSD0String(pos, 0, linebuf,DISP_SHADOW,DISP_YGREEN);
    }
    else if(index_x==3)
    {
        psprintf(linebuf, "%01d",(id%100)/10);     
        io_write("m");
        do_DispOSD0String(pos+1, 0, linebuf,DISP_SHADOW,DISP_YGREEN);
    }
    else if(index_x==4)
    {
        psprintf(linebuf, "%01d",id%10);       
        io_write("l");
        do_DispOSD0String(pos+2, 0, linebuf,DISP_SHADOW,DISP_YGREEN);    
    }
}   

void hi_light_title(int id, int pos)
{
    if(index_x==0)
    {
        psprintf(linebuf, "%01d",id/10);    
        io_write("k");
        do_DispOSD0String(pos, 0, linebuf,DISP_SHADOW,DISP_YGREEN);
    }
    else if(index_x==1)
    {
        psprintf(linebuf, "%01d",id%10);        
        io_write("j");
        do_DispOSD0String(pos+1, 0, linebuf,DISP_SHADOW,DISP_YGREEN);
    }
}



// YW ------- osd ---------- [Top]
// Modify 020725
void Print2OSDmem(int id,int val,UINT8 pos)
{
	BYTE    fontColor, bkColor; 
    
	bkColor = DISP_SHADOW; //OSD shadow color
	fontColor = DISP_GREEN; //green
    
	if(val) {       
		fontColor = DISP_YGREEN; //yellow-green                       
		if((full_scrn&GOTO) && !(val&COOK_S_LANG) && !(val&COOK_S_MODE)) {    
			
#ifdef NEW_GOTO//kenny 2002/4/13
			if(val&COOK_S_TIMER) {
				if(index_x>=5)
				{
					
					UINT32 time=disp_goto_time;
					disp_goto_time=disp_goto_time%10000000;
					goto_sec=time%100;            
					time=time/100;
					goto_min=time%100;
					time=time/100;
					goto_hour=time%100;   
					psprintf(linebuf, " %02d:%02d:%02d",goto_hour, goto_min, goto_sec);            
				} else {
					psprintf(linebuf, " %02d:%02d:%02d",show_time_hh, show_time_mm, show_time_ss);
					if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
 
					linebuf[0]='-';
				}
			} else 
			{
				if(pos!=COOK_CHP_VAL) 
				{//title            
					
					// yw0809	
					if(dvd_title)
						id=dvd_title;
					disp_dvd_title = id;                              
					psprintf(linebuf, "%02d/%02d",id,val);
					
					
					if(t_disp%10 == 3)
					{
						if(((index_x == 0) && (pos == COOK_AUDIO_VAL)) || ((index_x == 1) && (pos == COOK_SUBTITLE_VAL)))
						{
							fontColor = DISP_SHADOW;
							bkColor = DISP_YGREEN;
						}	
						else
						{
							bkColor = DISP_SHADOW; 
							fontColor = DISP_YGREEN; 
						}
					}
				} else {
					if(dvd_chapter) 
						id=dvd_chapter;
					disp_dvd_chapter = id;  
					psprintf(linebuf, "%03d/%03d",id,val);          
				}
			}   
#else   //#ifdef NEW_GOTO
			if(val&COOK_S_TIMER) {
				if(index_x==2) {
					UINT32 time=disp_goto_time;
                    
					bkColor = DISP_GBLUE;                        
					fontColor = DISP_WHITE; 
					disp_goto_time=disp_goto_time%10000000;
					goto_sec=time%100;            
					time=time/100;
					goto_min=time%100;
					time=time/100;
					goto_hour=time%100;             
					psprintf(linebuf, " %02d:%02d:%02d",goto_hour, goto_min, goto_sec);            
				} else {
                    psprintf(linebuf, " %02d:%02d:%02d", show_time_hh,show_time_mm, show_time_ss);
				}
			} else {
				if(pos!=COOK_CHP_VAL) {//title          
					if(index_x==0) {
						bkColor = DISP_GBLUE;                                
						fontColor = DISP_WHITE; 
					}
                    
					if(index_x!=2) {
						if(dvd_title) {
							if(dvd_title>val)
								dvd_title=dvd_title%10;
                            
							id=dvd_title;
						}
					}
					
					psprintf(linebuf, "%02d",id);                   
				} else {
					if(index_x==1) {
						bkColor = DISP_GBLUE;    
						fontColor = DISP_WHITE; 
					}
					
					if(index_x!=2) {
						if(dvd_chapter) {
							if(dvd_chapter>val)
								dvd_chapter=dvd_chapter%10;
                            
							id=dvd_chapter;
						}
					}
					psprintf(linebuf, "%03d",id);   
				}
                
                io_write("b");
				do_DispOSD0String(pos, 0, linebuf, fontColor,bkColor); 
				bkColor = DISP_SHADOW; //OSD shadow color                
				
				if(pos==COOK_CHP_VAL) {
					pos+=3;
					psprintf(linebuf, "/%03d",val); 
				} else {
					pos+=2;
					psprintf(linebuf, "/%02d",val);
				}
			}               
#endif//NEW_GOTO
			
			
        }else if(val&COOK_S_TIMER)
        {
            psprintf(linebuf, " %02d:%02d:%02d", show_time_hh, show_time_mm,show_time_ss);         
            if((remain==DISC_REMAIN_TIME)||(remain==TRK_REMAIN_TIME)) // terry 2002/6/4 09:48PM : solve time in goto mode without '-'
			linebuf[0]='-';
            
        }else if(val&COOK_S_LANG)
        {           	
			
        				/* alan modifide 2002/5/30 09:53PM to cut SUP-LAN fit in display */
        				UINT8 *str=get_lang_name(id);
						BYTE len=strlen(str);
						
						if(len == 1)
							str = "  "; 	               
        				        				
						strcpy(linebuf,str);//nono 2-11-22 18:20
						
						if (!IsOSDChinese()||((str[0]>='A')&&(str[0]<='Z'))) 
                        {   
							str[MAX_ENG_WORDS]='\0';
                        } else {
							//if (len>4){
							if (len>6){//nono 2-11-22 11:06
								
#if defined(USE_TCHINESE_OSD)//2-10-9 17:51
						psprintf(linebuf+2,"%s",TCh_yu);
#else
						psprintf(linebuf+2,"%s",Ch_yu2);
#endif								
								/*
								str[2]='\r';
								str[3]='\x32';
								str[4]='\0';
								*/
							}
                        }                        
                        //psprintf(linebuf,"%s",str);
                        
						//#ifndef OSD_Function_Disable
						if((((index_x == 0) && (pos == COOK_AUDIO_LANG)) || ((index_x == 1) && (pos == COOK_SUBTITLE_LANG)) ) && (full_scrn&GOTO))
						{
							fontColor = DISP_SHADOW;
							bkColor = DISP_YGREEN;
						}	
						else
						{
							bkColor = DISP_SHADOW; 
							fontColor = DISP_YGREEN; 
						}
						//#endif  
		} else if(val&COOK_S_MODE)
		{
			//#ifndef OSD_Function_Disable
			if((index_x == 0) && (pos == COOK_AUDIO_TYPE) && (full_scrn&GOTO)) 
			{
				fontColor = DISP_SHADOW;
				bkColor = DISP_YGREEN;
			}	
			else
			{
				bkColor = DISP_SHADOW; 
				fontColor = DISP_YGREEN; 
			}
			//#endif 
			psprintf(linebuf,"%s",get_audio_mode());

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -