CheckInventorySpace

CheckInventorySpace
int CheckInventorySpace( int X, int Y, int SizeX, int SizeY, int Window, bool FromCursor )

Function is located within Inventory/script/INV_Funcs.dh

Parameters:

 * X/Y - integer coordinates of the array position
 * SizeX/Y - integer sizes of the item
 * Window - integer pointer to the Window pointer array (ie WINDOW_EQUIPMENT, WINDOW_WEAPON)
 * FromCursor - if true, item properties are called from the cursor. If false, they are called from the item found at X/Y's origins.

Description:
Called by SwitchCursorToItem, PlaceItemInClosestSlot, and ToggleInventory

This function iterates through the array positions beneath the current cursor item size and determines whether there are other items blocking placement. Runs MarkSpotRange to determine if more than one item is currently blocking.

Returns:
 * INV_FREE - 0-1 items are blocking the checked area.
 * INV_BLOCKED - >1 items are blocking.
 * INV_STACK - There is a compatible stack in the area.