void *ih_box_system_find(ih_box_system_t *system, ih_box_coordinate_t *coordinate) { assert(system); assert(coordinate); assert(coordinate_in_range(system, coordinate)); ih_box_cell_t *cell; cell = find_cell(system, coordinate); return cell->object; }
void *cf_inferno_box_system_find(cf_inferno_box_system_t *system, cf_inferno_box_coordinate_t *coordinate) { assert(system); assert(coordinate); assert(coordinate_in_range(system, coordinate)); cf_inferno_box_cell_t *cell; cell = find_cell(system, coordinate); return cell->object; }
void ih_box_system_add(ih_box_system_t *system, ih_box_coordinate_t *coordinate, void *object) { assert(system); assert(coordinate); assert(coordinate_in_range(system, coordinate)); assert(object); ih_box_cell_t *cell; cell = find_cell(system, coordinate); cell->object = object; system->set_cell(object, cell); }