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

📄 osdnd.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
    OSDUTL_PrepareOutputString();    //show "+" or "-"    if (_wOSDNDInfo > NORMALKEY_OFFSET)    {        OSDUTL_CopyStringFromIndex(aNDPlus);        _bOSDNDTemp = _wOSDNDInfo - NORMALKEY_OFFSET;    }    else if (_wOSDNDInfo < NORMALKEY_OFFSET)    {        OSDUTL_CopyStringFromIndex(aNDDash);        _bOSDNDTemp = NORMALKEY_OFFSET - _wOSDNDInfo;    }    else    {        _bOSDNDTemp = 0;        //OSDUTL_CopyStringFromIndex(aNDSpace);		OSDUTL_CopyStringFromIndex(aNDPlus);		//Clear the region.		_OSDNDRect.rect.wLeft = _wOSDNDHPos;        _OSDNDRect.rect.wRight = _OSDNDRect.rect.wLeft+GDI_GetStringWidth(__pOSDUTLOutputString)-1;        _OSDNDRect.rect.wTop = __OSDNDBottomMsgAttr.wY;        _OSDNDRect.rect.wBottom = __OSDNDBottomMsgAttr.wY + +OSDND_FONT_HEIGHT-1;        _OSDNDRect.bColor = __OSDNDBottomMsgAttr.bBackground;                GDI_FillRect_909(0, &_OSDNDRect);		__OSDNDBottomMsgAttr.wX += GDI_GetStringWidth(__pOSDUTLOutputString);		OSDUTL_PrepareOutputString();    }        //show value    OSDUTL_OutputNumFromIndex(_bOSDNDTemp);    //GDI_DrawString_909(0, &__OSDNDBottomMsgAttr, __pOSDUTLOutputString);    _OSDND_OutputBottomString();    __OSDNDBottomMsgAttr.wX = _wOSDNDTemp; //restore the }//***************************************************************************//  Function    :   _OSDND_ShowEcho//  Abstract    :   Call this function to show Echo bar.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowEcho(void){    __pOSDUTLOutputString = aNDEcho;        _wOSDNDHPos = __OSDNDBottomMsgAttr.wX;    //GDI_DrawString_909(0, &__OSDNDBottomMsgAttr, __pOSDUTLOutputString);    _OSDND_OutputBottomString();    _wOSDNDHPos += GDI_GetStringWidth_909(__pOSDUTLOutputString);     //show bolume bar    if (__bOSDClearNDBRegion)    {        _OSDNDRect.rect.wLeft = _wOSDNDHPos;        _OSDNDRect.rect.wRight = _wOSDNDHPos+OSDND_DISPLAY_ECHO_BAR_WIDTH+OSDND_DISTANCE_FONT_ECHO_BAR*2;        _OSDNDRect.rect.wTop = __OSDNDBottomMsgAttr.wY;        _OSDNDRect.rect.wBottom = __OSDNDBottomMsgAttr.wY + +OSDND_FONT_HEIGHT-1;        _OSDNDRect.bColor = __OSDNDBottomMsgAttr.bBackground;                GDI_FillRect_909(0, &_OSDNDRect);    }    _wOSDNDHPos += OSDND_DISTANCE_FONT_ECHO_BAR;    _OSDNDVolumeBar.bBgColor = __OSDNDBottomMsgAttr.bBackground;    _OSDNDVolumeBar.bBarColor = OSDND_PALETTE_ENTRY_BAR_FG;    _OSDNDVolumeBar.bFrameColor = OSDND_PALETTE_ENTRY_UPPER_RIGHT_STRING;  //Alan2.36, Mantis #2241    _OSDNDVolumeBar.bOriention = ORIENTION_HORIZONTAL;    _OSDNDVolumeBar.rect.wLeft = _wOSDNDHPos;    _OSDNDVolumeBar.rect.wRight = _wOSDNDHPos+OSDND_DISPLAY_ECHO_BAR_WIDTH;    _OSDNDVolumeBar.rect.wTop = __OSDNDBottomMsgAttr.wY + (OSDND_FONT_HEIGHT-OSDND_DISPLAY_ECHO_BAR_HEIGHT)/2;    _OSDNDVolumeBar.rect.wBottom = _OSDNDVolumeBar.rect.wTop + OSDND_DISPLAY_ECHO_BAR_HEIGHT;    _OSDNDVolumeBar.wVolume =  (WORD)_wOSDNDInfo*100/OSDND_DISPLAY_ECHO_BAR_RANGE; // percent    GDI_DrawVolumeBar_909(0, &_OSDNDVolumeBar);    __pOSDUTLOutputString = __wOSDUTLStringBuf;    _wOSDNDTemp = __OSDNDBottomMsgAttr.wX;    _wOSDNDHPos += OSDND_DISPLAY_ECHO_BAR_WIDTH+OSDND_DISTANCE_FONT_ECHO_BAR;    __OSDNDBottomMsgAttr.wX = _wOSDNDHPos;    //show value    OSDUTL_PrepareOutputString();    OSDUTL_OutputNumFromIndex(_wOSDNDInfo);    //GDI_DrawString_909(0, &__OSDNDBottomMsgAttr, __pOSDUTLOutputString);    _OSDND_OutputBottomString();    __OSDNDBottomMsgAttr.wX = _wOSDNDTemp; //restore the }//***************************************************************************//  Function    :   _OSDND_Surround//  Abstract    :   Call this function to show surround info.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowSurround(void){	switch (__bSurround)    {    case CHIPS_SURROUND_NONE:        __pOSDUTLOutputString = aNDNoSurround;        break;    case CHIPS_SURROUND_LIVE:        __pOSDUTLOutputString = aNDLiveSurround;        break;    case CHIPS_SURROUND_THEATER:        __pOSDUTLOutputString = aNDTheaterSurround;        break;    case CHIPS_SURROUND_STEREO:        __pOSDUTLOutputString = aNDStereoSurround;        break;    case CHIPS_SURROUND_MOVIE:        __pOSDUTLOutputString = aNDMovieSurround;        break;    case CHIPS_SURROUND_KARAOKE:        __pOSDUTLOutputString = aNDKaraSurround;        break;    }}//***************************************************************************//  Function    :   _OSDND_Show3D//  Abstract    :   Call this function to show the 3D info.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_Show3D(void){#ifdef SUPPORT_3D_FEATURE    switch (_wOSDNDInfo)    {    case 1:        __pOSDUTLOutputString = aND3D1;        break;    case 2:        __pOSDUTLOutputString = aND3D2;        break;    case 3:        __pOSDUTLOutputString = aND3D3;        break;    case 4:        __pOSDUTLOutputString = aND3D4;        break;    case 5:        __pOSDUTLOutputString = aND3D5;        break;    case 6:        __pOSDUTLOutputString = aND3D6;        break;    }#endif}//***************************************************************************//  Function    :   _OSDND_ShowAngle//  Abstract    :   Call this function to show the angle info.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowAngle(void){    if (__bAGL_Ns)    {
        OSDUTL_PrepareOutputString();        OSDUTL_CopyStringFromIndex(aNDAngle);                OSDUTL_OutputNumFromIndex(__bAGLN);        OSDUTL_CopyStringFromIndex(aNDSlash);        OSDUTL_OutputNumFromIndex(__bAGL_Ns);    }}//***************************************************************************//  Function    :   _OSDND_ShowAST//  Abstract    :   Show AST and audio output info.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************
