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:
Flugente
2021-07-07 20:05:42 +00:00
parent 9756cf33f4
commit 3f4da5fad5
8 changed files with 320 additions and 95 deletions
+55
View File
@@ -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 )
{