client almost builds

This commit is contained in:
d1str4ught
2025-08-19 00:20:40 +02:00
parent 4be475f111
commit be56f3f31a
1090 changed files with 126610 additions and 14032 deletions

View File

@@ -113,10 +113,10 @@ void CBlockTexture::InvalidateRect(const RECT & c_rsrcRect)
// DIBBAR_LONGSIZE_BUGFIX
const RECT clipRect = {
max(c_rsrcRect.left - dstRect.left, 0),
max(c_rsrcRect.top - dstRect.top, 0),
min(c_rsrcRect.right - dstRect.left, dstRect.right - dstRect.left),
min(c_rsrcRect.bottom - dstRect.top, dstRect.bottom - dstRect.top),
std::max(c_rsrcRect.left - dstRect.left, 0l),
std::max(c_rsrcRect.top - dstRect.top, 0l),
std::min(c_rsrcRect.right - dstRect.left, dstRect.right - dstRect.left),
std::min(c_rsrcRect.bottom - dstRect.top, dstRect.bottom - dstRect.top),
};
// END_OF_DIBBAR_LONGSIZE_BUGFIX

View File

@@ -2,7 +2,9 @@
add_library(EterLib STATIC ${FILE_SOURCES})
# target_link_libraries(EterLib
# )
target_link_libraries(EterLib
lzo2
cryptopp-static
)
GroupSourcesByFolder(EterLib)

View File

