if(pp->TxLoc==-1 || pp->TyLoc==-1) return;
static void Tiling(int s, PKGx6C *pp) // Clicking the corners of tiling calls this function - Crwth 01/11/1999{	if(pp->TxLoc==-1 || pp->TyLoc==-1) return;	if (clickx[s]==-1 && clicky[s]==-1)	{		clickx[s]=pp->TxLoc;		clicky[s]=pp->TyLoc;		target(s,0,1,0,198, "Select second corner of bounding box.");		return;	}	int c;	bool pileable = false;	tile_st tile;	int x1=clickx[s],x2=pp->TxLoc;	int y1=clicky[s],y2=pp->TyLoc;	clickx[s]=-1;clicky[s]=-1;	if (x1>x2) {c=x1;x1=x2;x2=c;}	if (y1>y2) {c=y1;y1=y2;y2=c;}	if (addid1[s]==0x40)	{		switch (addid2[s])		{		case 100:		case 102:		case 104:		case 106:		case 108:		case 110:		case 112:		case 114:		case 116:		case 118:		case 120:		case 122:		case 124:		case 126:		case 140:			AddTarget(s,pp);			return;		}	}	int x,y;	short id=(addid1[s]<<8)+addid2[s];	Map->SeekTile(id, &tile);	if (tile.flag2&0x08) pileable = true;	for (x=x1;x<=x2;x++)		for (y=y1;y<=y2;y++)		{			P_ITEM pi = Items->SpawnItem(currchar[s], 1, "#", pileable, id, 0, 0);			if(!pi) return;			pi->priv=0;	//Make them not decay			pi->MoveTo(x,y,pp->TzLoc+Map->TileHeight(pp->model));			RefreshItem(pi);		}	addid1[s]=0;	addid2[s]=0;}