From ed27392768287a1226a296103de3a7971fc8f9c7 Mon Sep 17 00:00:00 2001 From: NoMonkey Date: Wed, 26 Jan 2005 00:19:17 +0000 Subject: [PATCH] Made the minimap display the player colors and represent their positions correctly. This was SVN commit r1821. --- source/gui/MiniMap.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/gui/MiniMap.cpp b/source/gui/MiniMap.cpp index 2d6f99c174..c87e7e20dd 100755 --- a/source/gui/MiniMap.cpp +++ b/source/gui/MiniMap.cpp @@ -81,16 +81,24 @@ void CMiniMap::Draw() glDisable(GL_DEPTH_TEST); glEnable(GL_POINT_SMOOTH); glDisable(GL_TEXTURE_2D); - glPointSize(3.0f); - glColor3f(1.0f, 1.0f, 1.0f); + glPointSize(2.5f); + // REMOVED: glColor3f(1.0f, 1.0f, 1.0f); glBegin(GL_POINTS); for(; iter != units.end(); iter++) { unit = (CUnit *)(*iter); if(unit && unit->GetEntity()) { + // EDIT: John M. Mena // Set the player colour + const SPlayerColour& colour = unit->GetEntity()->GetPlayer()->GetColour(); + glColor3f(colour.r, colour.g, colour.b); + pos = GetMapSpaceCoords(unit->GetEntity()->m_position); - glVertex3f(x + pos.x, y + pos.y, GetBufferedZ()); + + // TODO: Investigate why player position must be reversed with map. + // EDIT: John M. Mena // Reversed x and y addition + // Not quite sure what the problems is here. + glVertex3f(x + pos.y, y + pos.x, GetBufferedZ()); } } glEnd();