예제 #1
0
void block::addInside(block & check, block grab, int i)
{
	int pos=0;
	if(check.cond&&(pos=check.blockIsInside(grab))){
		check.addInside(check.blocksIn[pos-1],grab,pos-1);
	}
	else {
		addIn(grab, i);
	}
}
예제 #2
0
int bGroup::heightUpdate(block & grab, block & comp)
{
	int ret=0;
	for (unsigned int i=0; i<comp.numInside(); i++) {
		heightUpdate(grab, comp.blocksIn[i]);
	}
	for (unsigned int i=0; i<comp.size(); i++) {
		heightUpdate(grab, comp.blocksOn[i]);
	}
	if(comp.blockIsInside(grab)&&!comp.bSeq&&!grab.numBlock){
		if(!comp.inBlockIn(grab.x,grab.y)) comp.h=grab.heightOnlyOn(true)+comp.heightInside()+grab.h+65-((!comp.numInside())?40:0);
		else comp.h=comp.heightInside()+65-((!comp.numInside())?40:0);
		comp.updatePositions(grab);
	}
	return ret;
}