src/game/Editor/Edit_Sys.cc
UINT16 GetRandomIndexByRange( UINT16 usRangeStart, UINT16 usRangeEnd )
{
	UINT16	usPickList[50];
	UINT16	usNumInPickList;
	UINT16	usWhich;
	UINT16	usObject;
	// Get a list of valid object to select from
	usNumInPickList = 0;
	for ( usWhich = 0; usWhich < *pNumSelList; usWhich++ )
	{
		usObject = (UINT16)pSelList[ usWhich ].uiObject;
		if ( (usObject >= usRangeStart) && (usObject <= usRangeEnd) )
		{
			usPickList[ usNumInPickList ] = usObject;
			usNumInPickList++;
		}
	}
	return ( usNumInPickList ) ? usPickList[ Random(usNumInPickList) ] : 0xffff;
}
//---------------------------------------------------------------------------------------------------------------
//	GetRandomIndexByRange
//
//	Returns a randomly picked object index given the current selection list, and the type or types of objects we want
//	from that list. If no such objects are in the list, we return 0xffff (-1).
GetRandomIndexByRange
Returns a randomly picked object index given the current selection list, and the type or types of objects we want
from that list. If no such objects are in the list, we return 0xffff (-1).
GetRandomIndexByRange Returns a randomly picked object index given the current selection list and the type or types of objects we want from that list . If no such objects are in the list we return 0xffff ( - 1 ) .
UINT16 GetRandomIndexByRange( UINT16 usRangeStart, UINT16 usRangeEnd )
{
	UINT16	usPickList[50];
	UINT16	usNumInPickList;
	UINT16	usWhich;
	UINT16	usObject;
	usNumInPickList = 0;
	for ( usWhich = 0; usWhich < *pNumSelList; usWhich++ )
	{
		usObject = (UINT16)pSelList[ usWhich ].uiObject;
		if ( (usObject >= usRangeStart) && (usObject <= usRangeEnd) )
		{
			usPickList[ usNumInPickList ] = usObject;
			usNumInPickList++;
		}
	}
	return ( usNumInPickList ) ? usPickList[ Random(usNumInPickList) ] : 0xffff;
}
UINT16 GetRandomIndexByRange ( UINT16 usRangeStart , UINT16 usRangeEnd ) { UINT16 usPickList [ 50 ] ; UINT16 usNumInPickList ; UINT16 usWhich ; UINT16 usObject ; usNumInPickList = 0 ; for ( usWhich = 0 ; usWhich < * pNumSelList ; usWhich ++ ) { usObject = ( UINT16 ) pSelList [ usWhich ] . uiObject ; if ( ( usObject >= usRangeStart ) && ( usObject <= usRangeEnd ) ) { usPickList [ usNumInPickList ] = usObject ; usNumInPickList ++ ; } } return ( usNumInPickList ) ? usPickList [ Random ( usNumInPickList ) ] : 0xffff ; }
GetRandomIndexByRange
Returns a randomly picked object index given the current selection list, and the type or types of objects we want
from that list.
GetRandomIndexByRange Returns a randomly picked object index given the current selection list and the type or types of objects we want from that list .
// Get a list of valid object to select from