function AreaSelect
{
	let player_select=0;
	let fixation=false;
	Selection(0);
	Selection(1);
	
	loop(240)
	{
		if(GetPlayerX>cenX){player_select=0;}
		else{player_select=1;}
		yield;
	}
	fixation=true;
	return player_select;
	
	task Selection(let type)
	{
		let obj=SetEffectObject(tex[TEX_SELECT],2);
		SetEffectObjectRect(obj,0+256*type,0,256+256*type,512);
		ObjEffect_SetRenderState(obj,ADD);
		
		let r=1;
		if(type){r=-r;}
		let i=512;
		let sy=cenY+i;
		let count=0;
		let scale=1;
		let alpha=32;
		while(!Obj_BeDeleted(obj))
		{
			sy=cenX+i*r;
			Obj_SetPosition(obj,cenX+128*r,sy);
			ObjEffect_SetScale(obj,scale,1);
			ascent(a in 0..4)
			{
				ObjEffect_SetVertexColor(obj,a,alpha,255,255,255);
			}
			
			if(fixation&&player_select!=type){Obj_Delete(obj);}
			if(fixation&&player_select==type)
			{
				scale+=0.05;
				alpha--;
			}
			if(alpha<8){Obj_Delete(obj);}
			if(i>0){i-=32;}
			count++;
			yield;
		}
	}
}

