mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- New feature: sector fortification allows to construct structures in sectors in a much easier way than by using amerc to build 'by hand'. Fortification nodes are in a subfolder in Profiles and can easily be altered and exchanged, even in an ongoing game.
Fully savegame compatible. GameDir >= r2296 is recommended, but not required. - Cleaned up cover display functions. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8094 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+15
-21
@@ -842,18 +842,15 @@ void DeallocateTileDatabase( )
|
||||
|
||||
BOOLEAN GetLandHeadType( INT32 iMapIndex, UINT32 *puiType )
|
||||
{
|
||||
UINT16 usIndex;
|
||||
Assert( puiType != NULL );
|
||||
|
||||
Assert( puiType != NULL );
|
||||
CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL );
|
||||
|
||||
CHECKF( gpWorldLevelData[ iMapIndex ].pLandHead != NULL );
|
||||
UINT16 usIndex = gpWorldLevelData[iMapIndex].pLandHead->usIndex;
|
||||
|
||||
usIndex = gpWorldLevelData[ iMapIndex ].pLandHead->usIndex;
|
||||
|
||||
GetTileType( usIndex, puiType );
|
||||
|
||||
return( TRUE );
|
||||
GetTileType( usIndex, puiType );
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN fDelete )
|
||||
@@ -869,21 +866,19 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
|
||||
|
||||
if ( AnyHeigherLand( iMapIndex, uiNewType, &ubLastHighLevel ) )
|
||||
{
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
// Replace with new index
|
||||
return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) );
|
||||
}
|
||||
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
// Replace with new index
|
||||
return( ReplaceLandIndex( iMapIndex, usTempIndex, usIndex ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( InsertLandIndexAtLevel( iMapIndex, usIndex, (UINT8)(ubLastHighLevel+1) ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// Check if type exists and get it's index if so
|
||||
if ( TypeExistsInLandLayer( iMapIndex, uiNewType, &usTempIndex ) )
|
||||
{
|
||||
@@ -896,7 +891,6 @@ BOOLEAN SetLandIndex( INT32 iMapIndex, UINT16 usIndex, UINT32 uiNewType, BOOLEAN
|
||||
return( AddLandToHead( iMapIndex, usIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user