📄 osddsply.c
字号:
_OSDDSPLYRect.rect.wLeft = OSDDSPLY_LD_TIME_START_H;
_OSDDSPLYRect.rect.wTop = OSDDSPLY_LD_TIME_START_V;
_OSDDSPLYRect.rect.wRight = OSDDSPLY_LD_TIME_START_H + OSDDSPLY_LD_TIME_WIDTH;
_OSDDSPLYRect.rect.wBottom = OSDDSPLY_LD_TIME_START_V + OSDDSPLY_LD_TIME_HEIGHT;
break;
case OSDDSPLY_BACKGROUND_VP_DVD:
case OSDDSPLY_BACKGROUND_VP_DIVX:
_OSDDSPLYRect.rect.wLeft = OSDDSPLY_VP_START_H;
_OSDDSPLYRect.rect.wTop = OSDDSPLY_VP_START_V;
_OSDDSPLYRect.rect.wRight = OSDDSPLY_VP_START_H + OSDDSPLY_VP_WIDTH;
_OSDDSPLYRect.rect.wBottom = OSDDSPLY_VP_START_V + OSDDSPLY_VP_DVD_HEIGHT;
break;
case OSDDSPLY_BACKGROUND_VP_JPEG:
_OSDDSPLYRect.rect.wLeft = OSDDSPLY_VP_START_H;
_OSDDSPLYRect.rect.wTop = OSDDSPLY_VP_START_V;
_OSDDSPLYRect.rect.wRight = OSDDSPLY_VP_START_H + OSDDSPLY_VP_WIDTH;
_OSDDSPLYRect.rect.wBottom = OSDDSPLY_VP_START_V + OSDDSPLY_VP_JPEG_HEIGHT;
break;
case OSDDSPLY_BACKGROUND_NAVIGATOR:
//Can't clear all region because it may clear the normal upper/bottom region.
//Should reserve the normal upper/bottom region.
_OSDDSPLYRect.rect.wLeft = 0;
_OSDDSPLYRect.rect.wTop = OSDDSPLY_NAVIGATOR_ICON_START_V-OSDDSPLY_NAVIGATOR_ICON_FRAME_THICKNESS;
_OSDDSPLYRect.rect.wRight = 616;
_OSDDSPLYRect.rect.wBottom = OSDND_BOTTOM_BACKGROUND_START_V;
break;
default:
break;
}
_OSDDSPLYRect.rect.wRight -= 1;
_OSDDSPLYRect.rect.wBottom -= 1;
}
//***************************************************************************
// Function : _OSDDSPLY_DrawBackground
// Abstract : This function will draw the background for each Display mode.
// Arguments : bBackgroundType: the type of the background.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_DrawBackground(BYTE bBackgroundType)
{
if (bBackgroundType == OSDDSPLY_BACKGROUND_NAVIGATOR)
{
//Navigator needs to draw the bitmap. It's not the same as other Display mode.
//Need to draw the bitmap here.
return;
}
// GDI_SetMixRatio(OSDDSPLY_LD_MIX_RATIO_BACKGROUND); //The mix ratio just effects the background
_OSDDSPLY_SetBackground(bBackgroundType);
_OSDDSPLYRect.bColor = OSDDSPLY_LD_PALETTE_ENTRY_GENERAL_BACKGROUND;
//GDI_FillRect_909(0, &_OSDDSPLYRect);
GDI_FillRoundRect(0, OSDDSPLY_BACKGROUND_ARC_VALUE, &_OSDDSPLYRect);
#ifndef SUPPORT_SIMPLE_DISPLAY_MODE
//Fill the frame of round rectangle
_OSDDSPLYRect.bColor = OSDDSPLY_LD_PALETTE_ENTRY_GENERAL_BACKGROUND_FRAME;
_OSDDSPLYRect.rect.wLeft -= OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
_OSDDSPLYRect.rect.wTop -= OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
_OSDDSPLYRect.rect.wRight += OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
_OSDDSPLYRect.rect.wBottom += OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
GDI_DrawRoundRect(0, OSDDSPLY_BACKGROUND_OUTER_ARC_VALUE, OSDDSPLY_BACKGROUND_ARC_VALUE, &_OSDDSPLYRect);
#endif //SUPPORT_SIMPLE_DISPLAY_MODE
}
//***************************************************************************
// Function : _OSDDSPLY_ClearBackground
// Abstract : This function will clear the background for each Display mode.
// Arguments : bBackgroundType: the type of the background.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_ClearBackground(BYTE bBackgroundType)
{
_OSDDSPLY_SetBackground(bBackgroundType);
_OSDDSPLYRect.bColor = PAL_ENTRY_COLOR_TRANSPARENT;
#ifndef SUPPORT_SIMPLE_DISPLAY_MODE
if (bBackgroundType != OSDDSPLY_BACKGROUND_NAVIGATOR)
{
//clear the frame
_OSDDSPLYRect.rect.wLeft = 0;
_OSDDSPLYRect.rect.wTop -= OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
_OSDDSPLYRect.rect.wRight = 616;
_OSDDSPLYRect.rect.wBottom += OSDDSPLY_BACKGROUND_OUTER_INNER_ARC_PIXEL;
}
#endif //SUPPORT_SIMPLE_DISPLAY_MODE
GDI_FillRect(0, &_OSDDSPLYRect);
}
//***************************************************************************
// Function : _OSDDSPLY_LD_Show
// Abstract : This function will show one-line Display mode.
// Arguments : none.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_LD_Show(BYTE bRecoverUI)
{
if (!bRecoverUI && (pOSDDSPTypeMode[_bOSDDSPLYMode].bBackgroundType == pOSDDSPTypeMode[_bOSDDSPLYMode-1].bBackgroundType))
{
if (__wDiscType & CDROM_M1)
{
_OSDDSPLY_LD_ClearRegion(OSDDSPLY_REGION_LD_CDROM_TIME, 0);
}
else
{
//just clear the the time region and re-draw it.
_OSDDSPLY_LD_ClearRegion(OSDDSPLY_LD_REGION_TIME, 0);
}
//Set the current time type.
_OSDDSPLY_LD_SetTimeType();
//Calculate the time through the trigger.
UTL_OutputShowTime();
_OSDDSPLY_LD_ShowTime(OSDDSPLY_UPDATE_ITEM | OSDDSPLY_UPDATE_INFO);
}
else //Enter general one-line display at first time.
{
if (__wDiscType & BOOK_DVD)
{
#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
#ifndef NO_DISC_MODE //CoCo2.37
if ((__bDomain==VTSM_DOM) || (__bDomain==VMGM_DOM)) // Root Menu
{
_bOSDDSPLYLDTitleMenuMode = TRUE;
//Show "Title Menu"
OSDUTL_PrepareOutputString();
_OSDDSPLY_ShowTitleMenu();
_OSDDSPLY_LD_DrawRegion(OSDDSPLY_REGION_LD_MENU, OSDDSPLY_UPDATE_INFO, 0);
}
else
{
//Draw all item and info.
_OSDDSPLY_LD_ShowItem(MSG_TITLE);
_OSDDSPLY_LD_ShowItem(MSG_CHAPTER);
if (__bCountStop != 0) //pre-stop or stop mode
{
_OSDDSPLY_LD_UpdateUnknownRegions();
return;
}
else
{
_OSDDSPLY_LD_ShowInfo(MSG_TITLE);
_OSDDSPLY_LD_ShowInfo(MSG_CHAPTER);
}
}
//Set the current time type.
_OSDDSPLY_LD_SetTimeType();
//Calculate the time through the trigger.
UTL_OutputShowTime();
_OSDDSPLY_LD_ShowTime(OSDDSPLY_UPDATE_ITEM | OSDDSPLY_UPDATE_INFO);
#endif //#ifndef NO_DISC_MODE //CoCo2.37
#else
return;
#endif //#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
}
else if (__wDiscType & CDROM_M1)
{
//Show file name item
_OSDDSPLY_LD_ShowItem(MSG_FILE_NAME);
//Show file name info.
_OSDDSPLY_LD_ShowInfo(MSG_FILE_NAME);
//Show file num item.
_OSDDSPLY_LD_ShowItem(MSG_FILE_NUM);
_wOSDDSPLYInfo = __wPlayItem; //Prepare the info. for _OSDDSPLY_ShowTrackInfo() at the first time when JPEG display is on.
//Show file num info.
_OSDDSPLY_LD_ShowInfo(MSG_FILE_NUM);
if (__bAttrPlay != ATTR_JPG)
{
//Set the current time type.
_OSDDSPLY_LD_SetTimeType();
//Calculate the time through the trigger.
UTL_OutputShowTime();
_OSDDSPLY_LD_ShowTime(OSDDSPLY_UPDATE_ITEM |OSDDSPLY_UPDATE_INFO);
}
}
else
{
#ifndef NO_VCD_DISPLAY_UI //++CoCo2.37p
_OSDDSPLY_LD_ShowItem(MSG_TRACK);
if (__bCountStop != 0) //pre-stop or stop mode
{
_OSDDSPLY_LD_UpdateUnknownRegions();
return;
}
else
{
_wOSDDSPLYInfo = gcShowStatus.wCurrentTrack;
_OSDDSPLY_LD_ShowInfo(MSG_TRACK);
//Set the current time type.
_OSDDSPLY_LD_SetTimeType();
//Calculate the time through the trigger.
UTL_OutputShowTime();
_OSDDSPLY_LD_ShowTime(OSDDSPLY_UPDATE_ITEM | OSDDSPLY_UPDATE_INFO);
}
#else
return;
#endif //#ifndef NO_VCD_DISPLAY_UI //++CoCo2.37p
}
//Show "Program" Status
_OSDDSPLY_LD_ShowInfo(MSG_PROGRAM);
}
}
//***************************************************************************
// Function : _OSDDSPLY_LD_ShowSpecialTimeMode
// Abstract :
// Arguments :
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_LD_ShowSpecialTimeMode(void)
{
//Show time.
if (gcShowStatus.bStill || (__bCountStop != 0))
{
__pOSDUTLOutputString = aDSPLYUnknownTime;
_OSDDSPLY_LD_DrawRegion(OSDDSPLY_REGION_TIME_LD_TIME, OSDDSPLY_UPDATE_INFO, 0);
return;
}
OSDUTL_PrepareOutputString();
OSDUTL_ShowHourMinSec();
_OSDDSPLY_LD_DrawRegion(OSDDSPLY_REGION_TIME_LD_TIME, OSDDSPLY_UPDATE_INFO, 0);
}
//***************************************************************************
// Function : _OSDDSPLY_LD_SetTimeType
// Abstract : This function set __bShowTimeType according to current Display mode.
// Arguments : none.
// Return : none.
// Side Effect : none.
// Notes :
//***************************************************************************
void _OSDDSPLY_LD_SetTimeType(void)
{
_wOSDDSPLYHPos = 0;
//show type of the time.
switch (pOSDDSPTypeMode[_bOSDDSPLYMode].bDisplayModeID)
{
#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
case OSDDSPLY_MODE_DVD_TITLE_ELAPSED:
__bShowTimeType = MSG_TITLE_TIME;
break;
case OSDDSPLY_MODE_DVD_TITLE_REMAIN:
__bShowTimeType = MSG_REMAIN_TITLE_TIME;
break;
case OSDDSPLY_MODE_DVD_CHAPTER_ELAPSED:
__bShowTimeType = MSG_CHAPTER_TIME;
break;
case OSDDSPLY_MODE_DVD_CHAPTER_REMAIN:
__bShowTimeType = MSG_REMAIN_CHAPTER_TIME;
break;
#endif //#ifndef NO_DVD_DISPLAY_UI //++CoCo2.37p
#ifndef NO_VCD_DISPLAY_UI //++CoCo2.37p
case OSDDSPLY_MODE_VCD_SINGLE_ELAPSED:
__bShowTimeType = MSG_RELTIME;
break;
case OSDDSPLY_MODE_VCD_SINGLE_REMAIN:
__bShowTimeType = MSG_REMAIN_RELTIME;
break;
case OSDDSPLY_MODE_VCD_TOTAL_ELAPSED:
__bShowTimeType = MSG_ABSTIME;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -