mail[Wesnoth-commits] r10273 - in /trunk: data/campaigns/Heir_To_The_Throne/utils/intro.cfg src/intro.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by dave on February 24, 2006 - 01:34:
Author: dave
Date: Fri Feb 24 01:33:56 2006
New Revision: 10273

URL: http://svn.gna.org/viewcvs/wesnoth?rev=10273&view=rev
Log:
fixed dot/cross position on maps

Modified:
    trunk/data/campaigns/Heir_To_The_Throne/utils/intro.cfg
    trunk/src/intro.cpp

Modified: trunk/data/campaigns/Heir_To_The_Throne/utils/intro.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Heir_To_The_Throne/utils/intro.cfg?rev=10273&r1=10272&r2=10273&view=diff
==============================================================================
--- trunk/data/campaigns/Heir_To_The_Throne/utils/intro.cfg (original)
+++ trunk/data/campaigns/Heir_To_The_Throne/utils/intro.cfg Fri Feb 24 
01:33:56 2006
@@ -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."

Modified: trunk/src/intro.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/intro.cpp?rev=10273&r1=10272&r2=10273&view=diff
==============================================================================
--- trunk/src/intro.cpp (original)
+++ trunk/src/intro.cpp Fri Feb 24 01:33:56 2006
@@ -126,6 +126,9 @@
                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 @@
        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 @@
                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 @@
                        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;




Related Messages


Powered by MHonArc, Updated Fri Feb 24 03:00:29 2006