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

📄 dvdshow.c

📁 MTK 1389E SOURCE CODE
💻 C
📖 第 1 页 / 共 3 页
字号:
  if (bNum == OSD_SEARCH_CLEAR)
  {
    vOsdClearInputField(OSD_POS_DVD_SEARCH);
    vOsdPosClear(OSD_POS_DVD_SEARCH);
  }
  else if (bNum & OSD_DVD_TTL_SEARCH) /* for title search */
  {
    /* error check */
    if (bCurTit > bTotTit)
    {
      bCurTit = bTotTit;
    }
    if (wCurCha > wTotCha)
    {
      wCurCha = wTotCha;
    }

    if (wTotCha > 99)
    {
      pbStr[0] = 10;
    }

    bCurTit = bHEXToBCD(bCurTit);
    bTotTit = bHEXToBCD(bTotTit);
    wCurCha = wWRDToBCD(wCurCha);
    wTotCha = wWRDToBCD(wTotCha);

    pbStr[1] = ' ';
    pbStr[2] = ' ';
    pbStr[3] = BCD_HI(bTotTit) + '0';
    pbStr[4] = BCD_LO(bTotTit) + '0';
    if (pbStr[0] == 10)
    {
      pbStr[5]  = BCD_LO(bHiByte(wCurCha)) + '0';
      pbStr[6]  = BCD_HI(bLoByte(wCurCha)) + '0';
      pbStr[7]  = BCD_LO(bLoByte(wCurCha)) + '0';
      pbStr[8]  = BCD_LO(bHiByte(wTotCha)) + '0';
      pbStr[9]  = BCD_HI(bLoByte(wTotCha)) + '0';
      pbStr[10] = BCD_LO(bLoByte(wTotCha)) + '0';
    }
    else
    {
      pbStr[5] = BCD_HI(bLoByte(wCurCha)) + '0';
      pbStr[6] = BCD_LO(bLoByte(wCurCha)) + '0';
      pbStr[7] = BCD_HI(bLoByte(wTotCha)) + '0';
      pbStr[8] = BCD_LO(bLoByte(wTotCha)) + '0';
    }
    if (bNum == (OSD_DVD_TTL_SEARCH | 0))
    {
      vOsdSetInputField(OSD_POS_DVD_SEARCH);
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | 1))
    {
#ifdef NO_ADD10_KEY
      pbStr[1] = BCD_LO(bCurTit) + '0';
#else /* for +10 key */
      if (bCurTit > 0)
      {
        pbStr[1] = BCD_HI(bCurTit) + '0';
        if (BCD_LO(bCurTit) == 0)
        {
#ifdef ADD10_SHOW_10
          pbStr[2] = '0';
#else
          pbStr[2] = '-';
#endif
        }
        else
        {
          pbStr[2] = BCD_LO(bCurTit) + '0';
        }
      }
#endif
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | 2))
    {
      pbStr[1] = BCD_HI(bCurTit) + '0';
      pbStr[2] = BCD_LO(bCurTit) + '0';
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | OSD_DVD_SEARCH_END))
    {
      pbStr[1] = BCD_HI(bCurTit) + '0';
      pbStr[2] = BCD_LO(bCurTit) + '0';
      
      vOsdClearInputField(OSD_POS_DVD_SEARCH);
    }

    vOsdPosShowArg(OSD_POS_DVD_SEARCH, _pwDvdOsdMsg[MSG_TITLE_CHAPTER_SEARCH_TTL][bDiscType%2], bTime, pbStr);
  }
  else /* for chapter search */
  {
    /* error check */
    if (bCurTit > bTotTit)
    {
      bCurTit = bTotTit;
    }
    if (wCurCha > wTotCha)
    {
      wCurCha = wTotCha;
    }

    if (wTotCha > 99)
    {
      pbStr[0] = 10;
    }

    bCurTit = bHEXToBCD(bCurTit);
    bTotTit = bHEXToBCD(bTotTit);
    wCurCha = wWRDToBCD(wCurCha);
    wTotCha = wWRDToBCD(wTotCha);

    pbStr[1] = BCD_HI(bCurTit) + '0';
    pbStr[2] = BCD_LO(bCurTit) + '0';
    pbStr[3] = BCD_HI(bTotTit) + '0';
    pbStr[4] = BCD_LO(bTotTit) + '0';
    if (pbStr[0] == 10)
    {
      pbStr[5]  = ' ';
      pbStr[6]  = ' ';
      pbStr[7]  = ' ';
      pbStr[8]  = BCD_LO(bHiByte(wTotCha)) + '0';
      pbStr[9]  = BCD_HI(bLoByte(wTotCha)) + '0';
      pbStr[10] = BCD_LO(bLoByte(wTotCha)) + '0';
    }
    else
    {
      pbStr[5] = ' ';
      pbStr[6] = ' ';
      pbStr[7] = BCD_HI(bLoByte(wTotCha)) + '0';
      pbStr[8] = BCD_LO(bLoByte(wTotCha)) + '0';
    }

    if (bNum == 0)
    {
      vOsdSetInputField(OSD_POS_DVD_SEARCH);
    }
    else if (bNum == 1)
    {
      if (pbStr[0] == 10)
      {
#ifdef NO_ADD10_KEY
        if (wCurCha > 0x99)
        {
          pbStr[5] = BCD_LO(bHiByte(wCurCha)) + '0';
          pbStr[6] = BCD_HI(bLoByte(wCurCha)) + '0';
          pbStr[7] = BCD_LO(bLoByte(wCurCha)) + '0';
        }
        else if ((wCurCha > 0x9) || (_rNumInStateCtx.rState.bDigNum == 2))
        {
          pbStr[5] = BCD_HI(bLoByte(wCurCha)) + '0';
          pbStr[6] = BCD_LO(bLoByte(wCurCha)) + '0';
          pbStr[7] = ' ';
        }
        else
        {
          pbStr[5] = BCD_LO(bLoByte(wCurCha)) + '0';
          pbStr[6] = ' ';
          pbStr[7] = ' ';
        }
#else
        pbStr[5] = (wCurCha > 0x99) ? BCD_LO(bHiByte(wCurCha)) + '0' : ' ';
        pbStr[6] = (wCurCha > 0x9) ? BCD_HI(bLoByte(wCurCha)) + '0' : ' ';
        pbStr[7] = BCD_LO(bLoByte(wCurCha)) + '0';
#endif
      }
      else
      {
#ifdef NO_ADD10_KEY
        pbStr[5] = BCD_LO(bLoByte(wCurCha)) + '0';
#else /* for +10 key */
        if (bCurCha > 0)
        {
          pbStr[5] = BCD_HI(bLoByte(wCurCha)) + '0';
          pbStr[6] = BCD_LO(bLoByte(wCurCha)) + '0';
        }
#endif
      }
    }
    else if (bNum == 2)
    {
      if (pbStr[0] == 10)
      {
        pbStr[5] = (wCurCha > 0x99) ? BCD_LO(bHiByte(wCurCha)) + '0' : ' ';
        pbStr[6] = (wCurCha > 0x9) ? BCD_HI(bLoByte(wCurCha)) + '0' : ' ';
        pbStr[7] = BCD_LO(bLoByte(wCurCha)) + '0';
      }
      else
      {
        pbStr[5] = BCD_HI(bLoByte(wCurCha)) + '0';
        pbStr[6] = BCD_LO(bLoByte(wCurCha)) + '0';
      }
    }
    else if (bNum == OSD_DVD_SEARCH_END)
    {
      if (pbStr[0] == 10)
      {
        pbStr[5] = (wCurCha > 0x99) ? BCD_LO(bHiByte(wCurCha)) + '0' : ' ';
        pbStr[6] = (wCurCha > 0x9) ? BCD_HI(bLoByte(wCurCha)) + '0' : ' '; 
        pbStr[7] = BCD_LO(bLoByte(wCurCha)) + '0';
      }
      else
      {
        pbStr[5] = BCD_HI(bLoByte(wCurCha)) + '0';
        pbStr[6] = BCD_LO(bLoByte(wCurCha)) + '0';
      }
      vOsdClearInputField(OSD_POS_DVD_SEARCH);
    }

    if (pbStr[0] == 10)
    {
      vOsdPosShowArg(OSD_POS_DVD_SEARCH, _pwDvdOsdMsg[MSG_TITLE_CHAPTER_SEARCH_PTT_3][bDiscType%2], bTime, pbStr);
    }
    else
    {
      vOsdPosShowArg(OSD_POS_DVD_SEARCH, _pwDvdOsdMsg[MSG_TITLE_CHAPTER_SEARCH_PTT][bDiscType%2], bTime, pbStr);
    }
  }
}

