From 60aa868216c921af0090607fbf8f0bbae59bf8f1 Mon Sep 17 00:00:00 2001 From: Dave White Date: Sat, 28 Aug 2004 19:34:02 +0000 Subject: [PATCH] added basic final scenario --- .../Heir_To_The_Throne/Battle_for_Wesnoth | 25 ++++ .../Heir_To_The_Throne/Battle_for_Wesnoth.cfg | 129 ++++++++++++++++++ .../Heir_To_The_Throne/Home_Clan.cfg | 2 +- src/editor/editor_main.cpp | 2 + src/sound.cpp | 2 +- 5 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 data/maps/Heir_To_The_Throne/Battle_for_Wesnoth create mode 100755 data/scenarios/Heir_To_The_Throne/Battle_for_Wesnoth.cfg diff --git a/data/maps/Heir_To_The_Throne/Battle_for_Wesnoth b/data/maps/Heir_To_The_Throne/Battle_for_Wesnoth new file mode 100644 index 00000000000..e417ec60656 --- /dev/null +++ b/data/maps/Heir_To_The_Throne/Battle_for_Wesnoth @@ -0,0 +1,25 @@ +gggggggggggggggRgggggggggggggggggggggggggR +ggggggggggggvggRgggvgggggggggggggggggggRRg +ggggggfffggggggRgggggggggggggggggggggRRggg +ggggggffgggggggRgggggggggggggggggggRRggggg +RRggggffgggggggRgggggggggvgggggggRRggnnngg +ggRRgggggggggggRgggggggggggggggRRggggn1ngg +ggggRRgggggggggRgCgggggggggggRRgggggggnggg +ggggggRRgggggggRC2CggggggggRRggggggggggggg +gggggggvRRgggggRCCCggggggRRggggggggggggggg +fgggggggggRRgggRgggggggRRggggggggggggggggg +ffggggggggggRvvRgvgggRRgggggggggggggggggvg +ffgggggggggvR\c|ccgRRggggggvgggggggggggggg +fgggggggggggcvgCv/Rvgggggggggggggggggggggg +gggggggggvgvcvC5Cvcvvggggggggggggggggggggg +gggCCCggggggc/CCC\cRgggggggggggggggggggggg +gggC4CgggvgRRcvRvcRgRRgggggCggggvgggcccccc +ggggCggggRRgvgcc|vccvgRRggC3Cggccccccccccc +gggggggRRgggvgvgRggcccggRRCCCccccccccccccc +gggggRRgggggggggRRggccccgc\\cccccccccggggg +gggRRvggggggggggggRccccccccc\\cgcggggggfff +gRRggggggggggccccc|cccccccccvgRRgggfffffff +Rggggggggccccccccc|ccccgggggggggRRggffffff +ggggggcccccccccccgRgggggggggggggggRRggfgff +gccccccccccccgggggRgggggggggggggggggRRgggg +cccccccccgggggggggRRggggggggggggggggggRRgg diff --git a/data/scenarios/Heir_To_The_Throne/Battle_for_Wesnoth.cfg b/data/scenarios/Heir_To_The_Throne/Battle_for_Wesnoth.cfg new file mode 100755 index 00000000000..fbc36a75c27 --- /dev/null +++ b/data/scenarios/Heir_To_The_Throne/Battle_for_Wesnoth.cfg @@ -0,0 +1,129 @@ +[scenario] + id=battle_for_wesnoth + name= _ "The Battle for Wesnoth" + map_data="{maps/Heir_To_The_Throne/Battle_for_Wesnoth}" + turns=60 + next_scenario=null + + [story] + [part] + music=main_menu.ogg + story= _ "Here we overlook the city of Weldyn. The great city. The ancient city. The city of evil. The city of good. The city of men." + background=maps/wesnoth.png + [/part] + [part] + story= _ "I have not looked upon this city for seventeen years. Seventeen years ago, when I should have been at the height of my power. But my strength failed me. I failed, and I cannot atone for it." + background=maps/wesnoth.png + [/part] + [part] + story= _ "The battle had been long and hard. We had been defeated. Eldred was slain, but I knew that Asheviere's wrath would be great. That many innocents would be slain. I had to save the monarchy. I had to save the princes. I made haste to Weldyn, before the guards of Asheviere could get there, to carry out their evil orders." + background=maps/wesnoth.png + [/part] + [part] + story= _ "But I failed. I was too late. I entered the chambers of the youngest prince, prince Konrad, just as one of the evil ones ran him through. All was lost. The heirs were slain. Only Asheviere and her daughter had any claim to the throne." + background=maps/wesnoth.png + [/part] + [part] + story= _ "Of course, you are surprised by this, but it is the truth. In haste, I vanquished the evil ones who had committed this foul deed. Then I took the little prince's broken body, and away I rode. Far away, to the land of the Elves." + background=maps/wesnoth.png + [/part] + [part] + story= _ "By strange and mysterious fortune, the Elf Lady Parandra had come across a human child. She knew not where he had come from, only that the Orcs would have eaten him if it weren't for her intervention. The Elves felt that great fortune smiled upon this man-child. Perhaps that is why this most truthful of peoples agreed to my plan." + background=maps/wesnoth.png + [/part] + [part] + story= _ "After burying the little prince, we agreed never to speak of him again. Instead, this orphan child we would call Konrad, and he would be brought up to be king. I would say that I had slain the guards before they had carried out their evil deed, instead of after. No-one would ever have to know. And no-one did know for certain, until now." + background=maps/wesnoth.png + [/part] + [part] + story= _ "I had thought that we could one day make you king, Konrad. But now I see that fate has made a different choice. That despite all of Asheviere's evil, this Li'sar is fit for the throne. She is the rightful queen. From a long line of kings, stretching all the way back to the seafarers of old from the west." + background=maps/wesnoth.png + [/part] + [part] + story= _ "Now, let us not tarry here any longer! The dawn breaks! The time has come for the heir to the throne to claim it!" + background=maps/wesnoth.png + [/part] + [/story] + + {DAWN} + {MORNING} + {AFTERNOON} + {DUSK} + {FIRST_WATCH} + {SECOND_WATCH} + + next_scenario=null + + music="wesnoth-1.ogg" + + objectives= _ " +Victory: +@Defeat Asheviere +Defeat: +#Death of Konrad +#Death of Delfador +#Death of Li'sar +#Death of Kalenz +#Turns run out" + + {BIGMAP_BATTLE_FOR_WESNOTH} + + {STARTING_VILLAGES 6 10} + + [side] + type=Fighter + description=Konrad + side=1 + canrecruit=1 + controller=human + recruit=Elvish Scout,Elvish Fighter,Elvish Archer,Elvish Shaman + gold=100 + team_name=elves + [/side] + + [side] + type=Orcish Warlord + description=Haliel-Maga + side=2 + canrecruit=1 + recruit=Orcish Warrior,Goblin Knight,Goblin Pillager,Orcish Crossbow,Orcish Assassin,Troll + gold=300 + [ai] + recruitment_pattern=scout,fighter,archer + [/ai] + team_name=evil + [/side] + + [side] + type=General + description=Heford + side=3 + canrecruit=1 + recruit=Horseman,Dragoon,Royal Guard,Longbowman,Heavy Infantry + team_name=evil + {GOLD 200 300 500} + [/side] + + [side] + type=Cavalier + description=Sir Kalm + side=4 + canrecruit=1 + recruit=Horseman,Dragoon,Cavalier,Cavalryman + [ai] + recruitment_pattern=scout + [/ai] + team_name=evil + {GOLD 200 300 500} + [/side] + + [side] + type=Princess + description=Asheviere + side=5 + canrecruit=1 + recruit=Royal Guard,Heavy Infantry,Dragoon,Longbowman,Duelist,Halberdier + {GOLD 300 400 500} + team_name=evil + [/side] +[/scenario] diff --git a/data/scenarios/Heir_To_The_Throne/Home_Clan.cfg b/data/scenarios/Heir_To_The_Throne/Home_Clan.cfg index 4d6aa33c793..9f36122f20f 100644 --- a/data/scenarios/Heir_To_The_Throne/Home_Clan.cfg +++ b/data/scenarios/Heir_To_The_Throne/Home_Clan.cfg @@ -12,7 +12,7 @@ {SECOND_WATCH} turns=64 - next_scenario=null + next_scenario=battle_for_wesnoth objectives= _ " Victory: diff --git a/src/editor/editor_main.cpp b/src/editor/editor_main.cpp index 88285bc7493..cb6b0e44292 100644 --- a/src/editor/editor_main.cpp +++ b/src/editor/editor_main.cpp @@ -242,6 +242,8 @@ int main(int argc, char** argv) catch (gamemap::incorrect_format_exception) { std::cerr << "The map is not in a correct format, sorry." << std::endl; return 1; + } catch (CVideo::quit& e) { + return 0; } } return 0; diff --git a/src/sound.cpp b/src/sound.cpp index 92c30e78f62..34776d27d9e 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -43,7 +43,7 @@ namespace sound { manager::manager() { - const int res = Mix_OpenAudio(MIX_DEFAULT_FREQUENCY,MIX_DEFAULT_FORMAT,2,1024); + const int res = Mix_OpenAudio(MIX_DEFAULT_FREQUENCY,MIX_DEFAULT_FORMAT,2,4096); if(res >= 0) { mix_ok = true; Mix_AllocateChannels(16);