//******************************************************************************
//	"MNC"			Master & Commander			Added 6-15-06
//******************************************************************************

void InitMusic()
{
	int n = 0;
	ref tmpref;

	//============ MAIN MENU ================================
	// added by NK so it can be done in code.
	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_main_menu";
	tmpref.files.l1.name = "MUSIC\CutthroatIsland_Main_Theme.ogg";
	//============ MAIN THEME ===============================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_main_theme";
	tmpref.files.l1.name = "MUSIC\Main_Theme.ogg";
	//============ FINAL THEME ==============================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_final_theme";
	tmpref.files.l1.name = "MUSIC\March.ogg";
	//============ INDOOR PLACES ============================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_shop";
	tmpref.files.l1.name = "MUSIC\Taverna.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_shipyard";
	tmpref.files.l1.name = "MUSIC\Taverna.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_tavern";
	tmpref.files.l1.name = "MUSIC\Taverna.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Town_Exploration02.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_church";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Church_Theme.ogg";
	tmpref.files.l2.name = "MUSIC\Sobor.ogg";
	//============ INCA TEMPLE, CAVES, DUNGEON, JAILS =======
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_coridor";
	tmpref.files.l1.name = "MUSIC\Cave_or_Dungeon_Walking.ogg";
	tmpref.files.l2.name = "MUSIC\Coridor.ogg";
	//============ JUNGLE SHORE, JUNGLE =====================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_jungle";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Jungle.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Jungle_Shore_Exploration.ogg";
	//============ GOVERNOR =================================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_gubernator";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Governors_Theme.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Gubernator.ogg";
	//============ SPOKPLAVANIE =============================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_spokplavanie";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Spokplavanie.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Sailing01.ogg";
	//============ ENPLAVANIE ===============================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_enplavanie";
	tmpref.files.l1.name = "MUSIC\Enplavanie.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Sailing02.ogg";
	//============ GOROD, PORT ==============================
	n++;

	//=========================| MUSIC FROM SEADOGS |=========================//MAXIMUS -->
	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_eng_town";
	tmpref.files.l1.name = "MUSIC\Eng_Town.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_fra_town";
	tmpref.files.l1.name = "MUSIC\Fra_Town.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_spa_town";
	tmpref.files.l1.name = "MUSIC\Spa_Town.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_pir_town";
	tmpref.files.l1.name = "MUSIC\Pir_Town.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_hol_town";
	tmpref.files.l1.name = "MUSIC\Hol_Town.ogg";
	n++;
	//=========================| MUSIC FROM SEADOGS |=========================//MAXIMUS <--

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_gorod";
	tmpref.files.l1.name = "MUSIC\Gorod-1.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Jungle.ogg";
	tmpref.files.l3.name = "MUSIC\Enplavanie.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_gorod_2";
	tmpref.files.l1.name = "MUSIC\Gorod-2.ogg";
	n++;

	//============ SHIP AT SEA ==============================
	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_map";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Spokplavanie.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_storm";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Storm.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_End_storm";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_End_storm.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_abordage";
	tmpref.files.l1.name = "MUSIC\Abordage.ogg";
	tmpref.files.l2.name = "MUSIC\Board_&_Capture.ogg";
	tmpref.files.l3.name = "MUSIC\Paluba.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_sea_battle";
	tmpref.files.l1.name = "MUSIC\MNC\MNC_Sea_battle01.ogg";
	tmpref.files.l2.name = "MUSIC\MNC\MNC_Sea_battle02.ogg";
	tmpref.files.l3.name = "MUSIC\MNC\MNC_Sea_battle03.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_ship_victory";
	tmpref.files.l1.name = "MUSIC\Ship_victory01.ogg";
	tmpref.files.l2.name = "MUSIC\Ship_victory03.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_ship_dead";
	tmpref.files.l1.name = "MUSIC\Ship_dead.ogg";
	//============ MELEE FIGHTING ===========================
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_bitva";
	tmpref.files.l1.name = "MUSIC\Bitva1.ogg";
	tmpref.files.l2.name = "MUSIC\Bitva2.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_victory";
	tmpref.files.l1.name = "MUSIC\Victori.ogg";
	n++;

	makeref(tmpref, Music_Alias[n]);
	tmpref.id = "music_death";
	tmpref.files.l1.name = "MUSIC\Death.ogg";
	n++;

	trace("InitMusic: created " + n + " entries.");
}

void RegisterMusicScheme()
{
	//if (CheckDirectory("RESOURCE\Sounds\MUSIC\CTI", ".ogg") == 0) return;
	ref rms; makeref(rms, registered_music_schemes);
	int n = GetAttributesNum(rms);
	string lnode = "l" + n;
	rms.(lnode).id = "mnc";
	rms.(lnode).resdir = "MNC";
	switch (LanguageGetLanguage())
	{
		case "Polish":
			rms.(lnode).name = "Pan i władca";
		break;
		// default:
			rms.(lnode).name = "Master & Commander";
	}
}
