//////////////////ハイスコア名前空間///////////////////////////////////////////////
let NsHiScoreReimuAEasy=[];
let NsHiScoreReimuANormal=[];
let NsHiScoreReimuAHard = [];
let NsHiScoreReimuALunatic =[];
let NsHiScoreReimuAExtra = [];

let NsHiScoreReimuBEasy = [];
let NsHiScoreReimuBNormal = [];
let NsHiScoreReimuBHard = [];
let NsHiScoreReimuBLunatic = [];
let NsHiScoreReimuBExtra = [];

let NsHiScoreMarisaAEasy = [];
let NsHiScoreMarisaANormal = [];
let NsHiScoreMarisaAHard = [];
let NsHiScoreMarisaALunatic = [];
let NsHiScoreMarisaAExtra = [];

let NsHiScoreMarisaBEasy = [];
let NsHiScoreMarisaBNormal = [];
let NsHiScoreMarisaBHard = [];
let NsHiScoreMarisaBLunatic = [];
let NsHiScoreMarisaBExtra = [];

let NsHiScoreOthersEasy = [];
let NsHiScoreOthersNormal = [];
let NsHiScoreOthersHard = [];
let NsHiScoreOthersLunatic = [];
let NsHiScoreOthersExtra = [];


let NsHiScoreReimuAEasy2=[];
let NsHiScoreReimuANormal2=[];
let NsHiScoreReimuAHard2 = [];
let NsHiScoreReimuALunatic2 =[];
let NsHiScoreReimuAExtra2 = [];

let NsHiScoreReimuBEasy2 = [];
let NsHiScoreReimuBNormal2 = [];
let NsHiScoreReimuBHard2 = [];
let NsHiScoreReimuBLunatic2 = [];
let NsHiScoreReimuBExtra2 = [];

let NsHiScoreMarisaAEasy2 = [];
let NsHiScoreMarisaANormal2 = [];
let NsHiScoreMarisaAHard2 = [];
let NsHiScoreMarisaALunatic2 = [];
let NsHiScoreMarisaAExtra2 = [];

let NsHiScoreMarisaBEasy2 = [];
let NsHiScoreMarisaBNormal2 = [];
let NsHiScoreMarisaBHard2 = [];
let NsHiScoreMarisaBLunatic2 = [];
let NsHiScoreMarisaBExtra2 = [];

let NsHiScoreOthersEasy2 = [];
let NsHiScoreOthersNormal2 = [];
let NsHiScoreOthersHard2 = [];
let NsHiScoreOthersLunatic2 = [];
let NsHiScoreOthersExtra2 = [];


ascent(let k in 0..10)
{
NsHiScoreReimuAEasy=NsHiScoreReimuAEasy ~ [k];
NsHiScoreReimuANormal=NsHiScoreReimuANormal ~ [k];
NsHiScoreReimuAHard =NsHiScoreReimuAHard ~ [k];
NsHiScoreReimuALunatic =NsHiScoreReimuALunatic ~ [k];
NsHiScoreReimuAExtra =NsHiScoreReimuAExtra ~ [k];

NsHiScoreReimuBEasy =NsHiScoreReimuBEasy ~ [k];
NsHiScoreReimuBNormal =NsHiScoreReimuBNormal ~ [k];
NsHiScoreReimuBHard =NsHiScoreReimuBHard  ~ [k];
NsHiScoreReimuBLunatic =NsHiScoreReimuBLunatic ~ [k];
NsHiScoreReimuBExtra =NsHiScoreReimuBExtra ~ [k];

NsHiScoreMarisaAEasy =NsHiScoreMarisaAEasy ~ [k];
NsHiScoreMarisaANormal =NsHiScoreMarisaANormal ~ [k];
NsHiScoreMarisaAHard =NsHiScoreMarisaAHard ~ [k];
NsHiScoreMarisaALunatic =NsHiScoreMarisaALunatic ~ [k];
NsHiScoreMarisaAExtra =NsHiScoreMarisaAExtra ~ [k];

NsHiScoreMarisaBEasy =NsHiScoreMarisaBEasy ~ [k];
NsHiScoreMarisaBNormal =NsHiScoreMarisaBNormal ~ [k];
NsHiScoreMarisaBHard =NsHiScoreMarisaBHard ~ [k];
NsHiScoreMarisaBLunatic =NsHiScoreMarisaBLunatic ~ [k];
NsHiScoreMarisaBExtra =NsHiScoreMarisaBExtra ~ [k];

NsHiScoreOthersEasy =NsHiScoreOthersEasy ~ [k];
NsHiScoreOthersNormal =NsHiScoreOthersNormal ~ [k];
NsHiScoreOthersHard =NsHiScoreOthersHard ~ [k];
NsHiScoreOthersLunatic =NsHiScoreOthersLunatic ~ [k];
NsHiScoreOthersExtra =NsHiScoreOthersExtra ~ [k];


NsHiScoreReimuAEasy2=NsHiScoreReimuAEasy2 ~ [k];
NsHiScoreReimuANormal2=NsHiScoreReimuANormal2 ~ [k];
NsHiScoreReimuAHard2 =NsHiScoreReimuAHard2 ~ [k];
NsHiScoreReimuALunatic2 =NsHiScoreReimuALunatic2 ~ [k];
NsHiScoreReimuAExtra2 =NsHiScoreReimuAExtra2 ~ [k];

NsHiScoreReimuBEasy2 =NsHiScoreReimuBEasy2 ~ [k];
NsHiScoreReimuBNormal2 =NsHiScoreReimuBNormal2 ~ [k];
NsHiScoreReimuBHard2 =NsHiScoreReimuBHard2  ~ [k];
NsHiScoreReimuBLunatic2 =NsHiScoreReimuBLunatic2 ~ [k];
NsHiScoreReimuBExtra2 =NsHiScoreReimuBExtra2 ~ [k];

NsHiScoreMarisaAEasy2 =NsHiScoreMarisaAEasy2 ~ [k];
NsHiScoreMarisaANormal2 =NsHiScoreMarisaANormal2 ~ [k];
NsHiScoreMarisaAHard2 =NsHiScoreMarisaAHard2 ~ [k];
NsHiScoreMarisaALunatic2 =NsHiScoreMarisaALunatic2 ~ [k];
NsHiScoreMarisaAExtra2 =NsHiScoreMarisaAExtra2 ~ [k];

NsHiScoreMarisaBEasy2 =NsHiScoreMarisaBEasy2 ~ [k];
NsHiScoreMarisaBNormal2 =NsHiScoreMarisaBNormal2 ~ [k];
NsHiScoreMarisaBHard2 =NsHiScoreMarisaBHard2 ~ [k];
NsHiScoreMarisaBLunatic2 =NsHiScoreMarisaBLunatic2 ~ [k];
NsHiScoreMarisaBExtra2 =NsHiScoreMarisaBExtra2 ~ [k];

NsHiScoreOthersEasy2 =NsHiScoreOthersEasy2 ~ [k];
NsHiScoreOthersNormal2 =NsHiScoreOthersNormal2 ~ [k];
NsHiScoreOthersHard2 =NsHiScoreOthersHard2 ~ [k];
NsHiScoreOthersLunatic2 =NsHiScoreOthersLunatic2 ~ [k];
NsHiScoreOthersExtra2 =NsHiScoreOthersExtra2 ~ [k];

}

