All pastes #627600 Raw Edit

Anonymous

public c v1 · immutable
·published 2007-07-20 12:51 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;	byte shapeAsByte;	maxSize = 0;	for (max = ic->item.t; ic; ic = ic->next) {		shapeAsByte = (csi.ods[ic->item.t].shape >> 24);		size += (uint32_t)shapeAsByte;		shapeAsByte = (csi.ods[ic->item.t].shape >> 16);		size += (uint32_t)shapeAsByte;		shapeAsByte = (csi.ods[ic->item.t].shape >> 8);		size += (uint32_t)shapeAsByte;		shapeAsByte = csi.ods[ic->item.t].shape;		size += (uint32_t)shapeAsByte;		if (size > maxSize) {			max = ic->item.t;			maxSize = size;		}	}	return max;}