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

📄 osddrawt102.lst

📁 t112 参考文件
💻 LST
📖 第 1 页 / 共 4 页
字号:
 287          
 288          void OSDFuncExit(void)
 289          {
 290   1      
 291   1      }
 292          
 293          uCHAR OSD_cOSDLang=0;
 294          void OSDShowPage(void)
 295          {
 296   1      uCHAR y=1;
 297   1      
 298   1              pOSDLangPtr=&MultiLangOSD[OSD_cOSDLang];
 299   1              pOSDMenuPtr=pOSDLangPtr->osdMenuPtr;  
 300   1              cTotal=0;
 301   1      
 302   1              while(pOSDMenuPtr[m_cOSDMenu-1][cTotal].iconStr!=NULL)
C51 COMPILER V7.07   OSDDRAWT102                                                           10/27/2005 16:27:46 PAGE 6   

 303   1              {
 304   2                      OSDShowLine(iBlankLine,0,y,COL_NORMAL,OSD_LENGTH);
 305   2      //              OSDShowLine(pOSDMenuPtr[m_cOSDMenu-1][cTotal].iconStr,ICON_STAT,y,COL_NORMAL,OSD_LENGTH);
 306   2                      OSDShowLine(pOSDMenuPtr[m_cOSDMenu-1][cTotal].txtStr,TXT_STAT,y,COL_NORMAL,OSD_LENGTH);
 307   2      //              idx = pOSDMenuPtr[(m_cOSDFunc>>4)-1][cTotal].cidIdx;            
 308   2                      switch (pOSDMenuPtr[(m_cOSDMenu-1)-1][cTotal].cDataAttr)
 309   2                      {
 310   3                              case GAUGE:
 311   3                              case NUMBER:
 312   3      //                              OSDDrawNum(EepOSDPub[idx],sOSDParams1[idx].Max,NUM_STAT,y,COL_NORMAL);
 313   3                                      break;
 314   3      //                      case OPTION:
 315   3      //                              OSDShowOption(y,COL_NORMAL);
 316   3      //                              break;
 317   3      //                      case INFO:
 318   3      //                              OSDShowInfo(0,(cTotal+1),COL_GAUGE);
 319   3      //                              break;
 320   3                              case NONE:
 321   3                              default:
 322   3                                      break;
 323   3                      }
 324   2                      cTotal++;
 325   2                      y++;
 326   2              }
 327   1              OSDShowLine(iBlankLine,0,y++,COL_NORMAL,OSD_LENGTH);
 328   1              OSDShowLine(iBlankLine,0,y,COL_NORMAL,OSD_LENGTH);
 329   1              
 330   1              OSDMoveCursor(0x00,0x00);
 331   1      }
 332          /*
 333          #ifdef T100A
 334          void OSDShowLine(uCHAR *string,uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength)
 335          {
 336                  if((x < 30) && ( y < 0x13))
 337                  {
 338                          OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 339                  twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 340                  while((*string) != EOL && (x < cLength))
 341                  {
 342                          twdWr_Burst_D(*string++);
 343                          twdWr_Burst_D(cColor );
 344                                  //twdWr_Burst_D(0xc0);
 345                          x++;
 346                          }
 347          
 348          
 349                  twdWr_Burst_P();
 350                  }
 351          }
 352          #else //T102
 353          */
 354          void OSDShowLine(uCHAR *string,uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength)
 355          {
 356   1       uCHAR c;
 357   1              if((x < 30) && ( y < OSD_LINE_NUM))
 358   1              {
 359   2                      OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 360   2              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 361   2              while((*string) != EOL && (x < cLength))
 362   2              {
 363   3                          c=*string++;
 364   3                          if(c>0x40)
C51 COMPILER V7.07   OSDDRAWT102                                                           10/27/2005 16:27:46 PAGE 7   

 365   3                        twdWr_Burst_D(c-0x36);
 366   3                              else if(c>=0x30)
 367   3                        twdWr_Burst_D(c-0x2F);
 368   3                              else
 369   3                                twdWr_Burst_D(c);
 370   3                      twdWr_Burst_D(cColor );
 371   3                      x++;
 372   3                      }
 373   2              }
 374   1              twdWr_Burst_P();
 375   1      }
 376          //#endif
 377          
 378          void OSDCleanLine(uCHAR x,uCHAR y,uCHAR cColor,uCHAR cLength)
 379          {
 380   1              if((x < 30) && ( y < OSD_LINE_NUM))
 381   1              {
 382   2                      OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 383   2              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 384   2              while((x < 30) && (x < cLength))
 385   2              {
 386   3                      twdWr_Burst_D(BLANK);
 387   3                      twdWr_Burst_D(cColor);
 388   3                      x++;
 389   3              }
 390   2              twdWr_Burst_P();
 391   2              }
 392   1      }
 393          
 394          void OSDClearPage(void)
 395          {
 396   1              uCHAR i=0;
 397   1              for(i=0;i<OSD_LINE_NUM;i++)
 398   1              {
 399   2                      OSDCleanLine(0,i,0,30);
 400   2              OSDSetLineAttribute(i,0x80);
 401   2              }
 402   1      }
 403          
 404          void OSDSetLineAttribute(uCHAR cLine,uCHAR cAttribute)
 405          {
 406   1           OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)cLine << 5)+31);
 407   1           twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 408   1           twdWr_Burst_D(0);
 409   1           twdWr_Burst_D(cAttribute);
 410   1           twdWr_Burst_P();
 411   1      }
 412          
 413          
 414          
 415          void OSDShowVideoData(void)
 416          {
 417   1      uCHAR  gauge_y =cTotal+2;
 418   1              switch(m_cOSDFunc){
 419   2              case idBRIGHTMENU:
 420   2                      OSDDrawGauge(EepVideo.cBright,V_BRIGHT_MAX,0,gauge_y,COL_GAUGE);
 421   2                      OSDDrawNum(EepVideo.cBright,V_BRIGHT_MAX,NUM_STAT,gauge_y,COL_TITLE,DRAW_BLANK|0x03); 
 422   2                      break;
 423   2              case idCONTRASTMENU:
 424   2                      OSDDrawGauge(EepVideo.cContrast,V_CONTRAST_MAX,0,gauge_y,COL_GAUGE);
 425   2                      OSDDrawNum(EepVideo.cContrast,V_CONTRAST_MAX,NUM_STAT,gauge_y,COL_TITLE,DRAW_BLANK|0x03); 
 426   2                      break;
C51 COMPILER V7.07   OSDDRAWT102                                                           10/27/2005 16:27:46 PAGE 8   

 427   2              case idSHARPMENU:
 428   2                      OSDDrawGauge(EepVideo.cSharp,V_SHARP_MAX,0,gauge_y,COL_GAUGE);
 429   2                      OSDDrawNum(EepVideo.cSharp,0,NUM_STAT,gauge_y,COL_TITLE,DRAW_BLANK|0x03);  
 430   2                      break;
 431   2              case idSATMENU:
 432   2                      OSDDrawGauge(EepVideo.cSat,V_SAT_MAX,0,gauge_y,COL_GAUGE);
 433   2                      OSDDrawNum(EepVideo.cSat,V_SAT_MAX,NUM_STAT,gauge_y,COL_TITLE,DRAW_BLANK|0x03);
 434   2                      break;
 435   2              case idHUEMENU:
 436   2                      OSDDrawGauge(EepVideo.cHue,V_HUE_MAX,0,gauge_y, COL_GAUGE);
 437   2                      OSDDrawNum(EepVideo.cHue,V_HUE_MAX,NUM_STAT,gauge_y,COL_TITLE,DRAW_BLANK|0x03); 
 438   2                      break;
 439   2      #ifdef LOAD_TME
                      case idTIMEMENU:
                              EepVideo.cB2=I2CReadByte(TW101,0xb2);
                              EepVideo.cB8=I2CReadByte(TW101,0xb8);
                              OSDDrawNum(EepVideo.cB2,0,NUM_STAT-10,GAUGE_Y,COL_TITLE,DRAW_BLANK|0x03); 
                              OSDDrawNum(EepVideo.cB8,0,NUM_STAT,GAUGE_Y,COL_TITLE,DRAW_BLANK|0x03); 
                              break;
              #endif
 447   2              default:        break;
 448   2              }       
 449   1      }
 450          
 451          #ifdef AU_35
              #define GAUGE_TOTAL_FONT_L              10  //Long
              #else
 454          #define GAUGE_TOTAL_FONT_L              25  //Long
 455          #endif
 456          void OSDDrawGauge(uCHAR cVal, uCHAR cMax, uCHAR x, uCHAR y, uCHAR cColor)
 457          {
 458   1      int index,i,j;
 459   1      int step_size=100/GAUGE_TOTAL_FONT_L;
 460   1              OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y<< 5)+x);
 461   1      
 462   1              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 463   1      
 464   1              index= (int)cVal*GAUGE_TOTAL_FONT_L/(int)cMax;
 465   1         
 466   1          for(i=0;i<index;i++)
 467   1              {
 468   2                twdWr_Burst_D(34);
 469   2                twdWr_Burst_D(cColor);
 470   2          }
 471   1      
 472   1              j=((int)cVal*100/(int)cMax)-index*step_size;
 473   1              j=j/2.5;
 474   1              twdWr_Burst_D(j+35);
 475   1              twdWr_Burst_D(cColor);
 476   1      
 477   1          for(i=index+1;i<GAUGE_TOTAL_FONT_L;i++)
 478   1              {
 479   2                twdWr_Burst_D(35);
 480   2                twdWr_Burst_D(cColor);
 481   2              }
 482   1              twdWr_Burst_P();
 483   1              
 484   1      
 485   1      }
 486          
 487          //Maximum three initiger, percentage
 488          void OSDDrawNum(uWORD wVal, uCHAR cMax, uCHAR x, uCHAR y, uCHAR cColor, uCHAR cAttr)