ascent(let k in 0..10)
{
NsHiScoreReimuAEasy[k]=		k+0.1;
NsHiScoreReimuANormal[k]=	k+10.1;	
NsHiScoreReimuAHard[k]=		k+20.1;
NsHiScoreReimuALunatic[k]=	k+30.1;
NsHiScoreReimuAExtra[k]=	k+40.1;

NsHiScoreReimuBEasy[k]=		k+0.2;
NsHiScoreReimuBNormal[k]=	k+10.2;
NsHiScoreReimuBHard[k]=		k+20.2;
NsHiScoreReimuBLunatic[k]=	k+30.2;
NsHiScoreReimuBExtra[k]=	k+40.2;

NsHiScoreMarisaAEasy[k]=	k+0.3;
NsHiScoreMarisaANormal[k]=	k+10.3;
NsHiScoreMarisaAHard[k]=	k+20.3;
NsHiScoreMarisaALunatic[k]=	k+30.3;
NsHiScoreMarisaAExtra[k]=	k+40.3;

NsHiScoreMarisaBEasy[k]=	k+0.4;
NsHiScoreMarisaBNormal[k]=	k+10.4;
NsHiScoreMarisaBHard[k]=	k+20.4;
NsHiScoreMarisaBLunatic[k]=	k+30.4;
NsHiScoreMarisaBExtra[k]=	k+40.4;

NsHiScoreOthersEasy[k]=		k+0.5;
NsHiScoreOthersNormal[k]=	k+10.5;
NsHiScoreOthersHard[k]=		k+20.5;
NsHiScoreOthersLunatic[k]=	k+30.5;
NsHiScoreOthersExtra[k]=	k+40.5;


NsHiScoreReimuAEasy2[k]=	k+0.11;
NsHiScoreReimuANormal2[k]=	k+10.11;	
NsHiScoreReimuAHard2[k]=	k+20.11;
NsHiScoreReimuALunatic2[k]=	k+30.11;
NsHiScoreReimuAExtra2[k]=	k+40.11;

NsHiScoreReimuBEasy2[k]=	k+0.22;
NsHiScoreReimuBNormal2[k]=	k+10.22;
NsHiScoreReimuBHard2[k]=	k+20.22;
NsHiScoreReimuBLunatic2[k]=	k+30.22;
NsHiScoreReimuBExtra2[k]=	k+40.22;

NsHiScoreMarisaAEasy2[k]=	k+0.33;
NsHiScoreMarisaANormal2[k]=	k+10.33;
NsHiScoreMarisaAHard2[k]=	k+20.33;
NsHiScoreMarisaALunatic2[k]=	k+30.33;
NsHiScoreMarisaAExtra2[k]=	k+40.33;

NsHiScoreMarisaBEasy2[k]=	k+0.44;
NsHiScoreMarisaBNormal2[k]=	k+10.44;
NsHiScoreMarisaBHard2[k]=	k+20.44;
NsHiScoreMarisaBLunatic2[k]=	k+30.44;
NsHiScoreMarisaBExtra2[k]=	k+40.44;

NsHiScoreOthersEasy2[k]=	k+0.55;
NsHiScoreOthersNormal2[k]=	k+10.55;
NsHiScoreOthersHard2[k]=	k+20.55;
NsHiScoreOthersLunatic2[k]=	k+30.55;
NsHiScoreOthersExtra2[k]=	k+40.55;

}

let NsUpTime = "UP_TIME";
let NsPlayTime = "PLAY_TIME";
///////////プレイ回数部///////////////////////////////////////////////////////////
let NsFrequencyReimuAEasy = "F_RA_E";
let NsFrequencyReimuANormal = "F_RA_N";
let NsFrequencyReimuAHard = "F_RA_H";
let NsFrequencyReimuALunatic = "F_RA_L";
let NsFrequencyReimuAExtra = "F_RA_EX";