#else /* !DVD_CHAP_3_DIGITS */

void vOsdShowChapterSearch(BYTE bCurTit, BYTE bTotTit, BYTE bNum, BYTE bCurCha, BYTE bTotCha, BYTE bTime) large
{
  BYTE bDiscType = bSharedInfo(SI_DISC_TYPE);
  BYTE pbStr[9];


  pbStr[0] = 8;
  if (bNum == OSD_SEARCH_CLEAR)
  {
    vOsdClearInputField(OSD_POS_DVD_SEARCH);
    vOsdPosClear(OSD_POS_DVD_SEARCH);
  }
  else if (bNum & OSD_DVD_TTL_SEARCH) /* for title search */
  {
    /* error check */
    if (bCurTit > bTotTit)
    {
      bCurTit = bTotTit;
    }
    if (bCurCha > bTotCha)
    {
      bCurCha = bTotCha;
    }

    // only support 2 digits for chapter
    while (bCurCha > 99) bCurCha -= 100;
    while (bTotCha > 99) bTotCha -= 100;

    bCurTit = bHEXToBCD(bCurTit);
    bTotTit = bHEXToBCD(bTotTit);
    bCurCha = bHEXToBCD(bCurCha);
    bTotCha = bHEXToBCD(bTotCha);

    pbStr[1] = ' ';
    pbStr[2] = ' ';
    pbStr[3] = BCD_HI(bTotTit) + '0';
    pbStr[4] = BCD_LO(bTotTit) + '0';
    pbStr[5] = BCD_HI(bCurCha) + '0';
    pbStr[6] = BCD_LO(bCurCha) + '0';
    pbStr[7] = BCD_HI(bTotCha) + '0';
    pbStr[8] = BCD_LO(bTotCha) + '0';

    if (bNum == (OSD_DVD_TTL_SEARCH | 0))
    {
      vOsdSetInputField(OSD_POS_DVD_SEARCH);
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | 1))
    {
#ifdef NO_ADD10_KEY
      pbStr[1] = BCD_LO(bCurTit) + '0';
#else /* for +10 key */
      if (bCurTit > 0)
      {
        pbStr[1] = BCD_HI(bCurTit) + '0';
        if (BCD_LO(bCurTit) == 0)
        {
#ifdef ADD10_SHOW_10
          pbStr[2] = '0';
#else
          pbStr[2] = '-';
#endif
        }
        else
        {
          pbStr[2] = BCD_LO(bCurTit) + '0';
        }
      }
#endif
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | 2))
    {
      pbStr[1] = BCD_HI(bCurTit) + '0';
      pbStr[2] = BCD_LO(bCurTit) + '0';
    }
    else if (bNum == (OSD_DVD_TTL_SEARCH | OSD_DVD_SEARCH_END))
    {
      pbStr[1] = BCD_HI(bCurTit) + '0';
      pbStr[2] = BCD_LO(bCurTit) + '0';
      
      vOsdClearInputField(OSD_POS_DVD_SEARCH);
    }

    // Fix Me
