apply a bug fix patch from travisellett which fixed a minimap / radar issue.

Closes ticket:333

Thanks for the patch!

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7477 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2009-05-21 19:23:05 +00:00 committed by Git SVN Gateway
parent 9a3f1046be
commit 9b5225af4d
1 changed files with 13 additions and 10 deletions

View File

@ -196,8 +196,8 @@ void CalcRadarPosition(int mX, int mY, int *PosX, int *PosY)
{ {
pos = Vector2f_Rotate2f(pos, -player.r.y/DEG(1)); pos = Vector2f_Rotate2f(pos, -player.r.y/DEG(1));
} }
pos.x += radarWidth/2; pos.x += radarWidth/2.0;
pos.y += radarHeight/2; pos.y += radarHeight/2.0;
if (pos.x<0 || pos.y<0 || pos.x>=radarWidth || pos.y>=radarHeight) if (pos.x<0 || pos.y<0 || pos.x>=radarWidth || pos.y>=radarHeight)
{ {
@ -269,16 +269,19 @@ void drawRadar(void)
iV_MatrixRotateZ(player.r.y); iV_MatrixRotateZ(player.r.y);
} }
// draw the box at the dimensions of the map // draw the box at the dimensions of the map
iV_TransBoxFill(-radarWidth/2, iV_TransBoxFill(-radarWidth/2.0,
-radarHeight/2, -radarHeight/2.0,
radarWidth/2, radarWidth/2.0,
radarHeight/2); radarHeight/2.0);
pie_RenderRadar(-radarWidth/2, pie_RenderRadar(-radarWidth/2.0,
-radarHeight/2, -radarHeight/2.0,
radarWidth, radarWidth,
radarHeight); radarHeight);
DrawRadarExtras(-radarWidth/2, -radarHeight/2, pixSizeH, pixSizeV); pie_MatBegin();
drawRadarBlips(-radarWidth/2, -radarHeight/2, pixSizeH, pixSizeV); pie_TRANSLATE(-radarWidth/2 - 1, -radarHeight/2 - 1, 0);
DrawRadarExtras(0, 0, pixSizeH, pixSizeV);
pie_MatEnd();
drawRadarBlips(-radarWidth/2.0, -radarHeight/2.0, pixSizeH, pixSizeV);
pie_MatEnd(); pie_MatEnd();
} }