def get_objects(self, map_range):
     """Return a dict of tiles in the specified bounds.
     
     supermap_range is a dict of range specifications, such as returned by
     SuperMap.get_tile_range_in_rect().
     """
     return get_objects_in_cell_ids(self.map, map_range)
 def get_objects_in_rect(self, rect):
     """Return a dict of objects that intersect rect.
     
     rect is a pygame.Rect expressed in world coordinates.
     """
     map_range = self.get_tile_range_in_rect(rect)
     return get_objects_in_cell_ids(map_range)
 def _count_map_tiles(self):
     basic_map = State.map
     ids = toolkit.get_visible_cell_ids(
         State.camera, basic_map, self.scroll_speed)
     layers = toolkit.get_objects_in_cell_ids(basic_map, ids)
     count = 0
     for layer in layers:
         count += len(layer)
     return count