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:
@@ -1098,6 +1098,16 @@ BOOLEAN GetTileFlags( UINT16 usIndex, UINT32 *puiFlags )
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN GetTileRegionIndex( UINT16 usIndex, UINT16& arRegionIndex )
|
||||
{
|
||||
CHECKF( usIndex != NO_TILE );
|
||||
CHECKF( usIndex < giNumberOfTiles ); //lal bugfix
|
||||
|
||||
arRegionIndex = gTileDatabase[usIndex].usRegionIndex;
|
||||
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
BOOLEAN GetTileTypeLogicalHeight( UINT32 fType, UINT8 *pubLogHeight )
|
||||
{
|
||||
*pubLogHeight = gTileTypeLogicalHeight[ fType ];
|
||||
|
||||
@@ -230,6 +230,7 @@ BOOLEAN GetTypeSubIndexFromTileIndexChar( UINT32 uiCheckType, UINT16 usIndex, UI
|
||||
BOOLEAN GetTileIndexFromTypeSubIndex( UINT32 uiCheckType, UINT16 usSubIndex, UINT16 *pusTileIndex );
|
||||
BOOLEAN GetTileType( UINT16 usIndex, UINT32 *puiType );
|
||||
BOOLEAN GetTileFlags( UINT16 usIndex, UINT32 *puiFlags );
|
||||
BOOLEAN GetTileRegionIndex( UINT16 usIndex, UINT16& arRegionIndex );
|
||||
|
||||
BOOLEAN GetTileTypeLogicalHeight( UINT32 fType, UINT8 *pubLogHeight );
|
||||
BOOLEAN AnyHeigherLand( UINT32 iMapIndex, UINT32 uiSrcType, UINT8 *pubLastLevel );
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -85,6 +85,8 @@ LEVELNODE *ForceStructToTail( INT32 iMapIndex, UINT16 usIndex );
|
||||
BOOLEAN AddStructToHead( INT32 iMapIndex, UINT16 usIndex );
|
||||
BOOLEAN TypeExistsInStructLayer( INT32 iMapIndex, UINT32 fType, UINT16 *pusStructIndex );
|
||||
BOOLEAN RemoveAllStructsOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType );
|
||||
STRUCTURE* GetStructForLevelNodeOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType );
|
||||
bool GetTypeRegionIndexForLevelNodeOfTypeRange( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType, UINT32& arTileType, UINT16& arRegionIndex );
|
||||
|
||||
// Flugente: permanently remove structures
|
||||
BOOLEAN RemoveAllRoofsOfTypeRangeAdjustSaveFile( INT32 iMapIndex, UINT32 fStartType, UINT32 fEndType );
|
||||
|
||||
Reference in New Issue
Block a user