mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Interactive actions now allows displaying images.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23144&goto=363478&#msg_363478 GameDir >= r2597 recommended. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9131 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1790,6 +1790,61 @@ BOOLEAN RemoveAllStructsOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32
|
||||
return fRetVal;
|
||||
}
|
||||
|
||||
STRUCTURE* GetStructForLevelNodeOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType )
|
||||
{
|
||||
if ( TileIsOutOfBounds( iMapIndex ) )
|
||||
return NULL;
|
||||
|
||||
UINT32 fTileType;
|
||||
|
||||
LEVELNODE* pLevelNode = gpWorldLevelData[iMapIndex].pStructHead;
|
||||
|
||||
// Look through all structs and Search for type
|
||||
while ( pLevelNode != NULL )
|
||||
{
|
||||
if ( pLevelNode->usIndex != NO_TILE )
|
||||
{
|
||||
GetTileType( pLevelNode->usIndex, &fTileType );
|
||||
|
||||
if ( fTileType >= fStartType && fTileType <= fEndType )
|
||||
{
|
||||
return pLevelNode->pStructureData;
|
||||
}
|
||||
}
|
||||
|
||||
pLevelNode = pLevelNode->pNext;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool GetTypeRegionIndexForLevelNodeOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType, UINT32& arTileType, UINT16& arRegionIndex )
|
||||
{
|
||||
if ( TileIsOutOfBounds( iMapIndex ) )
|
||||
return NULL;
|
||||
|
||||
LEVELNODE* pLevelNode = gpWorldLevelData[iMapIndex].pStructHead;
|
||||
|
||||
// Look through all structs and Search for type
|
||||
while ( pLevelNode != NULL )
|
||||
{
|
||||
if ( pLevelNode->usIndex != NO_TILE )
|
||||
{
|
||||
GetTileType( pLevelNode->usIndex, &arTileType );
|
||||
|
||||
if ( arTileType >= fStartType && arTileType <= fEndType
|
||||
&& GetTileRegionIndex( pLevelNode->usIndex, arRegionIndex ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
pLevelNode = pLevelNode->pNext;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Flugente: permanently remove structures
|
||||
BOOLEAN RemoveAllRoofsOfTypeRangeAdjustSaveFile( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user