let NsFrequencyReimuBEasy = "F_RB_E";
let NsFrequencyReimuBNormal = "F_RB_N";
let NsFrequencyReimuBHard = "F_RB_H";
let NsFrequencyReimuBLunatic = "F_RB_L";
let NsFrequencyReimuBExtra = "F_RB_EX";

let NsFrequencyMarisaAEasy = "F_MA_E";
let NsFrequencyMarisaANormal = "F_MA_N";
let NsFrequencyMarisaAHard = "F_MA_H";
let NsFrequencyMarisaALunatic = "F_MA_L";
let NsFrequencyMarisaAExtra = "F_MA_EX";

let NsFrequencyMarisaBEasy = "F_MB_E";
let NsFrequencyMarisaBNormal = "F_MB_N";
let NsFrequencyMarisaBHard = "F_MB_H";
let NsFrequencyMarisaBLunatic = "F_MB_L";
let NsFrequencyMarisaBExtra = "F_MB_EX";

let NsFrequencyOthersEasy = "F_O_E";
let NsFrequencyOthersNormal = "F_O_N";
let NsFrequencyOthersHard = "F_O_H";
let NsFrequencyOthersLunatic = "F_O_L";
let NsFrequencyOthersExtra = "F_O_EX";
//////////////////////////////////////////////////////////////////////////////////////////
function ResultSpellDrawEachPlayer(let SpellNo,let name,let y,let Result)
{
if(Result%10000<99)
{
	ResultZenPlayerDisplay(110,80,255,255,255,255);//全プレイヤー合計を表示
	if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellG[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellG[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellG[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellB[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}

if(Result%10100<99)
{
	DrawText(DrawDefinedPlayer1,60,80,12,255);
	if(GetCommonDataDefaultEx(NsScore,NsSpellCRA[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellGRA[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGRA[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCRA[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGRA[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCRA[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellBRA[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
		{
			ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		}
		else
		{
			ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		}
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}

if(Result%10200<99)
{
	DrawText(DrawDefinedPlayer2,60,80,12,255);
	if(GetCommonDataDefaultEx(NsScore,NsSpellCRB[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellGRB[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGRB[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCRB[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGRB[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCRB[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellBRB[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
		{
			ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		}
		else
		{
			ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		}
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}

if(Result%10300<99)
{
	DrawText(DrawDefinedPlayer3,60,80,12,255);
	if(GetCommonDataDefaultEx(NsScore,NsSpellCMA[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellGMA[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGMA[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCMA[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGMA[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCMA[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellBMA[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
		{
			ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		}
		else
		{
			ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		}
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}

if(Result%10400<99)
{
	DrawText(DrawDefinedPlayer4,60,80,12,255);
	if(GetCommonDataDefaultEx(NsScore,NsSpellCMB[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellGMB[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGMB[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCMB[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGMB[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCMB[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellBMB[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
		{
			ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		}
		else
		{
			ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		}
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}

if(Result%10500<99)
{
	DrawText("その他のプレイヤー",60,80,12,255);
	if(GetCommonDataDefaultEx(NsScore,NsSpellCO[SpellNo],0)!=0)
	{			
		ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		if(GetCommonDataDefaultEx(NsScore,NsSpellGO[SpellNo],0)==0)
		{
			ResultNoDisplay(y,255,200,150,150);//赤色のNo。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,150,150);//赤色のスペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGO[SpellNo],0),255,200,150,150);//赤色のスペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCO[SpellNo],0),255,200,150,150);//赤色のスペル挑戦数を表示
			ResultBerDisplay(y,255,200,150,150);//赤色のスラッシュを表示
		}
		else
		{
			ResultNoDisplay(y,255,255,255,255);//No。を表示
			ResultNumberDisPlay(80,y,SpellNo,255,200,200,255);//スペル番号を表示
			ResultNumberDisPlay(340,y,GetCommonDataDefaultEx(NsScore,NsSpellGO[SpellNo],0),255,200,200,255);//スペル取得数(0)を表示
			ResultNumberDisPlay(380,y,GetCommonDataDefaultEx(NsScore,NsSpellCO[SpellNo],0),255,200,200,255);//スペル挑戦数を表示
			ResultBerDisplay(y,255,200,200,255);
		}
		ResultMaxBonusDisplay(y-15);//MaxBonus(文字列）を表示
		ResultNumberDisPlay(390,y-15,GetCommonDataDefaultEx(NsScore,NsSpellBO[SpellNo],0),255,200,150,150);//MaxBonus(SCB）を表示
	}
	else
	{
		if(GetCommonDataDefaultEx(NsScore,NsSpellC[SpellNo],0)!=0)
		{
			ResultSpellNameDisplay(trunc((SpellNo-1)/8),(SpellNo-1)%8,y,255,255,255,255);//スペル名を表示
		}
		else
		{
			ResultQuestionDisplay(y,255,255,255,255);//薄い？？？？？を表示
		}
		ResultNoDisplay(y,150,255,255,255);//薄いNo。を表示
		ResultNumberDisPlay(80,y,SpellNo,150,200,200,255);//薄いスペル番号を表示
		ResultNoneDisplay(329,y,255,255,255,255);//左側の---を表示
		ResultBerDisplay(y,150,200,200,255);//薄いスラッシュを表示
		ResultNoneDisplay(379,y,255,255,255,255);//右側の---を表示
	}
}
}


// w フレームだけ待つ
function wait(w) 
{
    loop(w) { yield; }
}

function WaitForZeroEnemy()//敵数が0になるまで待機する関数
{
	while(GetEnemyNum() != 0){yield;}
}

function ItemSet(x,y,type)//アイテム生成関数
{
	let XY=GetCommonDataDefault("ItemXY",[]);//共通データ内容を変数に渡す
	XY=XY~[x,y,type];//
	SetCommonData("ItemXY",XY);//共通データに変更後の配列を渡す
}

///////////////////////////////////////////////////////////////////////////////////////////
	let csd = GetCurrentScriptDirectory;
	let imgLetter =csd ~ "img/border.png"; 
	let DefinedPlayer1="ReimuA.txt";
	let DefinedPlayer2="ReimuB.txt";
	let DefinedPlayer3="MarisaA.txt";
	let DefinedPlayer4="MarisaB.txt";
	let DefinedPlayer5="USER_PLAYER";
	//let DefinedPlayer6=

	let DrawDefinedPlayer1="博麗霊夢　A";
	let DrawDefinedPlayer2="博麗霊夢　B";
	let DrawDefinedPlayer3="霧雨魔理沙　A";
	let DrawDefinedPlayer4="霧雨魔理沙　B";

	let SelectedCharacter=GetPlayerScriptName;

////////////////////////////////////////////////////////////////////////////////////////////

//スコアのセーブファイル

let savePathstage = GetCurrentScriptDirectory~"SaveData.dat";//ステージで読み込む
let savePath = GetCurrentScriptDirectory~"..\SaveData.dat";//スペルで読み込む

let NsSpellG=[];
let NsSpellC=[];
let NsSpellB=[];

let NsSpellGRA=[];
let NsSpellCRA=[];
let NsSpellBRA=[];

let NsSpellGRB=[];
let NsSpellCRB=[];
let NsSpellBRB=[];

let NsSpellGMA=[];
let NsSpellCMA=[];
let NsSpellBMA=[];

let NsSpellGMB=[];
let NsSpellCMB=[];
let NsSpellBMB=[];

let NsSpellGO=[];
let NsSpellCO=[];
let NsSpellBO=[];


ascent(let k in 0..150)
{
NsSpellG = NsSpellG ~ [k];
NsSpellC = NsSpellC ~ [k];
NsSpellB = NsSpellB ~ [k];

NsSpellGRA = NsSpellGRA ~ [k];
NsSpellCRA = NsSpellCRA ~ [k];
NsSpellBRA = NsSpellBRA ~ [k];

NsSpellGRB = NsSpellGRB ~ [k];
NsSpellCRB = NsSpellCRB ~ [k];
NsSpellBRB = NsSpellBRB ~ [k];

NsSpellGMA = NsSpellGMA ~ [k];
NsSpellCMA = NsSpellCMA ~ [k];
NsSpellBMA = NsSpellBMA ~ [k];

NsSpellGMB = NsSpellGMB ~ [k];
NsSpellCMB = NsSpellCMB ~ [k];
NsSpellBMB = NsSpellBMB ~ [k];

NsSpellGO = NsSpellGO ~ [k];
NsSpellCO = NsSpellCO ~ [k];
NsSpellBO = NsSpellBO ~ [k];
}

/////////////////////////////////////////////////////////////////////////////////////////////
//名前空間
let NsScore = "SAVE_SCORE";	//スコア
let NsHi = "HI_SCORE";	//ハイスコア(NsScore)

//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////

ascent(let k in 0..150)
{
NsSpellG[k] = k;		//スペカNO.k取得履歴
NsSpellC[k] = k*10000;		//スペカNO.k挑戦履歴
NsSpellB[k] = k*100000000;	//スペカNO.k最大ボーナス履歴

NsSpellGRA[k] = k+1000;		//スペカNO.k取得履歴
NsSpellCRA[k] = k*10000+1000;		//スペカNO.k挑戦履歴
NsSpellBRA[k] = k*100000000+1000;	//スペカNO.k最大ボーナス履歴

NsSpellGRB[k] = k+2000;		//スペカNO.k取得履歴
NsSpellCRB[k] = k*10000+2000;		//スペカNO.k挑戦履歴
NsSpellBRB[k] = k*100000000+2000;	//スペカNO.k最大ボーナス履歴

NsSpellGMA[k] = k+3000;		//スペカNO.k取得履歴
NsSpellCMA[k] = k*10000+3000;		//スペカNO.k挑戦履歴
NsSpellBMA[k] = k*100000000+3000;	//スペカNO.k最大ボーナス履歴

NsSpellGMB[k] = k+4000;		//スペカNO.k取得履歴
NsSpellCMB[k] = k*10000+4000;		//スペカNO.k挑戦履歴
NsSpellBMB[k] = k*100000000+4000;	//スペカNO.k最大ボーナス履歴

NsSpellGO[k] = k+5000;		//スペカNO.k取得履歴
NsSpellCO[k] = k*10000+5000;		//スペカNO.k挑戦履歴
NsSpellBO[k] = k*100000000+5000;	//スペカNO.k最大ボーナス履歴
}

let NsGetSpell = "GET_SPELL";	//スペカ取得枚数(Common)
let NsIsReplay = "IS_REPLAY";	//リプレイかどうか(Common)

let NsDefeatFrame = "DEFEAT_FRAME";	//撃破フレーム(Common)
let NsDefeatPosX = "DEFEAT_POSX";	//撃破位置(Common)
let NsDefeatPosY = "DEFEAT_POSY";	//撃破位置(Common)
let NsBossFrame = "BOSS_FRAME";	//ボス攻撃開始からのフレーム(Common)

///////////////////////////////////////////////////////////////////////////////////////////////

//ボス再生に使用するコモンエリアのロード
function LoadBossAreas()
{
	CreateCommonDataArea(NsScore);
	LoadCommonDataEx(NsScore,savePath);
	SetCommonData(NsGetSpell,0);
	let isRep = IsReplay();
	SetCommonData(NsIsReplay,isRep);
}



//ボス再生に使用するコモンエリアのセーブ、削除
function DeleteBossAreas()
{
	if(GetCommonDataDefault(NsIsReplay,true) == false)
	{
		SaveCommonDataEx(NsScore,savePath);
	}
	ClearCommonDataEx(NsScore);
	DeleteCommonData(NsGetSpell);
	DeleteCommonData(NsDefeatFrame);
	DeleteCommonData(NsDefeatPosX);
	DeleteCommonData(NsDefeatPosY);
	DeleteCommonData(NsBossFrame);
	DeleteCommonData(NsIsReplay);
}


	function NumToString(let num)
	{
		if(num==0)
		{
			num=0.1;
		}
		let leng = trunc(log10(num))+1;//整数部分の桁数を求める
		let string = ToString(num);//数字を文字列に変える
		let str = " ";
			times(12-leng)
			{
				string = str ~ string;//桁揃え用のスペースを先頭につける。
			} 
		return string[0..12];//文字列をスライシングして返す
	}

////////////////////////////////////////////////////////////////////////////////////////////
task DisPlayNumber(let x,let y,let number,let number2)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			DisplayNumLetter(x-(i-1)*12,y,num[i]);
		}
	}
	if(num[0]==0)
	{
		DisplayNumLetter(x,y,0);
	}
}

task DisPlayScoreNumber(let x,let y,let number,let number2)
{
if(number2!=0)
{
	number+=1000000;
}
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..7)
	{
		if(num[0]>=10^(i-1))
		{
			DisplayNumLetter(x-(i-1)*12,y,num[i]);
		}
	}
	if(num[0]==0)
	{
		DisplayNumLetter(x,y,0);
	}
}

task DisPlayScoreNumber2(let x,let y,let number,let number2)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			DisplayNumLetter(x-(i-1)*12,y,num[i]);
		}
	}
	if(num[0]==0)
	{
		//DisplayNumLetter(x,y,0);
	}
}

task DisplayNumLetter(let x,let y,let num)
{
		let scx=0.8;
		let scy=1;
		let obj0 = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj0,imgLetter);
		ObjEffect_SetPrimitiveType(obj0, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj0, ADD); 
		ObjEffect_CreateVertex(obj0, 4);
		ObjEffect_SetVertexXY(obj0, 0, -7, -8);
		ObjEffect_SetVertexXY(obj0, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj0, 2, 7, 8);
		ObjEffect_SetVertexXY(obj0, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj0, 0,  2+14*num,  114);
		ObjEffect_SetVertexUV(obj0, 1,  14+14*num, 114);
		ObjEffect_SetVertexUV(obj0, 2, 14+14*num,  131);
		ObjEffect_SetVertexUV(obj0, 3, 2+14*num, 131);
		
		ObjEffect_SetScale(obj0, scx,scy);
		Obj_SetPosition(obj0,x,y);
		ObjEffect_SetLayer(obj0,8);
		wait(1);
		Obj_Delete(obj0);
}

task DisPlayGetItemScore(let x,let y,let number,let color)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			DisplayGetItemScoreLetter(x-(i-1)*6,y,num[i],color);
		}
	}
	if(num[0]==0)
	{
		DisplayGetItemScoreLetter(x,y,0,color);
	}
}

task DisplayGetItemScoreLetter(let x,let y,let num,let color)
{
		let scx=0.6;
		let scy=0.6;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj,imgLetter);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -7, -8);
		ObjEffect_SetVertexXY(obj, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj, 2, 7, 8);
		ObjEffect_SetVertexXY(obj, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj, 0,  2+14*num,  114);
		ObjEffect_SetVertexUV(obj, 1,  14+14*num, 114);
		ObjEffect_SetVertexUV(obj, 2, 14+14*num,  131);
		ObjEffect_SetVertexUV(obj, 3, 2+14*num, 131);

if(color=="white")
{
		ObjEffect_SetVertexColor(obj,0,100,255,255,255);
		ObjEffect_SetVertexColor(obj,1,100,255,255,255);
		ObjEffect_SetVertexColor(obj,2,100,255,255,255);
		ObjEffect_SetVertexColor(obj,3,100,255,255,255);
}

if(color=="yellow")
{
		ObjEffect_SetVertexColor(obj,0,100,255,255,150);
		ObjEffect_SetVertexColor(obj,1,100,255,255,150);
		ObjEffect_SetVertexColor(obj,2,100,255,255,150);
		ObjEffect_SetVertexColor(obj,3,100,255,255,150);
}
		
		ObjEffect_SetScale(obj, scx,scy);
		Obj_SetPosition(obj,x,y);
		ObjEffect_SetLayer(obj,4);
		wait(30);
		Obj_Delete(obj);
}

task ResultMaxBonusDisplay(y)//resultのmaxbonusを表示
{
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgResult);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -55, -9);
		ObjEffect_SetVertexXY(obj, 1, 55,  -9);
		ObjEffect_SetVertexXY(obj, 2, 55, 9);
		ObjEffect_SetVertexXY(obj, 3,  -55,  9);
		
		ObjEffect_SetVertexUV(obj, 0,  2,  4);
		ObjEffect_SetVertexUV(obj, 1,  112, 4);
		ObjEffect_SetVertexUV(obj, 2, 112,  22);
		ObjEffect_SetVertexUV(obj, 3, 2, 22);
		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,GetClipMaxX-129,y+5);

		let ScaleX=0.5;
		let ScaleY=0.5;
		ObjEffect_SetScale(obj, ScaleX,ScaleY);

		yield;
		Obj_Delete(obj);
}

task ResultNoDisplay(y,Alpha,R,G,B)//resultのNo.を表示
{
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgResult);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -18, -9);
		ObjEffect_SetVertexXY(obj, 1, 18,  -9);
		ObjEffect_SetVertexXY(obj, 2, 18, 9);
		ObjEffect_SetVertexXY(obj, 3,  -18,  9);
		
		ObjEffect_SetVertexUV(obj, 0,  2,  28);
		ObjEffect_SetVertexUV(obj, 1,  38, 28);
		ObjEffect_SetVertexUV(obj, 2, 38,  46);
		ObjEffect_SetVertexUV(obj, 3, 2, 46);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,GetClipMinX+17,y+5);

		let ScaleX=0.5;
		let ScaleY=0.5;
		ObjEffect_SetScale(obj, ScaleX,ScaleY);

		yield;
		Obj_Delete(obj);
}

task ResultNumberDisPlay(let x,let y,let number,Alpha,R,G,B)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			ResultNumLetterDisplay(x-(i-1)*7,y+5.5,num[i],Alpha,R,G,B);
		}
	}
	if(num[0]==0)
	{
		ResultNumLetterDisplay(x,y+5,0,Alpha,R,G,B);
	}
}

task ResultNumLetterDisplay(let x,let y,let num,Alpha,R,G,B)
{
		let scx=0.5;
		let scy=0.7;
		let obj0 = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj0,imgLetter);
		ObjEffect_SetPrimitiveType(obj0, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj0, ADD); 
		ObjEffect_CreateVertex(obj0, 4);
		ObjEffect_SetVertexXY(obj0, 0, -7, -8);
		ObjEffect_SetVertexXY(obj0, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj0, 2, 7, 8);
		ObjEffect_SetVertexXY(obj0, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj0, 0,  2+14*num,  114);
		ObjEffect_SetVertexUV(obj0, 1,  14+14*num, 114);
		ObjEffect_SetVertexUV(obj0, 2, 14+14*num,  131);
		ObjEffect_SetVertexUV(obj0, 3, 2+14*num, 131);

		ObjEffect_SetVertexColor(obj0,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,3,Alpha,R,G,B);
		
		ObjEffect_SetScale(obj0, scx,scy);
		Obj_SetPosition(obj0,x,y);
		ObjEffect_SetLayer(obj0,8);
		wait(1);
		Obj_Delete(obj0);
}

task ResultBerDisplay(y,Alpha,R,G,B)//resultのNo.を表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, imgResult);
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -6, -11);
		ObjEffect_SetVertexXY(obj, 1, 6,  -11);
		ObjEffect_SetVertexXY(obj, 2, 6, 11);
		ObjEffect_SetVertexXY(obj, 3,  -6,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  51,  26);
		ObjEffect_SetVertexUV(obj, 1,  63, 26);
		ObjEffect_SetVertexUV(obj, 2, 63,  48);
		ObjEffect_SetVertexUV(obj, 3, 51, 48);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,353,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultQuestionDisplay(y,Alpha,R,G,B)//resultのNo.を表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -33, -9);
		ObjEffect_SetVertexXY(obj, 1, 33,  -9);
		ObjEffect_SetVertexXY(obj, 2, 33, 9);
		ObjEffect_SetVertexXY(obj, 3,  -33,  9);
		
		ObjEffect_SetVertexUV(obj, 0,  3,  176);
		ObjEffect_SetVertexUV(obj, 1,  69, 176);
		ObjEffect_SetVertexUV(obj, 2, 69,  194);
		ObjEffect_SetVertexUV(obj, 3, 3, 194);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,111,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}


task ResultNoneDisplay(x,y,Alpha,R,G,B)//resultのNo.を表示
{
		let scx=0.3;
		let scy=0.25;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -33, -9);
		ObjEffect_SetVertexXY(obj, 1, 33,  -9);
		ObjEffect_SetVertexXY(obj, 2, 33, 9);
		ObjEffect_SetVertexXY(obj, 3,  -33,  9);
		
		ObjEffect_SetVertexUV(obj, 0,  96,  176);
		ObjEffect_SetVertexUV(obj, 1,  134, 176);
		ObjEffect_SetVertexUV(obj, 2, 134,  194);
		ObjEffect_SetVertexUV(obj, 3, 96, 194);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultSpellNameDisplay(BY,NO,y,Alpha,R,G,B)//resultのNo.を表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img\spellname.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -13);
		ObjEffect_SetVertexXY(obj, 1, 496,  -13);
		ObjEffect_SetVertexXY(obj, 2, 496, 13);
		ObjEffect_SetVertexXY(obj, 3,  0,  13);
		
		ObjEffect_SetVertexUV(obj, 0,  16+512*BY,  12+(NO)*80);
		ObjEffect_SetVertexUV(obj, 1,  512+512*BY, 12+(NO)*80);
		ObjEffect_SetVertexUV(obj, 2, 512+512*BY,  38+(NO)*80);
		ObjEffect_SetVertexUV(obj, 3, 16+512*BY, 38+(NO)*80);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,95,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}


task ResultKetteiDisplay(x,y,Alpha,R,G,B)//resultのNo.を表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -168, -12);
		ObjEffect_SetVertexXY(obj, 1, 168,  -12);
		ObjEffect_SetVertexXY(obj, 2, 168, 12);
		ObjEffect_SetVertexXY(obj, 3,  -168,  12);
		
		ObjEffect_SetVertexUV(obj, 0,  5,  214);
		ObjEffect_SetVertexUV(obj, 1,  341, 214);
		ObjEffect_SetVertexUV(obj, 2, 341,  238);
		ObjEffect_SetVertexUV(obj, 3, 5, 238);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultZenPlayerDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, -103, -11);
		ObjEffect_SetVertexXY(obj, 1, 103,  -11);
		ObjEffect_SetVertexXY(obj, 2, 103, 11);
		ObjEffect_SetVertexXY(obj, 3,  -103,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  160,  173);
		ObjEffect_SetVertexUV(obj, 1,  366, 173);
		ObjEffect_SetVertexUV(obj, 2, 366,  195);
		ObjEffect_SetVertexUV(obj, 3, 160, 195);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task CrearBonus
{
let DBonus;
	alternative(GetCommonDataDefault("SELECTEDDIFFICULT","Normal"))
	case("Easy")
	{
		DBonus=0.5;
	}
	case("Normal")
	{
		DBonus=1;
	}
	case("Hard")
	{
		DBonus=1.5;
	}
	case("Lunatic")
	{
		DBonus=2;
	}

	let bonusscore=(GetPlayerLife-1)*10000000+GetPlayerBomb*2500000+GetCommonData("BombBonus")*1250000+GetCommonData("BONUSPOINT")*100+trunc(GetCommonData("POWERMAX"))*1000;
	bonusscore=bonusscore*DBonus;
	CrearBonusDisplay(GetCenterX+80,GetCenterY-20,bonusscore);
	wait(180);
	loop(100)
	{
		AddScore(bonusscore/100);
		yield;
	}
}

task CrearBonusDisplay(x,y,number)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			DisplayCrearBonusNumLetter(x-(i-1)*24,y,num[i]);
		}
	}
	if(num[0]==0)
	{
		DisplayCrearBonusNumLetter(x,y,0);
	}
}

task DisplayCrearBonusNumLetter(let x,let y,let num)
{
		let scx=2;
		let scy=2;
		let obj0 = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj0,imgLetter);
		ObjEffect_SetPrimitiveType(obj0, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj0, ADD); 
		ObjEffect_CreateVertex(obj0, 4);
		ObjEffect_SetVertexXY(obj0, 0, -7, -8);
		ObjEffect_SetVertexXY(obj0, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj0, 2, 7, 8);
		ObjEffect_SetVertexXY(obj0, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj0, 0,  2+14*num,  114);
		ObjEffect_SetVertexUV(obj0, 1,  14+14*num, 114);
		ObjEffect_SetVertexUV(obj0, 2, 14+14*num,  131);
		ObjEffect_SetVertexUV(obj0, 3, 2+14*num, 131);

		ObjEffect_SetVertexColor(obj0,0,200,255,255,255);
		ObjEffect_SetVertexColor(obj0,1,200,255,255,255);
		ObjEffect_SetVertexColor(obj0,2,200,150,150,255);
		ObjEffect_SetVertexColor(obj0,3,200,150,150,255);
		
		ObjEffect_SetScale(obj0, scx,scy);
		Obj_SetPosition(obj0,x,y);
		ObjEffect_SetLayer(obj0,8);
		wait(240);
		Obj_Delete(obj0);
}

task ResultHiscoreDisPlay(let x,let y,let number,let number2)
{
if(number2>=0)
{
	number+=1000000;
}
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..7)
	{
		if(num[0]>=10^(i-1))
		{
			ResultHiscoreNumDisplay(x-(i-1)*10,y,num[i],255,200,200,255);
		}
	}
	if(num[0]==0)
	{
		ResultHiscoreNumDisplay(x,y,0,255,200,200,255);
	}
}

task ResultHiscoreDisPlay2(let x,let y,let number,let number2)
{
let num=[];
ascent(let k in 0..11)
{
num = num ~ [k];
}
	num[0]=trunc(number);
	num[1]=trunc(number%10);
	num[2]=trunc(number%100/10);
	num[3]=trunc(number%1000/100);
	num[4]=trunc(number%10000/1000);
	num[5]=trunc(number%100000/10000);
	num[6]=trunc(number%1000000/100000);
	num[7]=trunc(number%10000000/1000000);
	num[8]=trunc(number%100000000/10000000);
	num[9]=trunc(number%1000000000/100000000);
	num[10]=trunc(number%10000000000/1000000000);


	ascent(let i in 1..10)
	{
		if(num[0]>=10^(i-1))
		{
			ResultHiscoreNumDisplay(x-(i-1)*10,y,num[i],255,200,200,255);
		}
	}
	if(num[0]==0)
	{
		//ResultHiscoreNumDisplay(x,y,0,255,200,200,255);
	}
}

task ResultHiscoreNumDisplay(let x,let y,let num,Alpha,R,G,B)
{
		let scx=0.8;
		let scy=0.8;
		let obj0 = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj0,imgLetter);
		ObjEffect_SetPrimitiveType(obj0, PRIMITIVE_TRIANGLEFAN);
		ObjEffect_SetRenderState(obj0, ADD); 
		ObjEffect_CreateVertex(obj0, 4);
		ObjEffect_SetVertexXY(obj0, 0, -7, -8);
		ObjEffect_SetVertexXY(obj0, 1, 7,  -8);
		ObjEffect_SetVertexXY(obj0, 2, 7, 8);
		ObjEffect_SetVertexXY(obj0, 3,  -7,  8);
		
		ObjEffect_SetVertexUV(obj0, 0,  2+14*num,  114);
		ObjEffect_SetVertexUV(obj0, 1,  14+14*num, 114);
		ObjEffect_SetVertexUV(obj0, 2, 14+14*num,  131);
		ObjEffect_SetVertexUV(obj0, 3, 2+14*num, 131);

		ObjEffect_SetVertexColor(obj0,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj0,3,Alpha,R,G,B);
		
		ObjEffect_SetScale(obj0, scx,scy);
		Obj_SetPosition(obj0,x,y+5);
		ObjEffect_SetLayer(obj0,8);
		wait(1);
		Obj_Delete(obj0);
}

task ResultSoukidouDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  16);
		ObjEffect_SetVertexUV(obj, 1,  601, 16);
		ObjEffect_SetVertexUV(obj, 2, 601,  38);
		ObjEffect_SetVertexUV(obj, 3, 396, 38);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}


task ResultSouPlayDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  56);
		ObjEffect_SetVertexUV(obj, 1,  601, 56);
		ObjEffect_SetVertexUV(obj, 2, 601,  78);
		ObjEffect_SetVertexUV(obj, 3, 396, 78);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultPlayKaisuuDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  116);
		ObjEffect_SetVertexUV(obj, 1,  601, 116);
		ObjEffect_SetVertexUV(obj, 2, 601,  138);
		ObjEffect_SetVertexUV(obj, 3, 396, 138);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultReimuADisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  156);
		ObjEffect_SetVertexUV(obj, 1,  601, 156);
		ObjEffect_SetVertexUV(obj, 2, 601,  178);
		ObjEffect_SetVertexUV(obj, 3, 396, 178);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultReimuBDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  196);
		ObjEffect_SetVertexUV(obj, 1,  601, 196);
		ObjEffect_SetVertexUV(obj, 2, 601,  218);
		ObjEffect_SetVertexUV(obj, 3, 396, 218);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultMarisaADisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  236);
		ObjEffect_SetVertexUV(obj, 1,  601, 236);
		ObjEffect_SetVertexUV(obj, 2, 601,  258);
		ObjEffect_SetVertexUV(obj, 3, 396, 258);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultMarisaBDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  276);
		ObjEffect_SetVertexUV(obj, 1,  601, 276);
		ObjEffect_SetVertexUV(obj, 2, 601,  298);
		ObjEffect_SetVertexUV(obj, 3, 396, 298);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultSonotaDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  316);
		ObjEffect_SetVertexUV(obj, 1,  601, 316);
		ObjEffect_SetVertexUV(obj, 2, 601,  338);
		ObjEffect_SetVertexUV(obj, 3, 396, 338);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultZenDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  356);
		ObjEffect_SetVertexUV(obj, 1,  601, 356);
		ObjEffect_SetVertexUV(obj, 2, 601,  378);
		ObjEffect_SetVertexUV(obj, 3, 396, 378);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultRetrayDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  516);
		ObjEffect_SetVertexUV(obj, 1,  601, 516);
		ObjEffect_SetVertexUV(obj, 2, 601,  538);
		ObjEffect_SetVertexUV(obj, 3, 396, 538);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultClearKaisuuDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  396);
		ObjEffect_SetVertexUV(obj, 1,  601, 396);
		ObjEffect_SetVertexUV(obj, 2, 601,  418);
		ObjEffect_SetVertexUV(obj, 3, 396, 418);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultContenuDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  436);
		ObjEffect_SetVertexUV(obj, 1,  601, 436);
		ObjEffect_SetVertexUV(obj, 2, 601,  458);
		ObjEffect_SetVertexUV(obj, 3, 396, 458);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultPlacticDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -11);
		ObjEffect_SetVertexXY(obj, 1, 205,  -11);
		ObjEffect_SetVertexXY(obj, 2, 205, 11);
		ObjEffect_SetVertexXY(obj, 3,  0,  11);
		
		ObjEffect_SetVertexUV(obj, 0,  396,  476);
		ObjEffect_SetVertexUV(obj, 1,  601, 476);
		ObjEffect_SetVertexUV(obj, 2, 601,  498);
		ObjEffect_SetVertexUV(obj, 3, 396, 498);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}