//    vCreateWBEx(0x05);
    vOsdSetInputField(OSD_POS_DVD_SEARCH);
    vOsdPosShowArg(OSD_POS_DVD_SEARCH, _pwDvdOsdMsg[MSG_TITLE_CHAPTER_SEARCH_TTL][bDiscType%2], bTime, pbStr);
  }
  else /* for chapter search */
  {
    /* error check */
    if (bCurTit > bTotTit)
    {
      bCurTit = bTotTit;
    }
    if (bCurCha > bTotCha)
    {
      bCurCha = bTotCha;
    }

    // only support 2 digits for chapter
    while (bCurCha > 99) bCurCha -= 100;
    while (bTotCha > 99) bTotCha -= 100;

    bCurTit = bHEXToBCD(bCurTit);
    bTotTit = bHEXToBCD(bTotTit);
    bCurCha = bHEXToBCD(bCurCha);
    bTotCha = bHEXToBCD(bTotCha);

    pbStr[1] = BCD_HI(bCurTit) + '0';
    pbStr[2] = BCD_LO(bCurTit) + '0';
    pbStr[3] = BCD_HI(bTotTit) + '0';
    pbStr[4] = BCD_LO(bTotTit) + '0';
    pbStr[5] = ' ';
    pbStr[6] = ' ';
    pbStr[7] = BCD_HI(bTotCha) + '0';
    pbStr[8] = BCD_LO(bTotCha) + '0';

    if (bNum == 0)
    {
      vOsdSetInputField(OSD_POS_DVD_SEARCH);
    }
    else if (bNum == 1)
    {
#ifdef NO_ADD10_KEY
      pbStr[5] = BCD_LO(bCurCha) + '0';
#else /* for +10 key */
      if (bCurCha > 0)
      {
        pbStr[5] = BCD_HI(bCurCha) + '0';
        if (BCD_LO(bCurCha) == 0)
        {
#ifdef ADD10_SHOW_10
          pbStr[6] = '0';
#else
          pbStr[6] = '-';
#endif
        }
        else
        {
          pbStr[6] = BCD_LO(bCurCha) + '0';
        }
      }
#endif
    }
    else if (bNum == 2)
    {
      pbStr[5] = BCD_HI(bCurCha) + '0';
      pbStr[6] = BCD_LO(bCurCha) + '0';
    }
    else if (bNum == OSD_DVD_SEARCH_END)
    {
      pbStr[5] = BCD_HI(bCurCha) + '0';
      pbStr[6] = BCD_LO(bCurCha) + '0';
      
      vOsdClearInputField(OSD_POS_DVD_SEARCH);
    }

    // Fix Me
    if (bNum != OSD_DVD_SEARCH_END)
    {
      vOsdSetInputField(OSD_POS_DVD_SEARCH);
    }

    vOsdPosShowArg(OSD_POS_DVD_SEARCH, _pwDvdOsdMsg[MSG_TITLE_CHAPTER_SEARCH_PTT][bDiscType%2], bTime, pbStr);
  }
}
#endif /* !DVD_CHAP_3_DIGITS */

