More partial patch #969: Rewritten minimap code merging
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4768 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
9de00487a8
commit
81bf897f61
|
@ -3113,15 +3113,13 @@ void intDisplayTransportButton(WIDGET *psWidget, UDWORD xOffset,
|
|||
}
|
||||
|
||||
|
||||
/*draws blips on radar to represent Proximity Display and damaged structures*/
|
||||
/* Draws blips on radar to represent Proximity Display and damaged structures */
|
||||
void drawRadarBlips(float pixSizeH, float pixSizeV, int RadarOffsetX, int RadarOffsetY)
|
||||
{
|
||||
PROXIMITY_DISPLAY *psProxDisp;
|
||||
UWORD imageID;
|
||||
UDWORD delay = 150;
|
||||
UDWORD i;
|
||||
UDWORD VisWidth = RADWIDTH;
|
||||
UDWORD VisHeight = RADHEIGHT;
|
||||
|
||||
// Check if it's time to remove beacons
|
||||
for (i = 0; i < MAX_PLAYERS; i++)
|
||||
|
@ -3153,13 +3151,7 @@ void drawRadarBlips(float pixSizeH, float pixSizeV, int RadarOffsetX, int RadarO
|
|||
/* Go through all the proximity Displays */
|
||||
for (psProxDisp = apsProxDisp[selectedPlayer]; psProxDisp != NULL; psProxDisp = psProxDisp->psNext)
|
||||
{
|
||||
PROX_TYPE proxType;
|
||||
|
||||
// Check it is within the radar coords
|
||||
if (psProxDisp->radarX <= 0 || psProxDisp->radarX >= VisWidth || psProxDisp->radarY <= 0 || psProxDisp->radarY >= VisHeight)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
PROX_TYPE proxType;
|
||||
|
||||
if (psProxDisp->type == POS_PROXDATA)
|
||||
{
|
||||
|
|
10
src/radar.c
10
src/radar.c
|
@ -62,10 +62,8 @@ BOOL bEnemyAllyRadarColor = false; //enemy/ally radar color
|
|||
//current mini-map mode
|
||||
RADAR_DRAW_MODE radarDrawMode = RADAR_MODE_DEFAULT;
|
||||
|
||||
// colours for each clan on the radar map.
|
||||
|
||||
static PIELIGHT tileColours[MAX_TILES];
|
||||
static UDWORD *radarBuffer;
|
||||
static UDWORD *radarBuffer = NULL;
|
||||
|
||||
PIELIGHT clanColours[MAX_PLAYERS]=
|
||||
{ // see frontend2.png for team color order.
|
||||
|
@ -153,6 +151,8 @@ BOOL InitRadar(void)
|
|||
|
||||
BOOL ShutdownRadar(void)
|
||||
{
|
||||
ASSERT(radarBuffer != NULL, "Radar not yet initialized!");
|
||||
|
||||
pie_ShutdownRadar();
|
||||
|
||||
free(radarBuffer);
|
||||
|
@ -216,8 +216,8 @@ void CalcRadarPosition(UDWORD mX,UDWORD mY,UDWORD *PosX,UDWORD *PosY)
|
|||
{
|
||||
sPosY = scrollMaxY;
|
||||
}
|
||||
*PosX = (UDWORD)sPosX;
|
||||
*PosY = (UDWORD)sPosY;
|
||||
*PosX = sPosX;
|
||||
*PosY = sPosY;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue