Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectTypes/CMiniMap.cpp
Show First 20 Lines • Show All 372 Lines • ▼ Show 20 Lines | void CMiniMap::DrawFlareFrame(CCanvas2D& canvas, const u32 frameIndex, | ||||
finalColor.a *= alpha; | finalColor.a *= alpha; | ||||
canvas.DrawTexture(texture, destination, | canvas.DrawTexture(texture, destination, | ||||
CRect(0, 0, texture->GetWidth(), texture->GetHeight()), finalColor, | CRect(0, 0, texture->GetWidth(), texture->GetHeight()), finalColor, | ||||
CColor(0.0f, 0.0f, 0.0f, 0.0f), 0.0f); | CColor(0.0f, 0.0f, 0.0f, 0.0f), 0.0f); | ||||
} | } | ||||
void CMiniMap::Draw(CCanvas2D& canvas) | void CMiniMap::Draw(CCanvas2D& canvas) | ||||
{ | { | ||||
PROFILE3("render minimap"); | OGL_SCOPED_DEBUG_GROUP("Draw MiniMap"); | ||||
PROFILE3("Draw MiniMap"); | |||||
// The terrain isn't actually initialized until the map is loaded, which | // The terrain isn't actually initialized until the map is loaded, which | ||||
// happens when the game is started, so abort until then. | // happens when the game is started, so abort until then. | ||||
if (!g_Game || !g_Game->IsGameStarted()) | if (!g_Game || !g_Game->IsGameStarted()) | ||||
return; | return; | ||||
if (!m_Mask) | if (!m_Mask) | ||||
canvas.DrawRect(m_CachedActualSize, CColor(0.0f, 0.0f, 0.0f, 1.0f)); | canvas.DrawRect(m_CachedActualSize, CColor(0.0f, 0.0f, 0.0f, 1.0f)); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator