1
0
forked from mirrors/0ad

Play more music tracks.

Register the new track "Tale Of Warriors" from 11c6dec383 with the game.
Register "Calm Before the Storm" and "Tavern in the Mist",  which were
not heard in the previous releases.
Play some peace tracks for all civilizations, as intended by Omri (thus
play some music for observers too, refs #4298).
Add more background tracks to the menu as agreed with WhiteTreePaladin.
Keep "Honor Bound" the first one, as proposed by Itms and leper.
Add some tracks that are played only for one civ to other civs, to
reduce the repetition.
Remove duplicate, now unused music code.

Differential Revision: https://code.wildfiregames.com/D732
Fixes #4565.

This was SVN commit r19918.
This commit is contained in:
elexis
2017-07-14 18:57:33 +00:00
parent d56692d9e1
commit 9ec42a77a1
12 changed files with 29 additions and 15 deletions
+15 -14
View File
@@ -51,8 +51,16 @@ function Music()
Music.prototype.resetTracks = function()
{
this.tracks = {
MENU: ["Honor_Bound.ogg"],
PEACE: [],
"MENU": ["Honor_Bound.ogg"].concat(shuffleArray([
"An_old_Warhorse_goes_to_Pasture.ogg",
"Calm_Before_the_Storm.ogg",
"Juno_Protect_You.ogg"
])),
"PEACE": [
"Tale_of_Warriors.ogg",
"Tavern_in_the_Mist.ogg",
"The_Road_Ahead.ogg"
],
BATTLE: ["Taiko_1.ogg", "Taiko_2.ogg"],
VICTORY : ["You_are_Victorious!.ogg"],
DEFEAT : ["Dried_Tears.ogg"]
@@ -79,23 +87,23 @@ Music.prototype.updateState = function()
break;
case this.states.MENU:
this.switchMusic(pickRandom(this.tracks.MENU), 0, true);
this.startPlayList(this.tracks.MENU, 0, true);
break;
case this.states.PEACE:
this.startPlayList(this.tracks.PEACE, 3.0, true);
this.startPlayList(shuffleArray(this.tracks.PEACE), 3.0, true);
break;
case this.states.BATTLE:
this.startPlayList(this.tracks.BATTLE, 2.0, true);
this.startPlayList(shuffleArray(this.tracks.BATTLE), 2.0, true);
break;
case this.states.VICTORY:
this.startPlayList(this.tracks.VICTORY, 2.0, true);
this.startPlayList(shuffleArray(this.tracks.VICTORY), 2.0, true);
break;
case this.states.DEFEAT:
this.startPlayList(this.tracks.DEFEAT, 2.0, true);
this.startPlayList(shuffleArray(this.tracks.DEFEAT), 2.0, true);
break;
default:
@@ -141,13 +149,6 @@ Music.prototype.startPlayList = function(tracks, fadeInPeriod, isLooping)
Engine.StartPlaylist(isLooping);
};
Music.prototype.switchMusic = function(track, fadeInPeriod, isLooping)
{
Engine.ClearPlaylist();
Engine.AddPlaylistItem( this.RELATIVE_MUSIC_PATH + track );
Engine.StartPlaylist(isLooping);
};
Music.prototype.isPlaying = function()
{
return Engine.MusicPlaying();
@@ -7,6 +7,7 @@
"Music":[
{"File":"Harvest_Festival.ogg", "Type":"peace"},
{"File":"Forging_a_City-State.ogg", "Type":"peace"},
{"File":"Highland_Mist.ogg", "Type":"peace"},
{"File":"The_Hellespont.ogg", "Type":"peace"}
],
"Factions":
@@ -8,6 +8,7 @@
{"File":"Highland_Mist.ogg", "Type":"peace"},
{"File":"Water's_Edge.ogg", "Type":"peace"},
{"File":"Celtic_Pride.ogg", "Type":"peace"},
{"File":"Cisalpine_Gaul.ogg", "Type":"peace"},
{"File":"Celtica.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,7 @@
"History": "Carthage, a city-state in modern-day Tunisia, was a formidable force in the western Mediterranean, eventually taking over much of North Africa and modern-day Spain in the third century B.C. The sailors of Carthage were among the fiercest contenders on the high seas, and masters of naval trade. They deployed towered War Elephants on the battlefield to fearsome effect, and had defensive walls so strong, they were never breached.",
"Music":[
{"File":"Mediterranean_Waves.ogg", "Type":"peace"},
{"File":"Harsh_Lands_Rugged_People.ogg", "Type":"peace"},
{"File":"Peaks_of_Atlas.ogg", "Type":"peace"}
],
"Factions":
@@ -5,9 +5,9 @@
"Emblem": "session/portraits/emblems/emblem_celts.png",
"History": "The Gauls were the Celtic tribes of continental Europe. Dominated by a priestly class of Druids, they featured a sophisticated culture of advanced metalworking, agriculture, trade and even road engineering. With heavy infantry and cavalry, Gallic warriors valiantly resisted Caesar's campaign of conquest and Rome's authoritarian rule.",
"Music":[
{"File":"The_Road_Ahead.ogg", "Type":"peace"},
{"File":"Celtic_Pride.ogg", "Type":"peace"},
{"File":"Cisalpine_Gaul.ogg", "Type":"peace"},
{"File":"Harvest_Festival.ogg", "Type":"peace"},
{"File":"Water's_Edge.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,7 @@
"History": "The Iberians were a people of mysterious origins and language, with a strong tradition of horsemanship and metalworking. A relatively peaceful culture, they usually fought in other's battles only as mercenaries. However, they proved tenacious when Rome sought to take their land and freedom from them, and employed pioneering guerrilla tactics and flaming javelins as they fought back.",
"Music":[
{"File":"An_old_Warhorse_goes_to_Pasture.ogg", "Type":"peace"},
{"File":"Celtica.ogg", "Type":"peace"},
{"File":"Harsh_Lands_Rugged_People.ogg", "Type":"peace"}
],
"Factions":
@@ -7,6 +7,7 @@
"Music":[
{"File":"Rise_of_Macedon.ogg", "Type":"peace"},
{"File":"In_the_Shadow_of_Olympus.ogg", "Type":"peace"},
{"File":"Elysian_Fields.ogg", "Type":"peace"},
{"File":"The_Hellespont.ogg", "Type":"peace"}
],
"Factions":
@@ -5,7 +5,9 @@
"Emblem": "session/portraits/emblems/emblem_mauryans.png",
"History": "Founded in 322 B.C. by Chandragupta Maurya, the Mauryan Empire was the first to rule most of the Indian subcontinent, and was one of the largest and most populous empires of antiquity. Its military featured bowmen who used the long-range bamboo longbow, fierce female warriors, chariots, and thousands of armored war elephants. Its philosophers, especially the famous Acharya Chanakya, contributed to such varied fields such as economics, religion, diplomacy, warfare, and good governance. Under the rule of Ashoka the Great, the empire saw 40 years of peace, harmony, and prosperity.",
"Music":[
{"File":"An_old_Warhorse_goes_to_Pasture.ogg", "Type":"peace"},
{"File":"Land_between_the_two_Seas.ogg", "Type":"peace"},
{"File":"Eastern_Dreams.ogg", "Type":"peace"},
{"File":"Karmic_Confluence.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,8 @@
"History": "The Persian Empire, when ruled by the Achaemenid dynasty, was one of the greatest empires of antiquity, stretching at its zenith from the Indus Valley in the east to Greece in the west. The Persians were the pioneers of empire-building of the ancient world, successfully imposing a centralized rule over various peoples with different customs, laws, religions and languages, and building a cosmopolitan army made up of contingents from each of these nations.",
"Music":[
{"File":"Eastern_Dreams.ogg", "Type":"peace"},
{"File":"Valley_of_the_Nile.ogg", "Type":"peace"},
{"File":"Land_between_the_two_Seas.ogg", "Type":"peace"},
{"File":"Sands_of_Time.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,8 @@
"History":"The Ptolemaic dynasty was a Macedonian Greek royal family which ruled the Ptolemaic Empire in Egypt during the Hellenistic period. Their rule lasted for 275 years, from 305 BC to 30 BC. They were the last dynasty of ancient Egypt.",
"Music":[
{"File":"Ammon-Ra.ogg", "Type":"peace"},
{"File":"Sands_of_Time.ogg", "Type":"peace"},
{"File":"Land_between_the_two_Seas.ogg", "Type":"peace"},
{"File":"Valley_of_the_Nile.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,7 @@
"History": "The Romans controlled one of the largest empires of the ancient world, stretching at its peak from southern Scotland to the Sahara Desert, and containing between 60 million and 80 million inhabitants, one quarter of the Earth's population at that time. Rome also remained one of the strongest nations on earth for almost 800 years. The Romans were the supreme builders of the ancient world, excelled at siege warfare and had an exquisite infantry and navy.",
"Music":[
{"File":"Juno_Protect_You.ogg", "Type":"peace"},
{"File":"Mediterranean_Waves.ogg", "Type":"peace"},
{"File":"Elysian_Fields.ogg", "Type":"peace"}
],
"Factions":
@@ -6,6 +6,7 @@
"History":"Sparta was a prominent city-state in ancient Greece, and its dominant military power on land from circa 650 B.C. Spartan culture was obsessed with military training and excellence, with rigorous training for boys beginning at age seven. Thanks to its military might, Sparta led a coalition of Greek forces during the Greco-Persian Wars, and won over Athens in the Peloponnesian Wars, though at great cost.",
"Music":[
{"File":"Helen_Leaves_Sparta.ogg", "Type":"peace"},
{"File":"Peaks_of_Atlas.ogg", "Type":"peace"},
{"File":"Forging_a_City-State.ogg", "Type":"peace"},
{"File":"The_Hellespont.ogg", "Type":"peace"}
],