src/game/Editor/Edit_Sys.cc
void PasteBanks(UINT32 const iMapIndex, BOOLEAN const fReplace)
{
	BOOLEAN				fDoPaste = FALSE;
	UINT16				usUseIndex;
	UINT16				usUseObjIndex;

	pSelList = SelBanks;
	pNumSelList = &iNumBanksSelected;

	usUseIndex = pSelList[ iCurBank ].usIndex;
	usUseObjIndex = (UINT16)pSelList[ iCurBank ].uiObject;

	if ( iMapIndex < GRIDSIZE )
	{
		fDoPaste = TRUE;

		if (  gpWorldLevelData[ iMapIndex ].pStructHead != NULL )
		{
				// CHECK IF THE SAME TILE IS HERE
				if ( gpWorldLevelData[ iMapIndex ].pStructHead->usIndex == (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) )
				{
					fDoPaste = FALSE;
				}
		}
		else
		{
			// Nothing is here, paste
			fDoPaste = TRUE;
		}

		if ( fDoPaste )
		{
			AddToUndoList( iMapIndex );

			{
					if ( usUseObjIndex == FIRSTROAD )
					{
						AddObjectToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) );
					}
					else
					{
						AddStructToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) );
						// Add shadows
						if ( !gfBasement && usUseObjIndex == FIRSTCLIFF )
						{
							//AddShadowToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex - FIRSTCLIFF + FIRSTCLIFFSHADOW ] + usUseIndex ) );
							AddObjectToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex - FIRSTCLIFF + FIRSTCLIFFHANG ] + usUseIndex ) );
						}
					}
			}
		}
	}
}
//---------------------------------------------------------------------------------------------------------------
//	PasteBanks
//
//	Places a river bank or cliff into the world
//
PasteBanks
Places a river bank or cliff into the world
PasteBanks Places a river bank or cliff into the world
void PasteBanks(UINT32 const iMapIndex, BOOLEAN const fReplace)
{
	BOOLEAN				fDoPaste = FALSE;
	UINT16				usUseIndex;
	UINT16				usUseObjIndex;
	pSelList = SelBanks;
	pNumSelList = &iNumBanksSelected;
	usUseIndex = pSelList[ iCurBank ].usIndex;
	usUseObjIndex = (UINT16)pSelList[ iCurBank ].uiObject;
	if ( iMapIndex < GRIDSIZE )
	{
		fDoPaste = TRUE;
		if (  gpWorldLevelData[ iMapIndex ].pStructHead != NULL )
		{
				if ( gpWorldLevelData[ iMapIndex ].pStructHead->usIndex == (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) )
				{
					fDoPaste = FALSE;
				}
		}
		else
		{
			fDoPaste = TRUE;
		}
		if ( fDoPaste )
		{
			AddToUndoList( iMapIndex );
			{
					if ( usUseObjIndex == FIRSTROAD )
					{
						AddObjectToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) );
					}
					else
					{
						AddStructToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) );
						if ( !gfBasement && usUseObjIndex == FIRSTCLIFF )
						{
							AddObjectToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex - FIRSTCLIFF + FIRSTCLIFFHANG ] + usUseIndex ) );
						}
					}
			}
		}
	}
}
void PasteBanks ( UINT32 const iMapIndex , BOOLEAN const fReplace ) { BOOLEAN fDoPaste = FALSE ; UINT16 usUseIndex ; UINT16 usUseObjIndex ; pSelList = SelBanks ; pNumSelList = & iNumBanksSelected ; usUseIndex = pSelList [ iCurBank ] . usIndex ; usUseObjIndex = ( UINT16 ) pSelList [ iCurBank ] . uiObject ; if ( iMapIndex < GRIDSIZE ) { fDoPaste = TRUE ; if ( gpWorldLevelData [ iMapIndex ] . pStructHead != NULL ) { if ( gpWorldLevelData [ iMapIndex ] . pStructHead -> usIndex == ( UINT16 ) ( gTileTypeStartIndex [ usUseObjIndex ] + usUseIndex ) ) { fDoPaste = FALSE ; } } else { fDoPaste = TRUE ; } if ( fDoPaste ) { AddToUndoList ( iMapIndex ) ; { if ( usUseObjIndex == FIRSTROAD ) { AddObjectToHead ( iMapIndex , ( UINT16 ) ( gTileTypeStartIndex [ usUseObjIndex ] + usUseIndex ) ) ; } else { AddStructToHead ( iMapIndex , ( UINT16 ) ( gTileTypeStartIndex [ usUseObjIndex ] + usUseIndex ) ) ; if ( ! gfBasement && usUseObjIndex == FIRSTCLIFF ) { AddObjectToHead ( iMapIndex , ( UINT16 ) ( gTileTypeStartIndex [ usUseObjIndex - FIRSTCLIFF + FIRSTCLIFFHANG ] + usUseIndex ) ) ; } } } } } }
PasteBanks
Places a river bank or cliff into the world
PasteBanks Places a river bank or cliff into the world
// CHECK IF THE SAME TILE IS HERE // Nothing is here, paste // Add shadows //AddShadowToHead( iMapIndex, (UINT16)( gTileTypeStartIndex[ usUseObjIndex - FIRSTCLIFF + FIRSTCLIFFSHADOW ] + usUseIndex ) );