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

@@ -146,7 +146,7 @@ void CPythonChat::UpdateEditMode(DWORD dwID)
if (!pChatSet)
return;
const int c_iAlphaLine = max(0, GetVisibleLineCount(dwID) - GetEditableLineCount(dwID) + 2);
const int c_iAlphaLine = std::max(0, GetVisibleLineCount(dwID) - GetEditableLineCount(dwID) + 2);
int iLineIndex = 0;
float fAlpha = 0.0f;
@@ -322,8 +322,8 @@ void CPythonChat::SetEndPos(DWORD dwID, float fPos)
if (!pChatSet)
return;
fPos = max(0.0f, fPos);
fPos = min(1.0f, fPos);
fPos = std::max(0.0f, fPos);
fPos = std::min(1.0f, fPos);
if (pChatSet->m_fEndPos != fPos)
{
pChatSet->m_fEndPos = fPos;
@@ -414,13 +414,13 @@ void CPythonChat::ArrangeShowingChat(DWORD dwID)
}
int icurLineCount = TempChatLineDeque.size();
int iVisibleLineCount = min(icurLineCount, (pChatSet->m_iHeight + pChatSet->m_iStep) / pChatSet->m_iStep);
int iVisibleLineCount = std::min(icurLineCount, (pChatSet->m_iHeight + pChatSet->m_iStep) / pChatSet->m_iStep);
int iEndLine = iVisibleLineCount + int(float(icurLineCount - iVisibleLineCount - 1) * pChatSet->m_fEndPos);
/////
int iHeight = 12;
for (int i = min(icurLineCount-1, iEndLine); i >= 0; --i)
for (int i = std::min(icurLineCount-1, iEndLine); i >= 0; --i)
{
if (!pChatSet->CheckMode(TempChatLineDeque[i]->iType))
continue;