bugBattle for Wesnoth - Bugs: bug #18683, Leader sprite is missing in the...

 
 
Show feedback again

bug #18683: Leader sprite is missing in the load game dialog

Submitted by:  Espreon <espreon>
Submitted on:  Sun Sep 18 00:30:29 2011  
 
Category: BugSeverity: 2 - Minor
Priority: 4Item Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: Ignacio R. Morelle <shadowmaster>Open/Closed: Closed
Release: 1.9.9+svn (51223)Operating System: Sabayon Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon Oct 24 05:59:43 2016, comment #14:

In 1.13.5+dev I've ensured the binary path is parsed twice - once at save index creation and again when the Load Game dialog is shown. If neither returns a usable image, the 'unknown unit' image is displayed instead.

The save_index mechanism will save the relative path on binary path lookup fail so it has a chance to at least be shown correctly in the dialog as long as the correct binary path data is loaded. Note that it doesn't resave the full path back to the save index; I'm not sure that's possible.

Anyway, I consider this fixed.

Charles Dang <vultraz>
Project Administrator
Sat Apr 14 23:43:43 2012, SVN revision 53932:

Make leader_image paths in the saved games index binary path-independent (part of bug #18683)

This makes it possible to store in the save_index image paths that can
be used in the Load Game dialog even when displaying units whose
graphics are in binary paths not currently loaded. This alleviates the
effect of bug #19410 on the whole mechanism, but not completely.

When the save_index is missing, this won't work properly; we'll need to
add the leader_image attribute to the saved game config itself later.

(Browse SVN revision 53932)

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sun Feb 5 01:11:02 2012, comment #12:

Waiting on bug #19410 now.

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat Feb 4 20:53:37 2012, comment #11:

image::exists() apparently doesn't try very hard to locate images for non-default binary paths. As a result, the leader image is still missing for saved games of currently-loaded campaigns and eras.

I'll try to figure out a different way to detect whether an image can be loaded later (the only reason I didn't use the original image::get_image() test is that it causes noise in stderr).

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat Feb 4 20:45:05 2012, SVN revision 52921:

Restore leader unit image in Load Game dialog (bug #18683)

(Candidate for 1.10 branch.)

This functionality is back with a slight change to r47758 in order to
left-align the map snapshot only when the leader image cannot be loaded.
We also no longer spam stderr with errors about missing leader images
(which can be caused by unloaded campaigns or eras).

Anonymissimus pointed out this functionality was still found in the GUI2
version of the dialog (--new-widgets). Whoever last changed the saved
games summary code probably only bothered to update this experimental
code without fixing the normal GUI1 dialog. As I pointed out in the
tracker, the layout code was still in place.

As a compromise for the time being, we always assume the "magenta"
palette for TC recoloring now. This doesn't seem to be a problem since
the old code already made an annoying assumption of side 1 using the 1
(red) color range instead of permiting the use of the side.color value,
or reflecting the currently playing side number at the time of the save
generation.

I may later extend the saved games summary to include additional
information to get rid of the magenta and side 1 limitations.

(Browse SVN revision 52921)

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Sat Feb 4 16:13:07 2012, comment #9:

Note that I recently got to see some leader sprites there by using the --new-widgets parameter (gui2 version of load game dialog).

Anonymissimus <anonymissimus>
Project Member
Wed Jan 18 23:27:30 2012, comment #8:

Also note that extract_summary_from_config is only called by manager::load_summary in savegame.cpp:277 project-wide, and that this happens for a certain savegame only in case that the summary wasn't already present in the save_index (since acquiring the summary is expensive).
other bug in the series: bug #19215:

Anonymissimus <anonymissimus>
Project Member
Wed Jan 18 23:15:27 2012, comment #7:

The information to display is acquired in the function extract_summary_from_config in gamestatus.cpp:369ff, which also assigns the unit id to the leader key instead of its type.
However, even after fixing that, I can't get the image to show for unknown reason, though it is loaded correctly AFAICT.
The leader key's value can be empty or a unit id for both turn saves or start-of-scenario saves.

Anonymissimus <anonymissimus>
Project Member
Sun Jan 8 14:09:40 2012, comment #6:

The GUI (GUI1) code implementing the leader sprite presentation in the save preview panel still exists in trunk as of this writing (r52545) and can be found in src/dialogs.cpp, lines 384 to 399 (in the implementation of the <anonymous>::save_preview_pane::draw_contents() method), so it is possible this feature wasn't intentionally disabled or removed.

The save_index.gz file (which is already a PITA due to other bugs) stores .leader and .leader_image attributes under [save] nodes, but .leader doesn't contain useful data -- for turn saves, it corresponds to the side 1 leader (individual) unit id, but for start-of-scenario saves it's an empty string. Neither is what the GUI1 code expects (a unit type id).

Ignacio R. Morelle <shadowmaster>
Project AdministratorIn charge of this item.
Mon Oct 24 14:56:14 2011, comment #5:

Adapt bug title.

Anonymissimus <anonymissimus>
Project Member
Sun Oct 16 15:25:02 2011, comment #4:

Eh, you're right. I remember the leader sprite reacting to which unit actually is the leader (canrecruit=yes).
However, the feature could as well have been removed at some point for some reason.
Seems to be in 1.9.8 already.

Anonymissimus <anonymissimus>
Project Member
Fri Oct 14 09:29:26 2011, comment #3:

The minimap part of this is fixed, but not the leader sprite part. I do recall seeing leader sprites in that dialog at one point, but I don't remember when they disappeared.

Espreon <espreon>
Project Member
Mon Oct 10 13:16:03 2011, comment #2:

Due to the token changes revert, this bug has probably never existed. Please check.

Anonymissimus <anonymissimus>
Project Member
Tue Sep 20 21:20:42 2011, SVN revision 51235:

Fixed bug #18682 load dialog bug where all times were 1969, by changing incorrect iterator from i to j on line 624. Bug #18683 is not fixed by this patch. Other bug in the series are bug #18665, bug #18649

(Browse SVN revision 51235)

Thonsew <thonsew>
Project Member
Sun Sep 18 00:30:29 2011, original submission:

Sometimes, the minimap preview and the leader sprite are missing in the load game dialog. If they are present, the dialog will use the first save's minimap and leader sprite for all saves.

Espreon <espreon>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by vultraz (Posted a comment)
  • -unavailable- added by shadowmaster (Posted a comment)
  • -unavailable- added by anonymissimus (Posted a comment)
  • -unavailable- added by thonsew (Updated the item)
  • -unavailable- added by espreon (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Nov 7 08:07:01 2016vultrazOpen/ClosedOpen=>Closed
    Mon Oct 24 05:59:43 2016vultrazStatusIn Progress=>Fixed
    Wed Feb 8 20:48:39 2012shadowmasterDependencies-=>Depends on bugs #19410
    Sat Feb 4 20:53:37 2012shadowmasterStatusNone=>In Progress
    Sat Feb 4 20:08:07 2012shadowmasterAssigned toNone=>shadowmaster
    Mon Oct 24 14:56:14 2011anonymissimusSummaryMinimap preview and leader sprite are sometimes missing in the load game dialog=>Leader sprite is missing in the load game dialog
    Sun Oct 16 15:25:02 2011anonymissimusSeverity3 - Normal=>2 - Minor
      Priority5 - Normal=>4
    Mon Oct 10 13:16:03 2011anonymissimusStatusReady For Test=>None
      Assigned tothonsew=>None
    Mon Sep 26 21:17:48 2011thonsewStatusIn Progress=>Ready For Test
    Tue Sep 20 19:28:40 2011thonsewStatusNone=>In Progress
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup