global.floor_count = 0.0

///@func grid_meeting(object, grid)
///@param {real} object			id of the object to check
///@param {real} grid			ds_grid to check collision with
///@returns {bool} collision	whether there is a collision or not
function grid_meeting(_object, _grid){
	var _top_right = _grid[(_object.bbox_right - 1) / TILE_SIZE][_object.bbox_top / TILE_SIZE].type == TILES.VOID
	var _top_left = _grid[_object.bbox_left / TILE_SIZE][_object.bbox_top / TILE_SIZE].type == TILES.VOID
	var _bottom_right = _grid[(_object.bbox_right - 1) / TILE_SIZE][(_object.bbox_bottom - 1) / TILE_SIZE].type == TILES.VOID
	var _bottom_left = _grid[_object.bbox_left / TILE_SIZE][(_object.bbox_bottom - 1) / TILE_SIZE].type == TILES.VOID
	var _mid_right = _grid[(_object.bbox_right - 1) / TILE_SIZE][(_object.bbox_bottom - 1 - 32) / TILE_SIZE].type == TILES.VOID
	var _mid_left = _grid[_object.bbox_left / TILE_SIZE][(_object.bbox_bottom - 1 - 32) / TILE_SIZE].type == TILES.VOID

	return _top_right || _top_left || _bottom_right || _bottom_left || _mid_right || _mid_left
}

