| 1 | #include "DST_Common.h" |
|---|
| 2 | #include "DST_CC_Setup.h" |
|---|
| 3 | #include "DST_ChannelTune.h" |
|---|
| 4 | #include "DST_HostInterface.h" |
|---|
| 5 | #include "DST_FontEngine.h" |
|---|
| 6 | |
|---|
| 7 | void DST_CCManagerInit(void); |
|---|
| 8 | bool DST_608_GetAvailable() ; |
|---|
| 9 | |
|---|
| 10 | DS_U8 DST_CC_GetBackColor() // ¹è°æ»öÀ» ¼³Á¤ÇÑ´Ù. |
|---|
| 11 | { |
|---|
| 12 | return CC_DEFAULT; |
|---|
| 13 | } |
|---|
| 14 | DS_U8 DST_CC_GetBackOpacity() // ¹è°æ Åõ¸íµµ¸¦ ¼±ÅÃÇÑ´Ù. |
|---|
| 15 | { |
|---|
| 16 | return CC_DEFAULT; |
|---|
| 17 | } |
|---|
| 18 | DS_U8 DST_CC_GetSize() // ÆùÆ® »çÀÌÁ ¼±ÅÃÇÑ´Ù. |
|---|
| 19 | { |
|---|
| 20 | return CC_DEFAULT; |
|---|
| 21 | } |
|---|
| 22 | DS_U8 DST_CC_GetStyle() // ÆùÆ®¸¦ ¼³Á¤ÇÑ´Ù. |
|---|
| 23 | { |
|---|
| 24 | return CC_DEFAULT; |
|---|
| 25 | } |
|---|
| 26 | DS_U8 DST_CC_GetColor() // ÆùÆ®»öÀ» ¼±ÅÃÇÑ´Ù. |
|---|
| 27 | { |
|---|
| 28 | return CC_DEFAULT; |
|---|
| 29 | } |
|---|
| 30 | DS_U8 DST_CC_GetOpacity() //ÆùÆ® Åõ¸íµµ¸¦ ¼±ÅÃÇÑ´Ù. |
|---|
| 31 | { |
|---|
| 32 | return CC_DEFAULT; |
|---|
| 33 | } |
|---|
| 34 | DS_U8 DST_CC_GetEdge() // ÆùÆ® Edge¸¦ ¼±ÅÃÇÑ´Ù. |
|---|
| 35 | { |
|---|
| 36 | return CC_DEFAULT; |
|---|
| 37 | } |
|---|
| 38 | DS_U8 DST_CC_GetEdgeColor() // ÆùÆ® EdgeÀÇ »öÀ» ¼±ÅÃÇÑ´Ù. |
|---|
| 39 | { |
|---|
| 40 | return CC_DEFAULT; |
|---|
| 41 | } |
|---|
| 42 | DS_U8 DST_CC_GetItalic() // ÆùÆ®ÀÇ ÀÌÅŸ¯ ¿©ºÎ ¼³Á¤ |
|---|
| 43 | { |
|---|
| 44 | return CC_DEFAULT; |
|---|
| 45 | } |
|---|
| 46 | DS_U8 DST_CC_GetUnderline() // ÆùÆ®ÀÇ ¾ð´õ¶óÀÎ ¼³Á¤ |
|---|
| 47 | { |
|---|
| 48 | return CC_DEFAULT; |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | // Wide Screen ÀÎÁö ¼³Á¤ÇÑ´Ù. |
|---|
| 52 | static DS_U8 DST_g_CC_WideScreen = true; |
|---|
| 53 | void DST_CC_SetWideScreen(bool bWide) |
|---|
| 54 | { |
|---|
| 55 | DST_g_CC_WideScreen = bWide; |
|---|
| 56 | } |
|---|
| 57 | |
|---|
| 58 | bool DST_CC_GetWideScreen() |
|---|
| 59 | { |
|---|
| 60 | return DST_g_CC_WideScreen; |
|---|
| 61 | } |
|---|
| 62 | |
|---|
| 63 | int DST_GetCCScreenHeight() |
|---|
| 64 | { |
|---|
| 65 | return DST_GetScreenHeight() * 84 / 100; |
|---|
| 66 | } |
|---|
| 67 | int DST_GetCCScreenWidth() |
|---|
| 68 | { |
|---|
| 69 | return DST_GetScreenWidth() * 84 / 100; |
|---|
| 70 | } |
|---|
| 71 | |
|---|
| 72 | // CCÀÇ ÆùÆ® »çÀÌÁ °áÁ¤ÇÑ´Ù. |
|---|
| 73 | int DST_DecideFontSize(int nRow) |
|---|
| 74 | { |
|---|
| 75 | int i; |
|---|
| 76 | for ( i = 5; i < 256; i++) |
|---|
| 77 | { |
|---|
| 78 | if (DST_GetFontHeight(i) * nRow > DST_GetCCScreenHeight()) return i-1; |
|---|
| 79 | } |
|---|
| 80 | return 255; |
|---|
| 81 | } |
|---|
| 82 | |
|---|
| 83 | bool DST_CC_Available() |
|---|
| 84 | { |
|---|
| 85 | // Æ©´×ÇÑÁö 1ÃÊ À̳»¶ó¸é ÀÌÀü ä³ÎÀÇ µ¥ÀÌÅÍ ÀÏ ¼ö ÀÖÀ¸´Ï ¹«½ÃÇÑ´Ù. |
|---|
| 86 | if (DST_g_LastTuneTryTime > DST_OS_GetTickCount()) DST_g_LastTuneTryTime = DST_OS_GetTickCount(); |
|---|
| 87 | if (DST_OS_GetTickCount() - DST_g_LastTuneTryTime < DST_OS_GetTicksPerSecond() * 1) return false; |
|---|
| 88 | //T(); |
|---|
| 89 | // 15ÃÊ À̳»¿¡ ¹ÞÀº CC µ¥ÀÌÅͰ¡ ÀÖ´Ù¸é Àִ°Ŵ٠|
|---|
| 90 | if (DST_g_CC_DataReceiveTick > DST_OS_GetTickCount()) DST_g_CC_DataReceiveTick = DST_OS_GetTickCount(); |
|---|
| 91 | if (DST_OS_GetTickCount() - DST_g_CC_DataReceiveTick > DST_OS_GetTicksPerSecond() * 15) return false; |
|---|
| 92 | //T(); |
|---|
| 93 | return true; |
|---|
| 94 | } |
|---|