mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Update to Master
This commit is contained in:
@@ -721,4 +721,4 @@ void SetSSA(void)
|
||||
|
||||
//guiCurrentSteadyStateSoundHandle = SoundPlay( zFileName, &spParms );
|
||||
guiCurrentSteadyStateSoundHandle = SoundPlayStreamedFile(zFileName, &spParms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,4 +51,4 @@ typedef struct
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -29,4 +29,4 @@ void GenerateBuildings( void );
|
||||
INT32 FindClosestClimbPoint( SOLDIERTYPE *pSoldier, INT32 sStartGridNo, INT32 sDesiredGridNo, BOOLEAN fClimbUp );
|
||||
BOOLEAN SameBuilding( INT32 sGridNo1, INT32 sGridNo2 );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
//Removes and smooths the adjacent tiles.
|
||||
void RemoveFogFromGridNo( INT32 uiGridNo );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -46,4 +46,4 @@ LEVELNODE *ConditionalGetCurInteractiveTileGridNoAndStructure( INT32 *psGridNo,
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+71
-94
@@ -493,30 +493,21 @@ void RenderRadarScreen( )
|
||||
|
||||
if( !( guiTacticalInterfaceFlags & INTERFACE_MAPSCREEN ) )
|
||||
{
|
||||
if(gbPixelDepth==16)
|
||||
// WANNE: Correct radar rectangle size if it is too large to fit in radar screen [2007-05-14]
|
||||
if (fAllowRadarMovementHor == FALSE)
|
||||
{
|
||||
// WANNE: Correct radar rectangle size if it is too large to fit in radar screen [2007-05-14]
|
||||
if (fAllowRadarMovementHor == FALSE)
|
||||
{
|
||||
sRadarTLX = RADAR_WINDOW_TM_X;
|
||||
sRadarBRX = RADAR_WINDOW_TM_X + RADAR_WINDOW_WIDTH;
|
||||
}
|
||||
|
||||
if (fAllowRadarMovementVer == FALSE)
|
||||
{
|
||||
sRadarTLY = RADAR_WINDOW_TM_Y;
|
||||
sRadarBRY = RADAR_WINDOW_TM_Y + RADAR_WINDOW_HEIGHT;
|
||||
}
|
||||
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
RectangleDraw( TRUE, sRadarTLX, sRadarTLY, sRadarBRX, sRadarBRY - 1, usLineColor, pDestBuf );
|
||||
sRadarTLX = RADAR_WINDOW_TM_X;
|
||||
sRadarBRX = RADAR_WINDOW_TM_X + RADAR_WINDOW_WIDTH;
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
|
||||
if (fAllowRadarMovementVer == FALSE)
|
||||
{
|
||||
// DB Need to change this to a color from the 8-but standard palette
|
||||
usLineColor = COLOR_GREEN;
|
||||
RectangleDraw8( TRUE, sRadarTLX + 1, sRadarTLY + 1, sRadarBRX + 1, sRadarBRY + 1, usLineColor, pDestBuf );
|
||||
sRadarTLY = RADAR_WINDOW_TM_Y;
|
||||
sRadarBRY = RADAR_WINDOW_TM_Y + RADAR_WINDOW_HEIGHT;
|
||||
}
|
||||
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
RectangleDraw( TRUE, sRadarTLX, sRadarTLY, sRadarBRX, sRadarBRY - 1, usLineColor, pDestBuf );
|
||||
}
|
||||
|
||||
// Cycle fFlash variable
|
||||
@@ -556,24 +547,20 @@ void RenderRadarScreen( )
|
||||
sXSoldRadar += RADAR_WINDOW_TM_X;
|
||||
sYSoldRadar += gsRadarY;
|
||||
|
||||
// if we are in 16 bit mode....kind of redundant
|
||||
if(gbPixelDepth==16)
|
||||
if( ( fFlashHighLightInventoryItemOnradarMap ) )
|
||||
{
|
||||
if( ( fFlashHighLightInventoryItemOnradarMap ) )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 255, 0 ) );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
usLineColor = Get16BPPColor( FROMRGB( 255, 255, 255 ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
usLineColor = Get16BPPColor( FROMRGB( 255, 255, 255 ) );
|
||||
}
|
||||
|
||||
if( iCurrentlyHighLightedItem == iCounter )
|
||||
{
|
||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar + 1, sYSoldRadar + 1, usLineColor, pDestBuf );
|
||||
}
|
||||
if( iCurrentlyHighLightedItem == iCounter )
|
||||
{
|
||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar + 1, sYSoldRadar + 1, usLineColor, pDestBuf );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -632,77 +619,67 @@ void RenderRadarScreen( )
|
||||
sXSoldRadar += gsRadarX;
|
||||
sYSoldRadar += gsRadarY;
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// DB Need to add a radar color for 8-bit
|
||||
|
||||
// Are we a selected guy?
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
// Are we a selected guy?
|
||||
if ( pSoldier->ubID == gusSelectedSoldier )
|
||||
{
|
||||
if ( gfRadarCurrentGuyFlash )
|
||||
{
|
||||
if ( gfRadarCurrentGuyFlash )
|
||||
{
|
||||
usLineColor = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If on roof, make darker....
|
||||
if ( pSoldier->pathing.bLevel > 0 )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||
}
|
||||
}
|
||||
usLineColor = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||
|
||||
if ( pSoldier->bTeam == CIV_TEAM )
|
||||
{
|
||||
// Override civ team with red if hostile...
|
||||
if ( pSoldier->bSide != gbPlayerNum && !pSoldier->aiData.bNeutral )
|
||||
usLineColor = Get16BPPColor( FROMRGB( 255, 0, 0 ) );
|
||||
// if uncovered, different colour (so the player doesn't have to search for us)
|
||||
else if ( gGameExternalOptions.fKnownNPCsUseDifferentColour && pSoldier->ubProfile != NO_PROFILE && !zHiddenNames[pSoldier->ubProfile].Hidden )
|
||||
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 );
|
||||
|
||||
// Render different color if an enemy and he's unconscious
|
||||
if ( pSoldier->bTeam != gbPlayerNum && pSoldier->stats.bLife < OKLIFE )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 128, 128, 128 ) );
|
||||
}
|
||||
|
||||
// If on roof, make darker....
|
||||
if ( pSoldier->bTeam == gbPlayerNum && pSoldier->pathing.bLevel > 0 )
|
||||
if ( pSoldier->pathing.bLevel > 0 )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
usLineColor = Get16BPPColor( gTacticalStatus.Team[ pSoldier->bTeam ].RadarColor );
|
||||
|
||||
if ( pSoldier->bTeam == CIV_TEAM )
|
||||
{
|
||||
// Override civ team with red if hostile...
|
||||
if ( pSoldier->bSide != gbPlayerNum && !pSoldier->aiData.bNeutral )
|
||||
usLineColor = Get16BPPColor( FROMRGB( 255, 0, 0 ) );
|
||||
// if uncovered, different colour (so the player doesn't have to search for us)
|
||||
else if ( gGameExternalOptions.fKnownNPCsUseDifferentColour && pSoldier->ubProfile != NO_PROFILE && !zHiddenNames[pSoldier->ubProfile].Hidden )
|
||||
usLineColor = Get16BPPColor( FROMRGB( 0, 0, 255 ) );
|
||||
}
|
||||
|
||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
// DB Need to change this to a color from the 8-but standard palette
|
||||
usLineColor = COLOR_BLUE;
|
||||
RectangleDraw8( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||
// 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 );
|
||||
|
||||
// Render different color if an enemy and he's unconscious
|
||||
if ( pSoldier->bTeam != gbPlayerNum && pSoldier->stats.bLife < OKLIFE )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 128, 128, 128 ) );
|
||||
}
|
||||
|
||||
// If on roof, make darker....
|
||||
if ( pSoldier->bTeam == gbPlayerNum && pSoldier->pathing.bLevel > 0 )
|
||||
{
|
||||
usLineColor = Get16BPPColor( FROMRGB( 150, 150, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
RectangleDraw( TRUE, sXSoldRadar, sYSoldRadar, sXSoldRadar+1, sYSoldRadar+1, usLineColor, pDestBuf );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,4 +41,4 @@ void ClearOutRadarMapImage( void );
|
||||
// do we render the radar screen?..or the squad list?
|
||||
extern BOOLEAN fRenderRadarScreen;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+23
-74
@@ -604,20 +604,9 @@ BOOLEAN UpdateSaveBuffer(void)
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
// BLIT HERE
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, ( gsVIEWPORT_WINDOW_END_Y - gsVIEWPORT_WINDOW_START_Y ) );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
// BLIT HERE
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, gsVIEWPORT_WINDOW_END_Y );
|
||||
}
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
0, gsVIEWPORT_WINDOW_START_Y, 0, gsVIEWPORT_WINDOW_START_Y, usWidth, ( gsVIEWPORT_WINDOW_END_Y - gsVIEWPORT_WINDOW_START_Y ) );
|
||||
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
@@ -643,22 +632,11 @@ BOOLEAN RestoreExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT1
|
||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -695,22 +673,11 @@ BOOLEAN RestoreExternBackgroundRectGivenID( INT32 iBack )
|
||||
pDestBuf = LockVideoSurface(guiRENDERBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiSAVEBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
|
||||
@@ -730,22 +697,11 @@ BOOLEAN CopyExternBackgroundRect( INT16 sLeft, INT16 sTop, INT16 sWidth, INT16 s
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
Blt8BPPTo8BPP(pDestBuf, uiDestPitchBYTES,
|
||||
pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
}
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)pSrcBuf, uiSrcPitchBYTES,
|
||||
sLeft , sTop,
|
||||
sLeft , sTop,
|
||||
sWidth, sHeight);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
|
||||
@@ -1342,18 +1298,11 @@ BOOLEAN RestoreShiftedVideoOverlays( INT16 sShiftX, INT16 sShiftY )
|
||||
usHeight = sBottom - sTop;
|
||||
usWidth = sRight - sLeft;
|
||||
|
||||
if(gbPixelDepth==16)
|
||||
{
|
||||
|
||||
Blt16BPPTo16BPP((UINT16 *)(UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)gVideoOverlays[uiCount].pSaveArea, gBackSaves[ iBackIndex ].sWidth*2,
|
||||
sLeft, sTop,
|
||||
uiLeftSkip, uiTopSkip,
|
||||
usWidth, usHeight );
|
||||
}
|
||||
else if(gbPixelDepth==8)
|
||||
{
|
||||
}
|
||||
Blt16BPPTo16BPP((UINT16 *)(UINT16 *)pDestBuf, uiDestPitchBYTES,
|
||||
(UINT16 *)gVideoOverlays[uiCount].pSaveArea, gBackSaves[ iBackIndex ].sWidth*2,
|
||||
sLeft, sTop,
|
||||
uiLeftSkip, uiTopSkip,
|
||||
usWidth, usHeight );
|
||||
|
||||
// Once done, check for pending deletion
|
||||
if ( gVideoOverlays[uiCount].fDeletionPending )
|
||||
|
||||
@@ -34,4 +34,4 @@ void ExamineGridNoForSlantRoofExtraGraphic( INT32 sCheckGridNo );
|
||||
void SetRecalculateWireFrameFlagRadius(INT16 sX, INT16 sY, INT16 sRadius);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -13,4 +13,4 @@ extern BOOLEAN gfForceBuildShadeTables;
|
||||
BOOLEAN DeleteShadeTableDir( );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -5,4 +5,4 @@ void MarkMapIndexDirty( INT32 iMapIndex );
|
||||
void CenterScreenAtMapIndex( INT32 iMapIndex );
|
||||
void MarkWorldDirty();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -250,4 +250,4 @@ typedef struct TAG_STRUCTURE_FILE_HEADER
|
||||
#define STRUCTURE_FILE_CONTAINS_AUXIMAGEDATA 0x01
|
||||
#define STRUCTURE_FILE_CONTAINS_STRUCTUREDATA 0x02
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -26,4 +26,4 @@ extern SOLDIERTYPE *gpTacticalPlacementHilightedSoldier;
|
||||
//Saved value. Contains the last choice for future battles.
|
||||
extern UINT8 gubDefaultButton;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -45,4 +45,4 @@ void CheckForAndDeleteTileCacheStructInfo( LEVELNODE *pNode, UINT16 usIndex );
|
||||
|
||||
void GetRootName( STR8 pDestStr, const STR8 pSrcStr );
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -14,4 +14,4 @@ void DeleteTileSurface( PTILE_IMAGERY pTileSurf );
|
||||
void SetRaisedObjectFlag( char *cFilename, TILE_IMAGERY *pTileSurf );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -170,4 +170,4 @@ enum
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -34,4 +34,4 @@ void SetTilesetTwoTerrainValues( );
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+19
-19
@@ -460,36 +460,36 @@ UINT16 usNumNodes;
|
||||
***************************************************************************************/
|
||||
BOOLEAN LightTileBlocked(INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
||||
{
|
||||
UINT16 usTileNo, usSrcTileNo;
|
||||
UINT32 uiTileNo, uiSrcTileNo;
|
||||
|
||||
Assert(gpWorldLevelData!=NULL);
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
|
||||
if (TileIsOutOfBounds(usTileNo))
|
||||
if (TileIsOutOfBounds(uiTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if (TileIsOutOfBounds(usSrcTileNo))
|
||||
if (TileIsOutOfBounds(uiSrcTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if(gpWorldLevelData[ usTileNo ].sHeight > gpWorldLevelData[ usSrcTileNo ].sHeight)
|
||||
if(gpWorldLevelData[ uiTileNo ].sHeight > gpWorldLevelData[ uiSrcTileNo ].sHeight)
|
||||
return(TRUE);
|
||||
{
|
||||
UINT16 usTileNo;
|
||||
UINT32 uiTileNo;
|
||||
LEVELNODE *pStruct;
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
|
||||
pStruct = gpWorldLevelData[ usTileNo ].pStructHead;
|
||||
pStruct = gpWorldLevelData[ uiTileNo ].pStructHead;
|
||||
if ( pStruct != NULL )
|
||||
{
|
||||
// IF WE ARE A WINDOW, DO NOT BLOCK!
|
||||
if ( FindStructure( usTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||
if ( FindStructure( uiTileNo, STRUCTURE_WALLNWINDOW ) != NULL )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -509,8 +509,8 @@ BOOLEAN LightTileHasWall( INT16 iSrcX, INT16 iSrcY, INT16 iX, INT16 iY)
|
||||
{
|
||||
//LEVELNODE *pStruct;
|
||||
//UINT32 uiType;
|
||||
UINT16 usTileNo;
|
||||
UINT16 usSrcTileNo;
|
||||
UINT32 uiTileNo;
|
||||
UINT32 uiSrcTileNo;
|
||||
INT8 bDirection;
|
||||
UINT8 ubTravelCost;
|
||||
//INT8 bWallCount = 0;
|
||||
@@ -518,20 +518,20 @@ UINT8 ubTravelCost;
|
||||
|
||||
Assert(gpWorldLevelData!=NULL);
|
||||
|
||||
usTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
usSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
uiTileNo=MAPROWCOLTOPOS(iY, iX);
|
||||
uiSrcTileNo=MAPROWCOLTOPOS(iSrcY, iSrcX);
|
||||
|
||||
if ( usTileNo == usSrcTileNo )
|
||||
if ( uiTileNo == uiSrcTileNo )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if ( TileIsOutOfBounds(usTileNo))
|
||||
if ( TileIsOutOfBounds(uiTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
if ( TileIsOutOfBounds(usSrcTileNo))
|
||||
if ( TileIsOutOfBounds(uiSrcTileNo))
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -541,7 +541,7 @@ UINT8 ubTravelCost;
|
||||
bDirection = atan8( iSrcX, iSrcY, iX, iY );
|
||||
|
||||
|
||||
ubTravelCost = gubWorldMovementCosts[ usTileNo ][ bDirection ][ 0 ];
|
||||
ubTravelCost = gubWorldMovementCosts[ uiTileNo ][ bDirection ][ 0 ];
|
||||
|
||||
if ( ubTravelCost == TRAVELCOST_WALL )
|
||||
{
|
||||
@@ -550,7 +550,7 @@ UINT8 ubTravelCost;
|
||||
|
||||
if ( IS_TRAVELCOST_DOOR( ubTravelCost ) )
|
||||
{
|
||||
ubTravelCost = DoorTravelCost( NULL, usTileNo, ubTravelCost, TRUE, NULL );
|
||||
ubTravelCost = DoorTravelCost( NULL, uiTileNo, ubTravelCost, TRUE, NULL );
|
||||
|
||||
if ( ubTravelCost == TRAVELCOST_OBSTACLE || ubTravelCost == TRAVELCOST_DOOR )
|
||||
{
|
||||
|
||||
@@ -1367,8 +1367,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart
|
||||
GetCurrentVideoSettings(&usWidth, &usHeight, &ubBitDepth);
|
||||
pSrcBuf = LockVideoSurface(guiRENDERBUFFER, &uiSrcPitchBYTES);
|
||||
pDestBuf = LockVideoSurface(guiSAVEBUFFER, &uiDestPitchBYTES);
|
||||
if(gbPixelDepth == 16)// BLIT HERE
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, usWidth, usHeight);
|
||||
Blt16BPPTo16BPP((UINT16 *)pDestBuf, uiDestPitchBYTES, (UINT16 *)pSrcBuf, uiSrcPitchBYTES, 0, 0, 0, 0, usWidth, usHeight);
|
||||
UnLockVideoSurface(guiRENDERBUFFER);
|
||||
UnLockVideoSurface(guiSAVEBUFFER);
|
||||
}
|
||||
|
||||
+480
-569
File diff suppressed because it is too large
Load Diff
@@ -227,4 +227,4 @@ BOOLEAN Blt8BPPDataTo16BPPBufferTransZIncObscureClip(UINT16 *pBuffer, UINT32 uiD
|
||||
BOOLEAN Blt8BPPDataTo16BPPBufferTransZTransShadowIncObscureClip(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, INT16 sZIndex, UINT16 *p16BPPPalette, BOOLEAN fIgnoreShadows = FALSE);
|
||||
BOOLEAN Blt8BPPDataTo16BPPBufferTransZTransShadowIncObscureClipAlpha(UINT16 *pBuffer, UINT32 uiDestPitchBYTES, UINT16 *pZBuffer, UINT16 usZValue, HVOBJECT hSrcVObject, HVOBJECT hAlphaVObject, INT32 iX, INT32 iY, UINT16 usIndex, SGPRect *clipregion, INT16 sZIndex, UINT16 *p16BPPPalette, BOOLEAN fIgnoreShadows = FALSE);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -18,4 +18,4 @@ BOOLEAN InitializeSystemVideoObjects( );
|
||||
BOOLEAN InitializeGameVideoObjects( );
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2929,7 +2929,7 @@ BOOLEAN LoadWorld(const STR8 puiFilename, FLOAT* pMajorMapVersion, UINT8* pMinor
|
||||
SetWorldSize(iRowSize, iColSize);
|
||||
|
||||
// We still have the "normal" map size AND the map is saved in vanilla format
|
||||
if ((iRowSize <= OLD_WORLD_ROWS && iRowSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
||||
if ((iRowSize <= OLD_WORLD_ROWS && iColSize <= OLD_WORLD_COLS) && (dMajorMapVersion == VANILLA_MAJOR_MAP_VERSION && ubMinorMapVersion == VANILLA_MINOR_MAP_VERSION))
|
||||
{
|
||||
// Check "vanilla map saving"
|
||||
gfVanillaMode = TRUE;//dnl ch74 191013
|
||||
|
||||
Reference in New Issue
Block a user