source: svn/trunk/zasc/app/DST_CC_Setup.cpp @ 22

Last change on this file since 22 was 2, checked in by phkim, 11 years ago

1.phkim

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