how is it possible to clear the whole floor of items automatically on a map?
Just collect all items on map by one of item collecting functions. Filter these which shouldn't be removed no matter what (like blockers, Items being integral part of map, etc), and pass what left to DeleteItems().
If you want to be sure that list does not contain Items which are not on the floor, Item::Accessory is your friend; if its value is same as ACCESSORY_HEX define, item is on the ground.