// Fix me
extern xdata DWRD _dCreatedWB;
// *********************************************************************
// Function : void vOsdShowPassword(BYTE bNum, BYTE bLen, BYTE *pbDigit)
// Description :
// Parameter : 
// Return    : 
// Note      : 
// *********************************************************************
void vOsdShowPassword(BYTE bNum, BYTE bLen, BYTE *pbDigit) large
{
  BYTE i;
#if PASSWORD_LEN > 3
  BYTE pbStr[PASSWORD_LEN + 4];
#else
  BYTE pbStr[4 + 4];
#endif

  if (bNum == OSD_PASSWORD_CLEAR)
  {
    vOsdClearInputField(OSD_POS_PTL_PWD);
    vOsdPosClear(OSD_POS_PTL_PWD);
  }
  else
  {
    pbStr[0] = bLen + 3;
    pbStr[1] = bLen;
    pbStr[2] = bLen;
    pbStr[3] = 0;

    for (i = 0; i < bLen; i++)
    {
#if 0
      if (i < bNum)
      {
        pbStr[4 + i] = pbDigit[i] + '0';
      }
      else
      {
        pbStr[4 + i] = '-';
      }
#else
      if (i < bNum)
      {
        pbStr[4 + i] = '*';
      }
      else
      {
        pbStr[4 + i] = ' ';
      }
#endif
    }


    // Fix Me
    vOsdSetInputField(OSD_POS_PTL_PWD);
    vOsdPosShowArg(OSD_POS_PTL_PWD, OSD_MSG_PLS_ENTER_PWD, OSD_NO_DISAPPEAR, pbStr);
  }
}

#ifdef SUPPORT_DVD_AUDIO
// *********************************************************************
// Function : void vOsdShowDiscPassword(BYTE bNum, BYTE *pbDigit)
// Description :
// Parameter : 
// Return    : 
// Note      : 
// *********************************************************************
void vOsdShowDiscPassword(BYTE bNum, BYTE *pbDigit) large
{
  BYTE i;
  BYTE pbStr[5];

  if (bNum == OSD_PASSWORD_CLEAR)
  {
    vOsdClearInputField(OSD_POS_PTL_PWD);
    vOsdPosClear(OSD_POS_PTL_PWD);
  }
  else
  {
    pbStr[0] = 4;

    for (i = 0; i < 4; i++)
    {
      if (i < bNum)
      {
        pbStr[i + 1] = '*';
      }
      else
      {
        pbStr[i + 1] = ' ';
      }
    }

    vOsdSetInputField(OSD_POS_PTL_PWD);
    vOsdPosShowArg(OSD_POS_PTL_PWD, OSD_MSG_DISC_PASSWORD, OSD_NO_DISAPPEAR, pbStr);
  }
}
#endif /* SUPPORT_DVD_AUDIO */

⌨️ 快捷键说明

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