task ResultZenDifficultDisplay(x,y,Alpha,R,G,B)//全プレイヤーを表示
{
		let scx=0.5;
		let scy=0.5;
		let obj = Obj_Create(OBJ_EFFECT);
		ObjEffect_SetTexture(obj, csd ~ "img/border.png");
		ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
	//	ObjEffect_SetRenderState(obj, ADD); 
		ObjEffect_CreateVertex(obj, 4);
		ObjEffect_SetVertexXY(obj, 0, 0, -10);
		ObjEffect_SetVertexXY(obj, 1, 474,  -10);
		ObjEffect_SetVertexXY(obj, 2, 474, 10);
		ObjEffect_SetVertexXY(obj, 3,  0,  10);
		
		ObjEffect_SetVertexUV(obj, 0,  26,  564);
		ObjEffect_SetVertexUV(obj, 1,  500, 564);
		ObjEffect_SetVertexUV(obj, 2, 500,  584);
		ObjEffect_SetVertexUV(obj, 3, 26, 584);

		ObjEffect_SetVertexColor(obj,0,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,1,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,2,Alpha,R,G,B);
		ObjEffect_SetVertexColor(obj,3,Alpha,R,G,B);

		ObjEffect_SetLayer(obj,7);
		Obj_SetPosition(obj,x,y+5);

		ObjEffect_SetScale(obj, scx,scy);

		yield;
		Obj_Delete(obj);
}