C51 COMPILER V7.07   OSDDRAWT102                                                           10/27/2005 16:27:46 PAGE 9   

 489          {
 490   1              //Init Part
 491   1              uCHAR cTemp;
 492   1              if(cMax!=0)
 493   1              {
 494   2                      m_wBuff[0]=(unsigned long)wVal*100;
 495   2                      m_wBuff[0]=m_wBuff[0]/cMax;
 496   2              }
 497   1              else //Non percentage
 498   1              {
 499   2                      m_wBuff[0]=wVal;
 500   2              }
 501   1      
 502   1              if(m_wBuff[0]<10)
 503   1                      m_cBuff[1]=1;
 504   1              else if(m_wBuff[0]<100)
 505   1                      m_cBuff[1]=2;
 506   1              else
 507   1              m_cBuff[1]=3;
 508   1      
 509   1              OSDSetRamAddr(MENU_RAM_START_ADDRESS+((int)y << 5)+x);
 510   1              twdWr_Burst_A(OSD_RAM_DL);      // Write OSD index
 511   1      
 512   1              if((cAttr&0xF0)==DRAW_BLANK)
 513   1              {
 514   2                      switch(m_cBuff[1]){
 515   3                      case 1:
 516   3                              if((cAttr&0x0F)==3||(cAttr&0x0F)==2)
 517   3                              {
 518   4                                      twdWr_Burst_D(BLANK);
 519   4                                      twdWr_Burst_D(cColor);
 520   4                              }
 521   3                      case 2:
 522   3                              if((cAttr&0x0F)==3)
 523   3                              {
 524   4                                      twdWr_Burst_D(BLANK);
 525   4                                      twdWr_Burst_D(cColor);
 526   4                              }
 527   3                      }
 528   2              }
 529   1              else if((cAttr&0xF0)==DRAW_ZERO)
 530   1              {
 531   2                      switch(m_cBuff[1]){
 532   3                      case 1:
 533   3                              if((cAttr&0x0F)==3||(cAttr&0x0F)==2)
 534   3                              {
 535   4                                      twdWr_Burst_D('0'-0x2F);
 536   4                                      twdWr_Burst_D(cColor);
 537   4                              }
 538   3                      case 2:
 539   3                              if((cAttr&0x0F)==3)
 540   3                              {
 541   4                                      twdWr_Burst_D('0'-0x2F);
 542   4                                      twdWr_Burst_D(cColor);
 543   4                              }
 544   3                      }
 545   2              }
 546   1      
 547   1      
 548   1              while(m_cBuff[1]>0)
 549   1              {
 550   2                      if(m_cBuff[1]==3)
C51 COMPILER V7.07   OSDDRAWT102                                                           10/27/2005 16:27:46 PAGE 10  

 551   2                              cTemp=m_wBuff[0]/100;
 552   2                      else if(m_cBuff[1]==2)
 553   2                              cTemp=(m_wBuff[0]%100)/10;
 554   2                      else if(m_cBuff[1]==1)
 555   2                              cTemp=m_wBuff[0]%10;
 556   2      
 557   2                      OSDNumConvert(cTemp);
 558   2              twdWr_Burst_D(cColor );
 559   2                      m_cBuff[1]--;
 560   2              }
 561   1              twdWr_Burst_P();
 562   1      }
 563          
 564          #ifdef TV
              
              void OSDDrawSoundSystem(void)
              {
                      if(m_cSoundSystem==PAL_I)
                              //OSDShowLine(iPAL_I,20,3,COL_NORMAL,OSD_LENGTH);
                              OSDShowLine(iPAL_I,20,3,COL_TITLE,OSD_LENGTH);   
                      else
                              //OSDShowLine(iPAL_DK,20,3,COL_NORMAL,OSD_LENGTH);
                              OSDShowLine(iPAL_DK,20,3,COL_TITLE,OSD_LENGTH);   
              
              
              }
              
              void OSDDrawTVFreq(uWORD wFreq)
              {
              //      float fTemp;

⌨️ 快捷键说明

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