mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: bad radar/overhead map colours for creature team.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22776&goto=353150&#msg_353150 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8553 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -607,8 +607,7 @@ void RenderRadarScreen( )
|
||||
// Add starting relative to interface
|
||||
sXSoldRadar += RADAR_WINDOW_TM_X;
|
||||
sYSoldRadar += gsRadarY;
|
||||
|
||||
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
@@ -647,6 +646,14 @@ void RenderRadarScreen( )
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 0, 255 ) );
|
||||
}
|
||||
|
||||
// Flugente 18-04-15: observed an odd bug: if we play with a release build and see a creature for the first time, their overhead/radar map pins do not have the correct colour.
|
||||
// Bizarrely enough, the issue seems dependent on the colour value (pink, RGB: 255/0/255) itself.
|
||||
// Saving and reloading solves the issue, but I am not sure why. As a fix we now use a slightly dampened pink.
|
||||
if ( pSoldier->bTeam == CREATURE_TEAM )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 247, 0, 247 ) );
|
||||
}
|
||||
|
||||
// Flugente: if we are a (still covert) enemy assassin, colour us like militia, so that the player wont notice us
|
||||
if ( pSoldier->usSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->usSoldierFlagMask & SOLDIER_COVERT_SOLDIER )
|
||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ MILITIA_TEAM ].RadarColor );
|
||||
@@ -675,9 +682,9 @@ void RenderRadarScreen( )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UnLockVideoSurface( FRAME_BUFFER );
|
||||
|
||||
|
||||
|
||||
if( ( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) && ( fShowMapInventoryPool == TRUE ) )
|
||||
{
|
||||
// CHRISL:
|
||||
@@ -685,13 +692,8 @@ void RenderRadarScreen( )
|
||||
gsRadarX + RADAR_WINDOW_WIDTH,
|
||||
gsRadarY + RADAR_WINDOW_HEIGHT );
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void AdjustWorldCenterFromRadarCoords( INT16 sRadarX, INT16 sRadarY )
|
||||
{
|
||||
INT16 sScreenX, sScreenY;
|
||||
|
||||
+26
-10
@@ -1532,20 +1532,21 @@ void RenderOverheadOverlays()
|
||||
sY += iOffsetVertical;
|
||||
}
|
||||
|
||||
#ifdef JA2EDITOR
|
||||
#ifdef JA2EDITOR
|
||||
if( gfEditMode && gpSelected && gpSelected->pSoldier == pSoldier )
|
||||
{ //editor: show the selected edited merc as the yellow one.
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 0 );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
if( !gfTacticalPlacementGUIActive )
|
||||
{ //normal
|
||||
{
|
||||
//normal
|
||||
if(is_networked)
|
||||
{
|
||||
if(pSoldier->bTeam != OUR_TEAM)
|
||||
{
|
||||
if(pSoldier->bSide==1)
|
||||
if ( pSoldier->bSide == 1 || pSoldier->bSide == 3 )
|
||||
{
|
||||
// Civ (white)
|
||||
if (pSoldier->bTeam == CIV_TEAM)
|
||||
@@ -1579,8 +1580,17 @@ void RenderOverheadOverlays()
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, MILITIA_TEAM );
|
||||
else if ( pSoldier->bTeam == CIV_TEAM && gGameExternalOptions.fKnownNPCsUseDifferentColour && pSoldier->aiData.bNeutral && pSoldier->ubProfile != NO_PROFILE && !zHiddenNames[pSoldier->ubProfile].Hidden )
|
||||
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, PLAYER_PLAN );
|
||||
// Flugente 18-04-15: observed an odd bug: if we play with a release build and see a creature for the first time, their overhead/radar map pins do not have the correct colour.
|
||||
// Bizarrely enough, the issue seems dependent on the colour value (pink, RGB: 255/0/255) itself.
|
||||
// Saving and reloading solves the issue, but I am not sure why. As a fix we now use a slightly dampened pink.
|
||||
else if ( pSoldier->bTeam == CREATURE_TEAM )
|
||||
{
|
||||
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 12 );
|
||||
}
|
||||
else
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
{
|
||||
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
}
|
||||
|
||||
RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sX, sY, (INT16)(sX + 3), (INT16)(sY + 9));
|
||||
}
|
||||
@@ -1605,12 +1615,13 @@ void RenderOverheadOverlays()
|
||||
RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, (INT16)(sX-2), (INT16)(sY-2), (INT16)(sX + 5), (INT16)(sY + 11));
|
||||
}
|
||||
else
|
||||
{ //normal
|
||||
{
|
||||
//normal
|
||||
if(is_networked)
|
||||
{
|
||||
if(pSoldier->bTeam!=0)
|
||||
{
|
||||
if(pSoldier->bSide==1)
|
||||
if ( pSoldier->bSide == 1 || pSoldier->bSide == 3 )
|
||||
continue;//dont render enemy
|
||||
|
||||
// Green
|
||||
@@ -1621,12 +1632,17 @@ void RenderOverheadOverlays()
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, personIndex );
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// Color depends on the bTeam
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
}
|
||||
}
|
||||
else
|
||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
{
|
||||
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||
}
|
||||
|
||||
RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sX, sY, (INT16)(sX + 3), (INT16)(sY + 9));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user