
//======================================
//リソース読み込み、グラフィックレクトなど
//
//======================================

let img_Enemy = GetCurrentScriptDirectory() ~ "img\rock_l.png";
let img_Burst = GetCurrentScriptDirectory() ~ "img\circle_fire.png";

let se_Hit = GetCurrentScriptDirectory() ~ "se\hit_p03_c.wav";
function system_SetEnemyTexture(let type){

	alternative(type)
	case("TYPE01"){

	}
	case("TYPE02"){

	}
	case("TYPE03"){

	}
	case("TYPEXX"){
		img_Enemy = GetCurrentScriptDirectory() ~ "img\rock_lb.png";
	}
}//end function

function once_system_LoadResource(){
	//ClearRenderTarget(img_render_Circle);

	LoadGraphic(img_Enemy);
	LoadGraphic(img_Burst);

	LoadSE(se_Hit);
	return;

}//end function

function once_system_DeleteResource(){

	DeleteGraphic(img_Enemy);
	DeleteGraphic(img_Burst);
	DeleteSE(se_Hit);

}//end function


function system_SetGraphicRect(let type){

	let rect = system_GetGraphicRect(type);
	SetGraphicRect( rect[0], rect[1], rect[2], rect[3] );
	return;

}//end function


function system_GetGraphicRect(let type){

	alternative(type)
	case("SPHERE_MAIN04"){return [32*0, 32*0, 32*2, 32*2];}
	case("SPHERE_MAIN03"){return [32*2, 32*0, 32*4, 32*2];}
	case("SPHERE_MAIN02"){return [32*4, 32*0, 32*6, 32*2];}
	case("SPHERE_MAIN01"){return [32*6, 32*0, 32*8, 32*2];}
	case("SPHERE_MARKER01"){return [32*0, 32*1, 32*1, 32*2];}

	case("BURST_01"){return [32*0, 32*0, 32*4, 32*4];}
	case("BURST_02"){return [32*4, 32*0, 32*8, 32*4];}
	case("BURST_03"){return [32*8, 32*0, 32*12, 32*4];}
	case("BURST_04"){return [32*12, 32*0, 32*16, 32*4];}
	case("BURST_05"){return [32*0, 32*4, 32*4, 32*8];}
	case("BURST_06"){return [32*4, 32*4, 32*8, 32*8];}
	case("BURST_07"){return [32*8, 32*4, 32*12, 32*8];}
	case("BURST_08"){return [32*12, 32*4, 32*16, 32*8];}

	return [0,0,0,0];

}//end function


