mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47: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:
@@ -608,7 +608,6 @@ void RenderRadarScreen( )
|
|||||||
sXSoldRadar += RADAR_WINDOW_TM_X;
|
sXSoldRadar += RADAR_WINDOW_TM_X;
|
||||||
sYSoldRadar += gsRadarY;
|
sYSoldRadar += gsRadarY;
|
||||||
|
|
||||||
|
|
||||||
if(gbPixelDepth==16)
|
if(gbPixelDepth==16)
|
||||||
{
|
{
|
||||||
// DB Need to add a radar color for 8-bit
|
// DB Need to add a radar color for 8-bit
|
||||||
@@ -647,6 +646,14 @@ void RenderRadarScreen( )
|
|||||||
usLineColor = Get16BPPColor( FROMRGB( 0, 0, 255 ) );
|
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
|
// 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 )
|
if ( pSoldier->usSoldierFlagMask & SOLDIER_ASSASSIN && pSoldier->usSoldierFlagMask & SOLDIER_COVERT_SOLDIER )
|
||||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ MILITIA_TEAM ].RadarColor );
|
usLineColor = Get16BPPColor( gTacticalStatus.Team[ MILITIA_TEAM ].RadarColor );
|
||||||
@@ -675,8 +682,8 @@ void RenderRadarScreen( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UnLockVideoSurface( FRAME_BUFFER );
|
|
||||||
|
|
||||||
|
UnLockVideoSurface( FRAME_BUFFER );
|
||||||
|
|
||||||
if( ( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) && ( fShowMapInventoryPool == TRUE ) )
|
if( ( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) && ( fShowMapInventoryPool == TRUE ) )
|
||||||
{
|
{
|
||||||
@@ -685,13 +692,8 @@ void RenderRadarScreen( )
|
|||||||
gsRadarX + RADAR_WINDOW_WIDTH,
|
gsRadarX + RADAR_WINDOW_WIDTH,
|
||||||
gsRadarY + RADAR_WINDOW_HEIGHT );
|
gsRadarY + RADAR_WINDOW_HEIGHT );
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AdjustWorldCenterFromRadarCoords( INT16 sRadarX, INT16 sRadarY )
|
void AdjustWorldCenterFromRadarCoords( INT16 sRadarX, INT16 sRadarY )
|
||||||
{
|
{
|
||||||
INT16 sScreenX, sScreenY;
|
INT16 sScreenX, sScreenY;
|
||||||
|
|||||||
@@ -1532,20 +1532,21 @@ void RenderOverheadOverlays()
|
|||||||
sY += iOffsetVertical;
|
sY += iOffsetVertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
if( gfEditMode && gpSelected && gpSelected->pSoldier == pSoldier )
|
if( gfEditMode && gpSelected && gpSelected->pSoldier == pSoldier )
|
||||||
{ //editor: show the selected edited merc as the yellow one.
|
{ //editor: show the selected edited merc as the yellow one.
|
||||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 0 );
|
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, 0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if( !gfTacticalPlacementGUIActive )
|
if( !gfTacticalPlacementGUIActive )
|
||||||
{ //normal
|
{
|
||||||
|
//normal
|
||||||
if(is_networked)
|
if(is_networked)
|
||||||
{
|
{
|
||||||
if(pSoldier->bTeam != OUR_TEAM)
|
if(pSoldier->bTeam != OUR_TEAM)
|
||||||
{
|
{
|
||||||
if(pSoldier->bSide==1)
|
if ( pSoldier->bSide == 1 || pSoldier->bSide == 3 )
|
||||||
{
|
{
|
||||||
// Civ (white)
|
// Civ (white)
|
||||||
if (pSoldier->bTeam == CIV_TEAM)
|
if (pSoldier->bTeam == CIV_TEAM)
|
||||||
@@ -1579,8 +1580,17 @@ void RenderOverheadOverlays()
|
|||||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, MILITIA_TEAM );
|
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 )
|
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 );
|
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
|
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));
|
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));
|
RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, (INT16)(sX-2), (INT16)(sY-2), (INT16)(sX + 5), (INT16)(sY + 11));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //normal
|
{
|
||||||
|
//normal
|
||||||
if(is_networked)
|
if(is_networked)
|
||||||
{
|
{
|
||||||
if(pSoldier->bTeam!=0)
|
if(pSoldier->bTeam!=0)
|
||||||
{
|
{
|
||||||
if(pSoldier->bSide==1)
|
if ( pSoldier->bSide == 1 || pSoldier->bSide == 3 )
|
||||||
continue;//dont render enemy
|
continue;//dont render enemy
|
||||||
|
|
||||||
// Green
|
// Green
|
||||||
@@ -1622,11 +1633,16 @@ void RenderOverheadOverlays()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
// Color depends on the bTeam
|
// Color depends on the bTeam
|
||||||
Blt8BPPDataTo16BPPBufferTransparent((UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
Blt8BPPDataTo16BPPBufferTransparent( (UINT16*)pDestBuf, uiDestPitchBYTES, hVObject, sX, sY, pSoldier->bTeam );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
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));
|
RegisterBackgroundRect(BGND_FLAG_SINGLE, NULL, sX, sY, (INT16)(sX + 3), (INT16)(sY + 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user