Compare commits
1 Commits
rtw1x1-pat
...
revert-64-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7aa65128e |
@@ -222,9 +222,7 @@ void CPythonMiniMap::Update(float fCenterX, float fCenterY)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculate dynamic radius based on actual minimap window size
|
const float c_fMiniMapWindowRadius = 55.0f;
|
||||||
// Subtract border width (approx 9 pixels) to keep markers inside visible area
|
|
||||||
const float c_fMiniMapWindowRadius = (m_fWidth < m_fHeight ? m_fWidth : m_fHeight) / 2.0f - 9.0f;
|
|
||||||
|
|
||||||
float fDistanceFromCenterX = (rAtlasMarkInfo.m_fX - m_fCenterX) * fooCellScale * m_fScale;
|
float fDistanceFromCenterX = (rAtlasMarkInfo.m_fX - m_fCenterX) * fooCellScale * m_fScale;
|
||||||
float fDistanceFromCenterY = (rAtlasMarkInfo.m_fY - m_fCenterY) * fooCellScale * m_fScale;
|
float fDistanceFromCenterY = (rAtlasMarkInfo.m_fY - m_fCenterY) * fooCellScale * m_fScale;
|
||||||
@@ -232,11 +230,12 @@ void CPythonMiniMap::Update(float fCenterX, float fCenterY)
|
|||||||
|
|
||||||
if (fDistanceFromCenter >= c_fMiniMapWindowRadius)
|
if (fDistanceFromCenter >= c_fMiniMapWindowRadius)
|
||||||
{
|
{
|
||||||
float fRadian = atan2f(fDistanceFromCenterY, fDistanceFromCenterX);
|
float fRadianX = acosf(fDistanceFromCenterX / fDistanceFromCenter);
|
||||||
fDistanceFromCenterX = c_fMiniMapWindowRadius * cosf(fRadian);
|
float fRadianY = asinf(fDistanceFromCenterY / fDistanceFromCenter);
|
||||||
fDistanceFromCenterY = c_fMiniMapWindowRadius * sinf(fRadian);
|
fDistanceFromCenterX = 55.0f * cosf(fRadianX);
|
||||||
rAtlasMarkInfo.m_fMiniMapX = ( m_fWidth - (float)m_WhiteMark.GetWidth() ) / 2.0f + fDistanceFromCenterX + m_fScreenX;
|
fDistanceFromCenterY = 55.0f * sinf(fRadianY);
|
||||||
rAtlasMarkInfo.m_fMiniMapY = ( m_fHeight - (float)m_WhiteMark.GetHeight() ) / 2.0f + fDistanceFromCenterY + m_fScreenY;
|
rAtlasMarkInfo.m_fMiniMapX = ( m_fWidth - (float)m_WhiteMark.GetWidth() ) / 2.0f + fDistanceFromCenterX + m_fScreenX + 2.0f;
|
||||||
|
rAtlasMarkInfo.m_fMiniMapY = ( m_fHeight - (float)m_WhiteMark.GetHeight() ) / 2.0f + fDistanceFromCenterY + m_fScreenY + 2.0f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -466,10 +465,7 @@ void CPythonMiniMap::Render(float fScreenX, float fScreenY)
|
|||||||
if (rAtlasMarkInfo.m_fMiniMapY <= 0.0f)
|
if (rAtlasMarkInfo.m_fMiniMapY <= 0.0f)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
__RenderTargetMark(
|
__RenderTargetMark(rAtlasMarkInfo.m_fMiniMapX, rAtlasMarkInfo.m_fMiniMapY);
|
||||||
rAtlasMarkInfo.m_fMiniMapX + m_WhiteMark.GetWidth() / 2,
|
|
||||||
rAtlasMarkInfo.m_fMiniMapY + m_WhiteMark.GetHeight() / 2
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,10 +665,7 @@ bool CPythonMiniMap::Create()
|
|||||||
|
|
||||||
void CPythonMiniMap::__SetPosition()
|
void CPythonMiniMap::__SetPosition()
|
||||||
{
|
{
|
||||||
// Calculate dynamic radius - use smaller dimension to ensure circular clipping
|
m_fMiniMapRadius = fMIN(6400.0f / ((float) CTerrainImpl::CELLSCALE) * m_fScale, 64.0f);
|
||||||
// Subtract border width (approx 9 pixels) to keep markers inside visible area
|
|
||||||
float fWindowRadius = (m_fWidth < m_fHeight ? m_fWidth : m_fHeight) / 2.0f - 9.0f;
|
|
||||||
m_fMiniMapRadius = fMIN(6400.0f / ((float) CTerrainImpl::CELLSCALE) * m_fScale, fWindowRadius);
|
|
||||||
|
|
||||||
m_matWorld._11 = m_fWidth * m_fScale;
|
m_matWorld._11 = m_fWidth * m_fScale;
|
||||||
m_matWorld._22 = m_fHeight * m_fScale;
|
m_matWorld._22 = m_fHeight * m_fScale;
|
||||||
@@ -1029,19 +1022,11 @@ void CPythonMiniMap::RenderAtlas(float fScreenX, float fScreenY)
|
|||||||
|
|
||||||
if (TYPE_TARGET == rAtlasMarkInfo.m_byType)
|
if (TYPE_TARGET == rAtlasMarkInfo.m_byType)
|
||||||
{
|
{
|
||||||
// Convert from WhiteMark-centered to actual center for rendering
|
__RenderMiniWayPointMark(rAtlasMarkInfo.m_fScreenX, rAtlasMarkInfo.m_fScreenY);
|
||||||
__RenderMiniWayPointMark(
|
|
||||||
rAtlasMarkInfo.m_fScreenX + m_WhiteMark.GetWidth() / 2,
|
|
||||||
rAtlasMarkInfo.m_fScreenY + m_WhiteMark.GetHeight() / 2
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Convert from WhiteMark-centered to actual center for rendering
|
__RenderWayPointMark(rAtlasMarkInfo.m_fScreenX, rAtlasMarkInfo.m_fScreenY);
|
||||||
__RenderWayPointMark(
|
|
||||||
rAtlasMarkInfo.m_fScreenX + m_WhiteMark.GetWidth() / 2,
|
|
||||||
rAtlasMarkInfo.m_fScreenY + m_WhiteMark.GetHeight() / 2
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user