@@ -618,7 +618,7 @@ BOOL D3D_CDisplayModeAutoDetector::Build(IDirect3D8& rkD3D, PFNCONFIRMDEVICE pfn
m_uD3DAdapterInfoCount=0;
UINT uTotalAdapterCount=rkD3D.GetAdapterCount();
uTotalAdapterCount=min(uTotalAdapterCount, D3DADAPTERINFO_NUM);
uTotalAdapterCount=std::min(uTotalAdapterCount, (UINT)D3DADAPTERINFO_NUM);
for (UINT iD3DAdapterInfo=0; iD3DAdapterInfo<uTotalAdapterCount; ++iD3DAdapterInfo)
{

View File

@@ -127,7 +127,7 @@ void CLightManager::FlushLight()
// NOTE - 거리로 정렬된 라이트를 Limit 갯수 만큼 제한해서 켜준다.
STATEMANAGER.SaveRenderState(D3DRS_LIGHTING, TRUE);
for (DWORD k = 0; k < min(m_dwLimitLightCount, m_LightSortVector.size()); ++k)
for (DWORD k = 0; k < std::min((size_t)m_dwLimitLightCount, m_LightSortVector.size()); ++k)
{
m_LightSortVector[k]->Update();
m_LightSortVector[k]->SetDeviceLight(TRUE);
@@ -139,7 +139,7 @@ void CLightManager::RestoreLight()
{
STATEMANAGER.RestoreRenderState(D3DRS_LIGHTING);
for (DWORD k = 0; k < min(m_dwLimitLightCount, m_LightSortVector.size()); ++k)
for (DWORD k = 0; k < std::min((size_t)m_dwLimitLightCount, m_LightSortVector.size()); ++k)
m_LightSortVector[k]->SetDeviceLight(FALSE);
}

View File

@@ -45,7 +45,7 @@ int CGraphicTextInstance::__DrawCharacter(CGraphicFontTexture * pFontTexture, WO
m_pCharInfoVector.push_back(pInsCharInfo);
m_textWidth += pInsCharInfo->advance;
m_textHeight = max(pInsCharInfo->height, m_textHeight);
m_textHeight = std::max((WORD)pInsCharInfo->height, m_textHeight);
return pInsCharInfo->advance;
}
@@ -54,7 +54,7 @@ int CGraphicTextInstance::__DrawCharacter(CGraphicFontTexture * pFontTexture, WO
void CGraphicTextInstance::__GetTextPos(DWORD index, float* x, float* y)
{
index = min(index, m_pCharInfoVector.size());
index = std::min((size_t)index, m_pCharInfoVector.size());
float sx = 0;
float sy = 0;
@@ -69,7 +69,7 @@ void CGraphicTextInstance::__GetTextPos(DWORD index, float* x, float* y)
}
sx += float(m_pCharInfoVector[i]->advance);
fFontMaxHeight = max(float(m_pCharInfoVector[i]->height), fFontMaxHeight);
fFontMaxHeight = std::max(float(m_pCharInfoVector[i]->height), fFontMaxHeight);
}
*x = sx;
@@ -695,7 +695,7 @@ void CGraphicTextInstance::Render(RECT * pClipRect)
fFontWidth=float(pCurCharInfo->width);
fFontHeight=float(pCurCharInfo->height);
fFontMaxHeight=max(fFontHeight, pCurCharInfo->height);
fFontMaxHeight=std::max(fFontHeight, (float)pCurCharInfo->height);
fFontAdvance=float(pCurCharInfo->advance);
// NOTE : 폰트 출력에 Width 제한을 둡니다. - [levites]

View File

@@ -471,7 +471,7 @@ void CIME::SetText(const char* szText, int len)
if (iter < end)
ms_lastpos += MultiByteToWideChar(ReadToken(iter), 0, (iter+5), end-(iter+5), m_wText+ms_lastpos, m_wTextLen-ms_lastpos);
ms_curpos = min(ms_curpos, ms_lastpos);
ms_curpos = std::min(ms_curpos, ms_lastpos);
}
int CIME::GetText(std::string & rstrText, bool addCodePage)
@@ -782,7 +782,7 @@ void CIME::IncCurPos()
int pos = FindColorTagEndPosition(m_wText + ms_curpos, ms_lastpos - ms_curpos);
if (pos > 0)
ms_curpos = min(ms_lastpos, max(0, ms_curpos + (pos + 1)));
ms_curpos = std::min(ms_lastpos, std::max(0, ms_curpos + (pos + 1)));
else
++ms_curpos;
//++ms_curpos;
@@ -796,7 +796,7 @@ void CIME::DecCurPos()
int pos = FindColorTagStartPosition(m_wText + ms_curpos - 1, ms_curpos);
if (pos > 0)
ms_curpos = min(ms_lastpos, max(0, ms_curpos - (pos + 1)));
ms_curpos = std::min(ms_lastpos, std::max(0, ms_curpos - (pos + 1)));
else
--ms_curpos;
//--ms_curpos;
@@ -821,7 +821,7 @@ void CIME::SetCurPos(int offset)
{
// offset은 보여지는 텍스트의 위치로 온다. 따라서 새로 계산해야함.
//ms_curpos = min(ms_lastpos, offset);
ms_curpos = min(ms_lastpos, GetTextTagInternalPosFromRenderPos(m_wText, ms_lastpos, offset));
ms_curpos = std::min(ms_lastpos, GetTextTagInternalPosFromRenderPos(m_wText, ms_lastpos, offset));
}
}
@@ -832,7 +832,7 @@ void CIME::DelCurPos()
int eraseCount = FindColorTagEndPosition(m_wText + ms_curpos, ms_lastpos - ms_curpos) + 1;
wcscpy(m_wText + ms_curpos, m_wText + ms_curpos + eraseCount);
ms_lastpos -= eraseCount;
ms_curpos = min(ms_lastpos, ms_curpos);
ms_curpos = std::min(ms_lastpos, ms_curpos);
}
}
@@ -1169,7 +1169,7 @@ void CIME::ReadingProcess(HIMC hImc)
if(!p) break;
tempLen = *(DWORD *)(p + 7*4 + 16*2*4);
dwErr = *(DWORD *)(p + 8*4 + 16*2*4);
dwErr = min(dwErr, tempLen);
dwErr = std::min(dwErr, tempLen);
temp = (wchar_t *)(p + 6*4 + 16*2*1);
bUnicodeIme = true;
}
@@ -1926,12 +1926,12 @@ void CTsfUiLessMode::MakeCandidateStrings(ITfCandidateListUIElement* pcandidate)
pcandidate->GetPageIndex(IndexList, uPageCnt, &uPageCnt);
dwPageStart = IndexList[uCurrentPage];
dwPageSize = (uCurrentPage < uPageCnt-1) ?
min(uCount, IndexList[uCurrentPage+1]) - dwPageStart:
std::min(uCount, IndexList[uCurrentPage+1]) - dwPageStart:
uCount - dwPageStart;
}
}
CIME::ms_dwCandidatePageSize = min(dwPageSize, CIME::MAX_CANDLIST);
CIME::ms_dwCandidatePageSize = std::min(dwPageSize, (DWORD)CIME::MAX_CANDLIST);
CIME::ms_dwCandidateSelection = CIME::ms_dwCandidateSelection - dwPageStart;
memset(&CIME::ms_wszCandidate, 0, sizeof(CIME::ms_wszCandidate));

View File

@@ -246,7 +246,7 @@ class CPooledObject
{
}
void * operator new(unsigned int /*mem_size*/)
void * operator new(size_t /*mem_size*/)
{
return ms_kPool.Alloc();
}