URL:
  <http://gna.org/bugs/?13006>

                 Summary: SET_IMAGE_AND_LABEL_PERSISTANT macro is broken
                 Project: Battle for Wesnoth
            Submitted by: voris
            Submitted on: Monday 02/16/2009 at 06:57
                Category: Bug
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.5.9
        Operating System: Ubuntu 8.10

    _______________________________________________________

Details:

The SET_IMAGE_AND_LABEL_PERSISTANT macro in the interface-utils.cfg file does
not display the image file provided for the IMAGE parameter. This is easily
reproducable by placing a line such as the following in a scenario file:

{SET_IMAGE_AND_LABEL_PERSISTANT 3 5 scenery/signpost.png ( _ "Shop")}

In 1.4.7 this shows a signpost image with the word "Shop" beneath and the
text will reappear, if it had been cleared, on each new turn. In 1.5.9 the
persistent text still works correctly but the image fails to display.

I have identified the culprit: the sub-macro used to display the image has
been changed from SET_IMAGE to PLACE_IMAGE but kept the same parameter order
despite the fact that PLACE_IMAGE changes the order in which they're needed.

>From interface-utils.cfg in 1.4.7:

#define SET_IMAGE X Y IMAGE

>From image-utils.cfg in 1.5.9:

#define PLACE_IMAGE IMAGE X Y

>From interface-utils.cfg in 1.5.9:

#define SET_IMAGE_AND_LABEL_PERSISTANT X Y IMAGE STRING
    # Shorthand for setting both a persistant label and image at once.
    {SET_LABEL_PERSISTANT {X} {Y} ({STRING}) }
    {PLACE_IMAGE {X} {Y} ({IMAGE}) }
#enddef


Likely the safest, lowest impact fix will be to simply make the usage in
SET_IMAGE_AND_LABEL_PERSISTANT conform to the correct parameter order. For
your convenience I have pasted corrected code below since I cannot submit the
fix myself.

Corrected code:

#define SET_IMAGE_AND_LABEL_PERSISTANT X Y IMAGE STRING
    # Shorthand for setting both a persistent label and image at once.
    {SET_LABEL_PERSISTANT {X} {Y} ({STRING}) }
    {PLACE_IMAGE ({IMAGE}) {X} {Y} }
#enddef





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?13006>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to