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

📄 osddrawt100.lst

📁 T116 源码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 513          
 514          void OSDShowLine(uCHAR *string,uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength)
 515          {
 516   1              if((x < 30) && ( y < 0x13))
 517   1              {
 518   2                      OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 519   2              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 520   2              while((*string) != EOL && (x < cLength))
 521   2              {
 522   3                      twdWr_Burst_D(*string++);
 523   3                      twdWr_Burst_D(cColor );
 524   3                              //twdWr_Burst_D(0xc0);
 525   3                      x++;
 526   3                      }
 527   2      
 528   2      
 529   2              twdWr_Burst_P();
 530   2              }
 531   1      }
 532          
 533          #if 0
              //void OSDHLLine(uCHAR *str, uCHAR x, uCHAR y, uCHAR cCol)
              void OSDHLLine(uCHAR y, uCHAR cCol)
              {
                      OSDShowLine(iBlankLine,0,y,cCol,OSD_LENGTH);
                      OSDShowLine(OSDMenu_E[(m_cOSDFunc>>4)-1][y-1].iconStr,ICON_STAT,y,cCol,OSD_LENGTH);
                      OSDShowLine(OSDMenu_E[(m_cOSDFunc>>4)-1][y-1].txtStr, TXT_STAT, y,cCol,OSD_LENGTH);
              
              }
              #endif
 543          
 544          
 545          void OSDCleanLine(uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength)
 546          {
 547   1              if((x < 30) && ( y < 0x12))
 548   1              {
 549   2                      OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 550   2              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
C51 COMPILER V7.07   OSDDRAWT100                                                           10/27/2005 16:13:34 PAGE 10  

 551   2              while((x < 30) && (x < cLength))
 552   2              {
 553   3                      twdWr_Burst_D(0x20);
 554   3                      twdWr_Burst_D(cColor);
 555   3                      x++;
 556   3              }
 557   2              twdWr_Burst_P();
 558   2              }
 559   1      }
 560          
 561          void OSDClearPage(void)
 562          {
 563   1              uCHAR i=0;
 564   1              uCHAR cTotal=0;
 565   1              switch(m_cOSDFunc&0xF0){
 566   2              case idMAINMENU :               cTotal = 13;break;
 567   2              case idCOLORMENU:               cTotal = 15; break;
 568   2              case idVOLUMEMENU:                      cTotal = 15; break;
 569   2              case idSRCMENU:                         cTotal = 15; break;
 570   2              case idFCTRYMENU:                       cTotal = 15; break;
 571   2              default : cTotal = 15;
 572   2              }
 573   1      
 574   1              for(i=0;i<cTotal;i++)
 575   1              {
 576   2                      OSDCleanLine(0,i,0,30);
 577   2      //              twdDelay(10);
 578   2              OSDSetLineAttribute(i,0x80);
 579   2      //              twdDelay(10);
 580   2              }
 581   1      }
 582          
 583          void OSDSetLineAttribute(uCHAR cLine,uCHAR cAttribute)
 584          {
 585   1           OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)cLine << 5)+31);
 586   1           twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 587   1           twdWr_Burst_D(0);
 588   1           twdWr_Burst_D(cAttribute);
 589   1           twdWr_Burst_P();
 590   1      }
 591          
 592          #ifdef TV
              extern bit m_bTV_Num_Bits;
              void OSDShowTV_Num(uCHAR cTemp)
              {
                      uCHAR cTemp1;
                      OSDExit();
                      OSDPosition(RIGHT_TOP);
                      cTemp1=I2CReadByte(EEPVIDEOBLOCK, idVIDEO_FLAG_INDEX)&0x06;
                      OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)1<<5)+19);
              
                      twdWr_Burst_A(OSD_RAM_DL);
                      switch((cTemp|cTemp1))
                      {
                              case 0: OSDNumConvert(m_cTV_Num);
                                              twdWr_Burst_D(COL_NORMAL);  
                                              break;
                              case 2: if(m_bTV_Num_Bits)
                                              {
                                                      OSDNumConvert(m_cTV_Num/10);
                                                      twdWr_Burst_D(COL_NORMAL);
                                                      OSDNumConvert(m_cTV_Num%10);
C51 COMPILER V7.07   OSDDRAWT100                                                           10/27/2005 16:13:34 PAGE 11  

                                                      twdWr_Burst_D(COL_NORMAL);
                                              }
                                              else
                                              {
                                                      OSDNumConvert(m_cTV_Num);
                                                      twdWr_Burst_D(COL_NORMAL);
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                              }
                                              break;
                              case 4: OSDNumConvert(1);
                                              twdWr_Burst_D(COL_NORMAL);
                                              if(m_bTV_Num_Bits)
                                              {
                                                      OSDNumConvert((m_cTV_Num%100)/10);
                                                      twdWr_Burst_D(COL_NORMAL);  
                                                      OSDNumConvert(m_cTV_Num%10);
                                                      twdWr_Burst_D(COL_NORMAL);  
                                              }
                                              else
                                              {
                                                      OSDNumConvert(m_cTV_Num%10);
                                                      twdWr_Burst_D(COL_NORMAL);  
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);  
                                              }
                                              break;
                              case 6:if(cTemp1==4)
                                              {
                                                      OSDNumConvert(1);
                                                      twdWr_Burst_D(COL_NORMAL);  
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                              }
                                              else if(cTemp1==2)
                                              {
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                              }
                                              else
                                              {
                                                      twdWr_Burst_D(0x1B);
                                                      twdWr_Burst_D(COL_NORMAL);
                                              }
                      }
              }
              void OSDShowRESET(bit bTemp)
              {
                      if(bTemp)
                      {
                              OSDShowLine(iBlankLine,0,6,COL_TITLE,OSD_LENGTH);
                              OSDShowLine(iRecall_E,3,6,COL_TITLE,OSD_LENGTH);
                              OSDShowLine(iOK,19,6,COL_TITLE,OSD_LENGTH);  
                      }
                      else
                      {
                              OSDShowLine(iBlankLine,0,6,COL_TITLE,OSD_LENGTH);
                              OSDShowLine(iRecalling_E,3,6,COL_TITLE,OSD_LENGTH);  
C51 COMPILER V7.07   OSDDRAWT100                                                           10/27/2005 16:13:34 PAGE 12  

                      }
              }
              
              void OSDShowTVSource(sCHAR sStep)
              {
                      uCHAR cTemp;
              
                      cTemp=I2CReadByte(EEPVIDEOBLOCK, idVIDEO_FLAG_INDEX);
                      if(sStep)
                      {
                              if(cTemp&0x01)
                              {
                                      cTemp&=0xFE;
                              }
                              else
                              {
                                      cTemp|=0x01;
                              }
                              I2CWriteByte(EEPVIDEOBLOCK, idVIDEO_FLAG_INDEX,cTemp);
                      }
                      if(cTemp&0x01)
                      {
                              m_bAir_Cable=1;
                              OSDShowLine(iCable,17,3,COL_TITLE,OSD_LENGTH);  
                      }
                      else
                      {
                              m_bAir_Cable=0;
                              OSDShowLine(iAir,17,3,COL_TITLE,OSD_LENGTH);  
                      }
                      ir_data=0;
              }
              
              #endif
 709          
 710          
 711          void OSDShowVideoData(void)
 712          {
 713   1      
 714   1      #ifdef TV
                  uWORD wTemp;
                      if((m_cOSDFunc&0xF0)==idTVMENU_VIDEO)
                      {
              //              OSDTVShowChannel(19,1,COL_NORMAL,m_cTV_Num);
              #ifdef NTSC
                              OSDShowTVSource(0);
              #endif
              #ifdef PAL
                              OSDDrawSoundSystem();
              #endif
              //              AdjTVChannel(0,1);
              
                      wTemp=TVSetChannel(I2CReadByte(EEPVIDEOBLOCK, idTVCHANNEL_INDEX)-1);
                              OSDDrawTVFreq(wTemp);
                              OSDDrawSkip();
                              OSDDrawNum(I2CReadByte(EEPVIDEOBLOCK, idTVCHANNEL_INDEX), 0, 19, 1, COL_TITLE, DRAW_BLANK|0x03);
              
                              return;
                      }
              #endif
 735   1              switch(m_cOSDFunc){
 736   2              case idVOLUMEMENU:
C51 COMPILER V7.07   OSDDRAWT100                                                           10/27/2005 16:13:34 PAGE 13  

 737   2                      OSDDrawGauge(EepVideo.cVolume,sOSDParamsMax.cVolume-sOSDParamsMin.cVolume,0,1,COL_GAUGE);
 738   2                      OSDDrawNum  (EepVideo.cVolume,sOSDParamsMax.cVolume-sOSDParamsMin.cVolume,NUM_STAT,0,COL_TITLE,DRAW_BLAN
             -K|0x03); 
 739   2                      break;
 740   2              case idBRIGHT_VIDEO:
 741   2                      OSDDrawGauge(EepVideo.cBright,V_BRIGHT_MAX,0,8,COL_GAUGE);
 742   2      //              OSDDrawNum(EepVideo.cBright,V_BRIGHT_MAX,NUM_STAT,1,COL_NORMAL,DRAW_BLANK|0x03); 
 743   2      //              OSDShowVideo();
 744   2                      break;
 745   2              case idCONTRAST_VIDEO:
 746   2                      OSDDrawGauge(EepVideo.cContrast,V_CONTRAST_MAX,0,8,COL_GAUGE);
 747   2      //              OSDDrawNum(EepVideo.cContrast,V_CONTRAST_MAX,NUM_STAT,2,COL_NORMAL,DRAW_BLANK|0x03); 
 748   2      //              OSDShowVideo();
 749   2                      break;
 750   2      /*
 751   2              case idSHARP_VIDEO:
 752   2                      OSDDrawGauge(EepVideo.cSharp,V_SHARP_MAX,0,7,COL_GAUGE);
 753   2      //              OSDDrawNum(EepVideo.cSharp,V_SHARP_MAX,NUM_STAT,3,COL_NORMAL,DRAW_BLANK|0x03); 
 754   2      //              OSDShowVideo();
 755   2                      break;
 756   2      */
 757   2              case idSAT_VIDEO:
 758   2                      OSDDrawGauge(EepVideo.cSat,V_SAT_MAX,0,8,COL_GAUGE);
 759   2      //              OSDDrawNum(EepVideo.cSat,V_SAT_MAX,NUM_STAT,4,COL_NORMAL,DRAW_BLANK|0x03); 
 760   2      //              OSDShowVideo();
 761   2                      break;
 762   2              case idHUE_VIDEO:
 763   2                      OSDDrawGauge(EepVideo.cHue,V_HUE_MAX,0,7,COL_GAUGE);
 764   2      //              OSDDrawNum(EepVideo.cHue,V_HUE_MAX,NUM_STAT,5,COL_NORMAL,DRAW_BLANK|0x03); 
 765   2      //              OSDShowVideo();
 766   2                      break;
 767   2                      case idBRIGHTMENU_VIDEO:
 768   2                      OSDDrawGauge(EepVideo.cBright,V_BRIGHT_MAX,0,GAUGE_Y,COL_GAUGE);
 769   2                      OSDDrawNum(EepVideo.cBright,V_BRIGHT_MAX,NUM_STAT,GAUGE_Y,COL_TITLE,DRAW_BLANK|0x03); 
 770   2                      break;
 771   2              case idCONTRASTMENU_VIDEO:
 772   2                      OSDDrawGauge(EepVideo.cContrast,V_CONTRAST_MAX,0,GAUGE_Y,COL_GAUGE);

⌨️ 快捷键说明

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