file encoding to utf-8

This commit is contained in:
d1str4ught
2025-08-19 00:30:50 +02:00
parent be56f3f31a
commit ea712bec83
241 changed files with 1753 additions and 1753 deletions

View File

@@ -121,12 +121,12 @@ int ReadToken(const char* token)
void CGraphicTextInstance::Update()
{
if (m_isUpdate) // 문자열이 바뀌었을 때만 업데이트 한다.
if (m_isUpdate) // 문자열이 바뀌었을 때만 업데이트 한다.
return;
if (m_roText.IsNull())
{
Tracef("CGraphicTextInstance::Update - 폰트가 설정되지 않았습니다\n");
Tracef("CGraphicTextInstance::Update - 폰트가 설정되지 않았습니다\n");
return;
}
@@ -139,7 +139,7 @@ void CGraphicTextInstance::Update()
UINT defCodePage = GetDefaultCodePage();
UINT dataCodePage = defCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
UINT dataCodePage = defCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
CGraphicFontTexture::TCharacterInfomation* pSpaceInfo = pFontTexture->GetCharacterInfomation(dataCodePage, ' ');
@@ -185,7 +185,7 @@ void CGraphicTextInstance::Update()
bool isEnglish = true;
int nEnglishBase = wArabicTextLen - 1;
//<<하이퍼 링크>>
//<<하이퍼 링크>>
int x = 0;
int len;
@@ -194,7 +194,7 @@ void CGraphicTextInstance::Update()
std::wstring hyperlinkBuffer;
int no_hyperlink = 0;
// 심볼로 끝나면 아랍어 모드로 시작해야한다
// 심볼로 끝나면 아랍어 모드로 시작해야한다
if (Arabic_IsInSymbol(wArabicText[wArabicTextLen - 1]))
{
isEnglish = false;
@@ -208,24 +208,24 @@ void CGraphicTextInstance::Update()
if (isEnglish)
{
// <<심볼의 경우 (ex. 기호, 공백)>> -> 영어 모드 유지.
// <<(심볼이 아닌 것들 : 숫자, 영어, 아랍어)>>
// (1) 맨 앞의 심볼 or
// <<심볼의 경우 (ex. 기호, 공백)>> -> 영어 모드 유지.
// <<(심볼이 아닌 것들 : 숫자, 영어, 아랍어)>>
// (1) 맨 앞의 심볼 or
// (2)
// 1) 앞 글자가 아랍어 아님 &&
// 2) 뒷 글자가 아랍어 아님 &&
// 3) 뒷 글자가 심볼'|'이 아님 &&
// 1) 앞 글자가 아랍어 아님 &&
// 2) 뒷 글자가 아랍어 아님 &&
// 3) 뒷 글자가 심볼'|'이 아님 &&
// or
// (3) 현재 심볼이 '|'
// <<아랍어 모드로 넘어가는 경우 : 심볼에서.>>
// 1) 앞글자 아랍어
// 2) 뒷글자 아랍어
// (3) 현재 심볼이 '|'
// <<아랍어 모드로 넘어가는 경우 : 심볼에서.>>
// 1) 앞글자 아랍어
// 2) 뒷글자 아랍어
//
//
if (Arabic_IsInSymbol(wArabicChar) && (
(i == 0) ||
(i > 0 &&
!(Arabic_HasPresentation(wArabicText, i - 1) || Arabic_IsInPresentation(wArabicText[i + 1])) && //앞글자, 뒷글자가 아랍어 아님.
!(Arabic_HasPresentation(wArabicText, i - 1) || Arabic_IsInPresentation(wArabicText[i + 1])) && //앞글자, 뒷글자가 아랍어 아님.
wArabicText[i+1] != '|'
) ||
wArabicText[i] == '|'
@@ -234,10 +234,10 @@ void CGraphicTextInstance::Update()
// pass
int temptest = 1;
}
// (1)아랍어이거나 (2)아랍어 다음의 심볼이라면 아랍어 모드 전환
// (1)아랍어이거나 (2)아랍어 다음의 심볼이라면 아랍어 모드 전환
else if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar))
{
//그 전까지의 영어를 그린다.
//그 전까지의 영어를 그린다.
for (int e = i + 1; e <= nEnglishBase;) {
int ret = GetTextTag(&wArabicText[e], wArabicTextLen - e, len, hyperlinkBuffer);
@@ -251,7 +251,7 @@ void CGraphicTextInstance::Update()
kHyperlink.ex += charWidth;
//x += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정.
//기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++)
{
if(m_hyperlinkVector.size() < j)
@@ -279,7 +279,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1)
{
++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
}
else
{
@@ -299,7 +299,7 @@ void CGraphicTextInstance::Update()
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor);
kHyperlink.ex += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정.
//기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++)
{
if(m_hyperlinkVector.size() < j)
@@ -313,16 +313,16 @@ void CGraphicTextInstance::Update()
isEnglish = false;
}
}
else //[[[아랍어 모드]]]
else //[[[아랍어 모드]]]
{
// 아랍어이거나 아랍어 출력중 나오는 심볼이라면
// 아랍어이거나 아랍어 출력중 나오는 심볼이라면
if (Arabic_IsInPresentation(wArabicChar) || Arabic_IsInSymbol(wArabicChar))
{
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, Arabic_ConvSymbol(wArabicText[i]), dwColor);
kHyperlink.ex += charWidth;
x += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정.
//기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++)
{
if(m_hyperlinkVector.size() < j)
@@ -333,7 +333,7 @@ void CGraphicTextInstance::Update()
tempLink.sx += charWidth;
}
}
else //영어이거나, 영어 다음에 나오는 심볼이라면,
else //영어이거나, 영어 다음에 나오는 심볼이라면,
{
nEnglishBase = i;
isEnglish = true;
@@ -355,7 +355,7 @@ void CGraphicTextInstance::Update()
int charWidth = __DrawCharacter(pFontTexture, dataCodePage, wArabicText[e], dwColor);
kHyperlink.ex += charWidth;
//기존 추가한 하이퍼링크의 좌표 수정.
//기존 추가한 하이퍼링크의 좌표 수정.
for (int j = 1; j <= no_hyperlink; j++)
{
if(m_hyperlinkVector.size() < j)
@@ -383,7 +383,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1)
{
++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
kHyperlink.ex = kHyperlink.sx = 0; // 실제 텍스트가 시작되는 위치
}
else
{
@@ -401,7 +401,7 @@ void CGraphicTextInstance::Update()
}
}
else // 아랍외 다른 지역.
else // 아랍외 다른 지역.
{
int x = 0;
int len;
@@ -440,7 +440,7 @@ void CGraphicTextInstance::Update()
if (hyperlinkStep == 1)
{
++hyperlinkStep;
kHyperlink.ex = kHyperlink.sx = x; // 실제 텍스트가 시작되는 위치
kHyperlink.ex = kHyperlink.sx = x; // 실제 텍스트가 시작되는 위치
}
else
{
@@ -460,7 +460,7 @@ void CGraphicTextInstance::Update()
if (token < end)
{
int newCodePage = ReadToken(token);
dataCodePage = newCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
dataCodePage = newCodePage; // 아랍 및 베트남 내부 데이터를 UTF8 을 사용하려 했으나 실패
begin = token + 5;
}
else
@@ -570,7 +570,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
CGraphicFontTexture::TCharacterInfomation* pCurCharInfo;
// 테두리
// 테두리
if (m_isOutline)
{
fCurX=fStanX;
@@ -586,7 +586,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
fFontHeight=float(pCurCharInfo->height);
fFontAdvance=float(pCurCharInfo->advance);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth)
{
if (m_isMultiLine)
@@ -636,7 +636,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
akVertex[2].y=fFontSy-feather;
akVertex[3].y=fFontEy+feather;
// 왼
// 왼
akVertex[0].x=fFontSx-fFontHalfWeight-feather;
akVertex[1].x=fFontSx-fFontHalfWeight-feather;
akVertex[2].x=fFontEx-fFontHalfWeight+feather;
@@ -646,7 +646,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
// 오른
// 오른
akVertex[0].x=fFontSx+fFontHalfWeight-feather;
akVertex[1].x=fFontSx+fFontHalfWeight-feather;
akVertex[2].x=fFontEx+fFontHalfWeight+feather;
@@ -660,7 +660,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
akVertex[2].x=fFontEx+feather;
akVertex[3].x=fFontEx+feather;
// 위
// 위
akVertex[0].y=fFontSy-fFontHalfWeight-feather;
akVertex[1].y=fFontEy-fFontHalfWeight+feather;
akVertex[2].y=fFontSy-fFontHalfWeight-feather;
@@ -670,7 +670,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
if (CGraphicBase::SetPDTStream((SPDTVertex*)akVertex, 4))
STATEMANAGER.DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
// 아래
// 아래
akVertex[0].y=fFontSy+fFontHalfWeight-feather;
akVertex[1].y=fFontEy+fFontHalfWeight+feather;
akVertex[2].y=fFontSy+fFontHalfWeight-feather;
@@ -684,7 +684,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
}
}
// 메인 폰트
// 메인 폰트
fCurX=fStanX;
fCurY=fStanY;
fFontMaxHeight=0.0f;
@@ -698,7 +698,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
fFontMaxHeight=std::max(fFontHeight, (float)pCurCharInfo->height);
fFontAdvance=float(pCurCharInfo->advance);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if ((fCurX+fFontWidth)-m_v3Position.x > m_fLimitWidth)
{
if (m_isMultiLine)
@@ -811,9 +811,9 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
sy -= float(m_textHeight) / 2.0f;
break;
}
// 최적화 사항
// 같은텍스쳐를 사용한다면... STRIP을 구성하고, 텍스쳐가 변경되거나 끝나면 DrawPrimitive를 호출해
// 최대한 숫자를 줄이도록하자!
// 최적화 사항
// 같은텍스쳐를 사용한다면... STRIP을 구성하고, 텍스쳐가 변경되거나 끝나면 DrawPrimitive를 호출해
// 최대한 숫자를 줄이도록하자!
TPDTVertex vertices[4];
vertices[0].diffuse = diffuse;
@@ -865,13 +865,13 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
STATEMANAGER.SetRenderState(D3DRS_FOGENABLE, dwFogEnable);
STATEMANAGER.SetRenderState(D3DRS_LIGHTING, dwLighting);
//금강경 링크 띄워주는 부분.
//금강경 링크 띄워주는 부분.
if (m_hyperlinkVector.size() != 0)
{
int lx = gs_mx - m_v3Position.x;
int ly = gs_my - m_v3Position.y;
//아랍은 좌표 부호를 바꿔준다.
//아랍은 좌표 부호를 바꿔준다.
if (GetDefaultCodePage() == CP_ARABIC) {
lx = -lx;
ly = -ly + m_textHeight;
@@ -1063,7 +1063,7 @@ WORD CGraphicTextInstance::GetTextLineCount()
float fFontAdvance=float(pCurCharInfo->advance);
//float fFontHeight=float(pCurCharInfo->height);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]
if (fx+fFontWidth > m_fLimitWidth)
{
fx = 0.0f;
@@ -1110,7 +1110,7 @@ void CGraphicTextInstance::__Initialize()
m_vAlign = VERTICAL_ALIGN_TOP;
m_iMax = 0;
m_fLimitWidth = 1600.0f; // NOTE : 해상도의 최대치. 이보다 길게 쓸 일이 있을까? - [levites]
m_fLimitWidth = 1600.0f; // NOTE : 해상도의 최대치. 이보다 길게 쓸 일이 있을까? - [levites]
m_isCursor = false;
m_isSecret = false;