📄 osd.h
字号:
#ifndef __OSD_H
#define __OSD_H
/*
#define OSD_SPLIT
*/
extern const char _OsdMessegeFont1[][2][16];
#define OsdColor(Y,U,V,B) ((UINT16)(((BYTE)(Y) >> 2) << 10) | \
(UINT16)(((BYTE)(U) >> 4) << 6) | \
(UINT16)(((BYTE)(V) >> 4) << 2) | \
(UINT16)( (BYTE)(B) & 0x03))
#ifdef OSD_SPLIT
#define __osd_header_hi(CLU,HSize,Shade,HighColor,Row,Column) \
(((UINT32)((CLU) & 0x0001) << 31) | \
((UINT32)((HSize) & 0x007f) << 24) | \
((UINT32)((Shade) & 0x000f) << 20) | \
((UINT32)((HighColor) & 0x0001) << 18) | \
((UINT32) (0x0001) << 19) | \
((UINT32)((Row) & 0x01ff) << 9) | \
((UINT32)((Column) & 0x01ff) << 0))
#else
#define __osd_header_hi(CLU,HSize,Shade,HighColor,Row,Column) \
(((UINT32)((CLU) & 0x0001) << 31) | \
((UINT32)((HSize) & 0x007f) << 24) | \
((UINT32)((Shade) & 0x000f) << 20) | \
((UINT32)((HighColor) & 0x0001) << 18) | \
((UINT32)((Row) & 0x01ff) << 9) | \
((UINT32)((Column) & 0x01ff) << 0))
#endif
#define __osd_header_lo(Link,ColorRes,VSize,PixelRes,Blend) \
(((UINT32)((Link) & 0xffff) << 16) | \
((UINT32)((ColorRes) & 0x0001) << 15) | \
((UINT32)((VSize) & 0x01ff) << 6) | \
((UINT32)((PixelRes) & 0x0001) << 5) | \
((UINT32)((Blend) & 0x000f) << 1))
#define OSD_CLUT_UPDATE 1
#define OSD_CLUT_REMAIN 0
/*
** CLUT type
** HIGH_COLOR COLOR_RESOLUTION
** 4-color 0 1
** 16-color 0 0
** 256-color 1 0
** reserved 1 1
**
*/
#define OSD_CLUT_4 1
#define OSD_CLUT_16 0
#define OSD_CLUT_256 2
#define OSD_CLUT_HIGH 3
#define osd_header_hi(CLU,HSize,VSize,Row,Column,PixelRes,ClutType,Shade,Blend,Link) \
__osd_header_hi(CLU,HSize,Shade,(ClutType)>>1,Row,Column)
#define osd_header_lo(CLU,HSize,VSize,Row,Column,PixelRes,ClutType,Shade,Blend,Link) \
__osd_header_lo(Link,(ClutType)&0x01,VSize,PixelRes,Blend)
#define LINK_NULL (0xffff)
#define __palette(Y,Cb,Cr,BlendFactor) \
((((UINT32)(Y) & 0x3f) << 10) | \
(((UINT32)(Cb) & 0x0f) << 6) | \
(((UINT32)(Cr) & 0x0f) << 2) | \
(((UINT32)(BlendFactor) & 0x03)))
/*
* (Blend,Fill)
* (X,0) : blending_level active
* (X,1) : force to fill color,no blending
*/
#define __palette2(Y,Cb,Cr,Blend,Fill) \
((((UINT32)(Y) & 0x3f) << 10) | \
(((UINT32)(Cb) & 0x0f) << 6) | \
(((UINT32)(Cr) & 0x0f) << 2) | \
((Blend) ? 0x02 : 0x00) | \
((Fill) ? 0x01 : 0x00))
#define __paletteF(Y,B,R,BlendFactor) \
__palette( (Y) >> 2, (B) >> 4, (R) >> 4, (BlendFactor))
#define __palette2F(Y,B,R,Blend,Fill) \
__palette2((Y) >> 2, (B) >> 4, (R) >> 4, (Blend), (Fill))
/************************************************
* Standard Color : NEW MAP *
* *
* COLOR Y Cb Cr *
* WHITE 0xEB 0x80 0x80 *
* YELLOW 0xD2 0x10 0x92 *
* CYAN 0xAA 0xA6 0x10 *
* GREEN 0x91 0x36 0x22 *
* MAGENTA 0x6A 0xcA 0xDE *
* RED 0x51 0x5A 0x6E *
* BLUE 0x29 0xF0 0x6E *
* BLACK 0x10 0x80 0x80 *
************************************************/
#define STD_BLACK __palette2F(0x10, 0x80, 0x80, 1, 0)
#define STD_GREEN __palette2F(0x91, 0x36, 0x22, 1, 1)
#define STD_MAGENTA __palette2F(0x6A, 0xCA, 0xDE, 1, 0)
#define STD_WHITE __palette2F(0xEB, 0x80, 0x80, 1, 1)
#define STD_BLUE __palette2F(0x29, 0xF0, 0x6E, 1, 1)
#define MOD_WHITE __palette2F(0xEB, 0x80, 0x80, 1, 1)
#define MOD_GREEN __palette2F(0x70, 0x3a, 0x48, 1, 1)
#define MOD_BLACK __palette2F(0x10, 0x80, 0x80, 1, 1)
#define MOD_MAGENTA __palette2F(0x6A, 0xCA, 0xDE, 1, 1)
#define MOD_BLUE __palette2F(0x29, 0xF0, 0x6E, 1, 0)
#define MOD_YELLOW __palette2F(0xD2, 0x10, 0x92, 1, 1)
#define MOD_CYAN __palette2F(0xAA, 0xA6, 0x10, 1, 1)
/************************************************
* Standard Color : OLD MAP *
* *
* COLOR Y Cb Cr *
* WHITE 0xEB 0x80 0x80 *
* YELLOW 0x83 0x2c 0x9c *
* CYAN 0xa2 0x8e 0x2c *
* GREEN 0x70 0x3a 0x48 *
* MAGENTA 0x54 0xc6 0xb8 *
* RED 0x23 0x72 0xd4 *
* BLUE 0x41 0xd4 0x64 *
* BLACK 0x10 0x80 0x80 *
************************************************/
enum {
REGION0 = 0,
REGION1, // 1
REGION2, // 2
REGION3, // 3
REGION4,
REGION5,
REGION6,
REGION7,
};
enum {
/* 0 */ STR_OS_NULL = 0, // NULL
/* 1 */ STR_OS_NODISC , //礚盒
/* 2 */ STR_OS_NO , //眤
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -