All pastes #627625 Raw Edit

Something

public c v1 · immutable
·published 2007-07-20 12:58 UTC
rendered paste body
/** * @brief Returns the index of the biggest item in the inventory list * @note This item is the only one that will be drawn when lying at the floor * @sa CL_PlaceItem */static int CL_BiggestItem (invList_t *ic){	int size, max, maxSize = 0;	int i;	maxSize = 0;	for (max = ic->item.t; ic; ic = ic->next) {		for (i = 0; i < SHAPE_SMALL_MAX_HEIGHT * SHAPE_SMALL_MAX_WIDTH; i++)			if (csi.ods[ic->item.t].shape & (1 << i))				size++;		if (size > maxSize) {			max = ic->item.t;			maxSize = size;		}	}	return max;}