src/game/Editor/Edit_Sys.cc
void PasteDebris( UINT32 iMapIndex )
{
	UINT16				usUseIndex;
	UINT16				usUseObjIndex;
	INT32					iRandSelIndex;

	// Get selection list for debris
	pSelList = SelDebris;
	pNumSelList = &iNumDebrisSelected;

	if ( iMapIndex < GRIDSIZE )
	{
		AddToUndoList( iMapIndex );

		// Remove any debris that is currently at this map location
		if ( gpWorldLevelData[ iMapIndex ].pObjectHead != NULL )
		{
			RemoveAllObjectsOfTypeRange( iMapIndex, ANOTHERDEBRIS, FIRSTPOINTERS - 1 );
		}

		// Get a random debris from current selection
		iRandSelIndex = GetRandomSelection( );
		if ( iRandSelIndex != -1 )
		{
			// Add debris to the world
			usUseIndex = pSelList[ iRandSelIndex ].usIndex;
			usUseObjIndex = (UINT16)pSelList[ iRandSelIndex ].uiObject;

			AddObjectToTail( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) );
		}
	}
}
//---------------------------------------------------------------------------------------------------------------
//	PasteDebris
//
//	Place some "debris" on the map at the current mouse coordinates. This function is called repeatedly if
//	the current brush size is larger than 1 tile.
//
PasteDebris
Place some "debris" on the map at the current mouse coordinates. This function is called repeatedly if
the current brush size is larger than 1 tile.
PasteDebris Place some " debris " on the map at the current mouse coordinates . This function is called repeatedly if the current brush size is larger than 1 tile .
void PasteDebris( UINT32 iMapIndex )
{
	UINT16				usUseIndex;
	UINT16				usUseObjIndex;
	INT32					iRandSelIndex;
	pSelList = SelDebris;
	pNumSelList = &iNumDebrisSelected;
	if ( iMapIndex < GRIDSIZE )
	{
		AddToUndoList( iMapIndex );
		if ( gpWorldLevelData[ iMapIndex ].pObjectHead != NULL )
		{
			RemoveAllObjectsOfTypeRange( iMapIndex, ANOTHERDEBRIS, FIRSTPOINTERS - 1 );
		}
		iRandSelIndex = GetRandomSelection( );
		if ( iRandSelIndex != -1 )
		{
			usUseIndex = pSelList[ iRandSelIndex ].usIndex;
			usUseObjIndex = (UINT16)pSelList[ iRandSelIndex ].uiObject;
			AddObjectToTail( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) );
		}
	}
}
void PasteDebris ( UINT32 iMapIndex ) { UINT16 usUseIndex ; UINT16 usUseObjIndex ; INT32 iRandSelIndex ; pSelList = SelDebris ; pNumSelList = & iNumDebrisSelected ; if ( iMapIndex < GRIDSIZE ) { AddToUndoList ( iMapIndex ) ; if ( gpWorldLevelData [ iMapIndex ] . pObjectHead != NULL ) { RemoveAllObjectsOfTypeRange ( iMapIndex , ANOTHERDEBRIS , FIRSTPOINTERS - 1 ) ; } iRandSelIndex = GetRandomSelection ( ) ; if ( iRandSelIndex != -1 ) { usUseIndex = pSelList [ iRandSelIndex ] . usIndex ; usUseObjIndex = ( UINT16 ) pSelList [ iRandSelIndex ] . uiObject ; AddObjectToTail ( iMapIndex , ( UINT16 ) ( gTileTypeStartIndex [ usUseObjIndex ] + usUseIndex ) ) ; } } }
PasteDebris
Place some "debris" on the map at the current mouse coordinates.
PasteDebris Place some " debris " on the map at the current mouse coordinates .
// Get selection list for debris // Remove any debris that is currently at this map location // Get a random debris from current selection // Add debris to the world