void _OSDND_ShowAST(void){
    OSDUTL_PrepareOutputString();    OSDUTL_CopyStringFromIndex(aNDLanguage);        _OSDND_OutputAudioType(__bAudioType);
#ifndef NO_DISC_MODE //CoCo2.37    if (__wDiscType & BOOK_DVD)    {        OSDUTL_CopyStringFromIndex(aNDAudioDistance);                _OSDDND_OutputAudioChannel(__bACHN);    }
#endif //#ifndef NO_DISC_MODE //CoCo2.37    OSDUTL_CopyStringFromIndex(aNDAudioDistance);    if (__bASTNs) // AST exist    {        if (!(__wDiscType & BOOK_2X)) //SVCD and CVD        {            _OSDND_CodeToLanguage(__wA_LCD);            OSDUTL_CopyStringFromIndex(aNDAudioDistance);        }        OSDUTL_OutputNumFromIndex((WORD)(__bASTNO+1));        OSDUTL_CopyStringFromIndex(aNDSlash);         OSDUTL_OutputNumFromIndex(__bASTNs);    }    else                    OSDUTL_CopyStringFromIndex(aNDPUnknownLanguage);   }
//***************************************************************************//  Function    :   _OSDND_CodeToLanguage//  Abstract    :   This function will output the country according to wCode.//  Arguments   :   wCode: The code that you want to transform.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_CodeToLanguage(WORD wCode){    switch(wCode)    {    case 0x6a61: // Japanese, 'ja'        OSDUTL_CopyStringFromIndex(aNDLanguageJapanese);        break;    case 0x656e: // English, 'en'        OSDUTL_CopyStringFromIndex(aNDLanguageEnglish);        break;    case 0x6672: // French, 'fr'        OSDUTL_CopyStringFromIndex(aNDLanguageFrench);        break;    case 0x6465: // German, 'de'        OSDUTL_CopyStringFromIndex(aNDLanguageGerman);        break;    case 0x7275: // Russian, 'ru'        OSDUTL_CopyStringFromIndex(aNDLanguageRussian);        break;    case 0x7a68: // Chinese, 'zh'        OSDUTL_CopyStringFromIndex(aNDLanguageChinese);        break;    case 0x6b6f: // Korean, 'ko'        OSDUTL_CopyStringFromIndex(aNDLanguageKorean);        break;    case 0x6869: // Hindi, 'hi'        OSDUTL_CopyStringFromIndex(aNDLanguageHindi);        break;    case 0x7468: // Thai, 'th'        OSDUTL_CopyStringFromIndex(aNDLanguageThai);        break;    case 0x6974: // Italian, 'it'        OSDUTL_CopyStringFromIndex(aNDLanguageItalian);        break;    case 0x6573: // Spanish, 'es'        OSDUTL_CopyStringFromIndex(aNDLanguageSpanish);        break;    case 0x7074: // Portuguese, 'pt'        OSDUTL_CopyStringFromIndex(aNDLanguagePortuguese);        break;    case 0x6e6c: // Dutch, 'nl'        OSDUTL_CopyStringFromIndex(aNDLanguageDutch);        break;    case 0x656c: // Greek, 'el'        OSDUTL_CopyStringFromIndex(aNDLanguageGreek);        break;    case 0x6c61: // Latin, 'la'        OSDUTL_CopyStringFromIndex(aNDLanguageLatin);        break;    case 0x6e6f: // Norwegian, 'no'        OSDUTL_CopyStringFromIndex(aNDLanguageNorwegian);        break;    case 0x6461: // Danish, 'da'        OSDUTL_CopyStringFromIndex(aNDLanguageDanish);        break;    case 0x6669: // Finnish, 'fi'        OSDUTL_CopyStringFromIndex(aNDLanguageFinnish);        break;    case 0x7376: // Swedish, 'sv'        OSDUTL_CopyStringFromIndex(aNDLanguageSwedish);        break;    case 0x6875: // Hungarian, 'hu'        OSDUTL_CopyStringFromIndex(aNDLanguageHungarian);        break;    case 0x706c: // Polish, 'pl'        OSDUTL_CopyStringFromIndex(aNDLanugagePolish);        break;    case 0x6973: // Icelandic, 'is'        OSDUTL_CopyStringFromIndex(aNDLanguageIcelandic);        break;    case 0x6977: // Hebrew, 'iw'        OSDUTL_CopyStringFromIndex(aNDLanguageHebrew);        break;    case 0x6373: // Czech, 'cs'        OSDUTL_CopyStringFromIndex(aNDLanguageCzech);        break;    case 0x6172: // Arabic, 'ar'        OSDUTL_CopyStringFromIndex(aNDLanguageArabic);        break;    case 0x6d73: // Malay, 'ms'        OSDUTL_CopyStringFromIndex(aNDLanguageMalay);        break;    case 0x696e: // Indonesian, 'in'        OSDUTL_CopyStringFromIndex(aNDLanguageIndonesian);        break;    case 0x6865: // Hebrew, 'he' **** Is it 'heb' or 'her'        OSDUTL_CopyStringFromIndex(aNDLanguageHebrew);        break;    case 0x7472: // Turkish, 'tr'        OSDUTL_CopyStringFromIndex(aNDLanguageTurkish);        break;    case 0x6872: // Croatian, 'hr'        OSDUTL_CopyStringFromIndex(aNDLanguageCroatian);        break;    case 0x6267: // Bulgarian, 'bg'        OSDUTL_CopyStringFromIndex(aNDLanguageBulgarian);        break;    default:        OSDUTL_CopyStringFromIndex(aNDLanguageOthers);        break;    }}//***************************************************************************//  Function    :   _OSDND_ShowSPST//  Abstract    :   Show SPST info.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_ShowSPST(void){
    OSDUTL_PrepareOutputString();    OSDUTL_CopyStringFromIndex(aNDSubtitle);    // spst is on, ie. __bSP_Disp_OFF is 0 or 128 ~255    if ((__bSP_Disp_OFF==0) || (__bSP_Disp_OFF&0x80))    {        if (!(__wDiscType & BOOK_2X)) //SVCD and CVD        {            /*            _wOSDNDTemp = DVD_GetLangCD(SET_SPST, __bSPSTNO);            _OSDDSPLY_CodeToLanguage(_wOSDNDTemp);            */            _OSDDSPLY_CodeToLanguage(__wSP_LCD); //CoCo1.20, use __wSP_LCD to show SPST language directly.                        OSDUTL_CopyStringFromIndex(aNDAudioDistance);        }        OSDUTL_OutputNumFromIndex((WORD)(__bSPSTNO+1));        OSDUTL_CopyStringFromIndex(aNDSlash);        OSDUTL_OutputNumFromIndex(__bSPSTNs);    }    else // spst is off        OSDUTL_CopyStringFromIndex(aNDOff);   
}//***************************************************************************//  Function    :   _OSDND_DefaultState//  Abstract    :   This function will set the default value about forground,//              :   background, and vertical starting position for upper right //              :   message.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_DefaultState(void){    __OSDNDUpMsgAttr.bBackground = OSDND_PALETTE_ENTRY_BACKGROUND;    __OSDNDUpMsgAttr.bColorKey = 0;    __OSDNDUpMsgAttr.bShadow1 = PAL_ENTRY_COLOR_TRANSPARENT;    __OSDNDUpMsgAttr.bShadow2 = PAL_ENTRY_COLOR_TRANSPARENT;    __OSDNDUpMsgAttr.bTextColor = OSDND_PALETTE_ENTRY_UPPER_RIGHT_STRING;    __OSDNDUpMsgAttr.wX = OSDND_DISPLAY_UPPER_RIGHT_POS_H;    __OSDNDUpMsgAttr.wY = OSDND_DISPLAY_UPPER_RIGHT_POS_V;    __OSDNDBottomMsgAttr.bBackground = OSDND_PALETTE_ENTRY_BACKGROUND;    __OSDNDBottomMsgAttr.bColorKey = 0;    __OSDNDBottomMsgAttr.bShadow1 = PAL_ENTRY_COLOR_TRANSPARENT;    __OSDNDBottomMsgAttr.bShadow2 = PAL_ENTRY_COLOR_TRANSPARENT;    __OSDNDBottomMsgAttr.bTextColor = OSDND_PALETTE_ENTRY_UPPER_RIGHT_STRING;    __OSDNDBottomMsgAttr.wX = OSDND_DISPLAY_BOTTOM_START_H;    //CoCo1.20, put the normal bottom meesage to be lower in PAL mode.#ifdef ENLARGE_OSD_FOR_PAL_MODE    if ((__bTVType == SETUP_SCREEN_TV_SYSTEM_NTSC) || (__bTVType == SETUP_SCREEN_TV_SYSTEM_PAL_M))        __OSDNDBottomMsgAttr.wY = OSDND_DISPLAY_BOTTOM_START_V;    else        __OSDNDBottomMsgAttr.wY = OSDND_DISPLAY_BOTTOM_START_V_PAL;#else    __OSDNDBottomMsgAttr.wY = OSDND_DISPLAY_BOTTOM_START_V;#endif            GDI_SetMixRatio(OSDND_MIX_RATIO_BACKGROUND); //The mix ratio just effects the background}//***************************************************************************//  Function    :   _OSDND_InitializeGDI//  Abstract    :   This function will initialize the palettes and draw the background of//              :   the normal display.//  Arguments   :   none.//  Return		:   none.//  Side Effect :   none.//  Notes       :   //***************************************************************************void _OSDND_InitializeGDI(void){        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_BACKGROUND, OSDND_PALETTE_COLOR_BACKGROUND, TRUE);    GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_UPPER_RIGHT_STRING, OSDND_PALETTE_COLOR_UPPER_RIGHT_STRING, FALSE);    GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_BOTTOM_STRING, OSDND_PALETTE_COLOR_BOTTOM_STRING, FALSE);    GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_BAR_FG, OSDND_PALETTE_COLOR_BAR_FG, FALSE);        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_MUTE_ICON_TEXT_FOREGROUND, OSDND_PALETTE_COLOR_MUTE_ICON_TEXT_FOREGROUND, FALSE);        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_MUTE_ICON_SHADOW_1, OSDND_PALETTE_COLOR_MUTE_ICON_SHADOW_1, FALSE);        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_MUTE_ICON_SHADOW_2, OSDND_PALETTE_COLOR_MUTE_ICON_SHADOW_2, FALSE);        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_MUTEOFF_ICON_TEXT_FOREGROUND, OSDND_PALETTE_COLOR_MUTEOFF_ICON_TEXT_FOREGROUND, FALSE);        GDI_ChangePALEntry(OSDND_PALETTE_ENTRY_MUTEOFF_ICON_SHADOW_1, OSDND_PALETTE_COLOR

⌨️ 快捷键说明

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