fixed dot/cross position on maps

This commit is contained in:
David White 2006-02-24 00:33:56 +00:00
parent 744807edf2
commit 65518d22a4
2 changed files with 13 additions and 7 deletions

View file

@ -3,7 +3,7 @@
[part]
music=wesnoth-1.ogg
story= _ "In the twenty-seventh year of the reign of Garard II, king of Wesnoth, the kingdom was plunged into a bitter war with the Peoples of the North."
background=maps/wesnoth-bw.jpg
background=misc/title.png
[/part]
[part]
story= _ "The Northern host encamped at Galcadar, by the ford of Abez, and the king led his forces to meet them. Splitting his army in two, he led one half while his son, the crown prince Eldred, led the other."
@ -19,7 +19,7 @@
[/part]
[part]
story= _ "In exchange for tribute, the Northern king happily made peace with Eldred, who proclaimed himself king and led his army back to Weldyn."
background=maps/wesnoth-bw.jpg
background=misc/title.png
[/part]
[part]
story= _ "But Garard's arch-mage, Delfador, had escaped the battle and, riding with haste, reached Weldyn first. He mustered a force of loyalists to fight Eldred and avenge the king's death."
@ -27,6 +27,7 @@
[/part]
[part]
story= _ "Eldred made war upon Delfador and his forces with his mother's advice ringing in his ears: 'Fight no one great or small except the old mage, whose head should be severed from his shoulders.'"
background=misc/title.png
[/part]
[part]
story= _ "And Eldred did indeed meet Delfador face-to-face in battle that day. Sword clashed against staff, as the wise old mage fought the brash young warrior."
@ -38,7 +39,7 @@
[/part]
[part]
story= _ "Asheviere herself then took command of the army, and led it back to Weldyn. Knowing that the king's young nephews were next in line to the throne, she ordered them all killed, and declared herself Queen of Wesnoth."
background=maps/wesnoth-bw.jpg
background=misc/title.png
[/part]
[part]
story= _ "Soon after news of Asheviere's orders reached Delfador, he secretly entered the palace and stole away Konrad, the youngest of Garard's nephews, thereby saving him from death."

View file

@ -126,6 +126,9 @@ bool show_intro_part(display &disp, const config& part,
yscale = (background->h*xscale)/background->w;
}
const int map_w = background->w;
const int map_h = background->h;
background = scale_surface(background,xscale,yscale);
dstrect.x = video.getx()/2 - background->w/2;
@ -152,7 +155,9 @@ bool show_intro_part(display &disp, const config& part,
texty = dstrect.y + dstrect.h - 200;
//darken the area for the text and buttons to be drawn on
draw_solid_tinted_rectangle(0,texty,video.getx(),video.gety()-texty,0,0,0,0.5,video.getSurface());
if(show_title == false) {
draw_solid_tinted_rectangle(0,texty,video.getx(),video.gety()-texty,0,0,0,0.5,video.getSurface());
}
next_button.set_location(xbuttons,dstrect.y+dstrect.h-180);
skip_button.set_location(xbuttons,dstrect.y+dstrect.h-130);
@ -163,7 +168,7 @@ bool show_intro_part(display &disp, const config& part,
const SDL_Rect scenario_size =
font::draw_text(NULL,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,0,0);
update_rect(font::draw_text(&video,area,font::SIZE_XLARGE,font::NORMAL_COLOUR,scenario,
dstrect.x,dstrect.y - scenario_size.h - 4));
dstrect.x + 20,dstrect.y + 20));
}
events::raise_draw_event();
@ -182,8 +187,8 @@ bool show_intro_part(display &disp, const config& part,
const std::string& image_name = (**i)["file"];
const std::string& delay_str = (**i)["delay"];
const int delay = (delay_str == "") ? 0: atoi(delay_str.c_str());
const int x = atoi(xloc.c_str());
const int y = atoi(yloc.c_str());
const int x = (atoi(xloc.c_str())*background->w)/map_w;
const int y = (atoi(yloc.c_str())*background->h)/map_h;
if(x < 0 || x >= background->w || y < 0 || y >= background->h)
continue;