|
From: | David White |
Subject: | Re: [Wesnoth-dev] KISS Solution to user campaign stability problems |
Date: | Thu, 23 Jun 2005 18:25:55 -0500 |
User-agent: | Mozilla Thunderbird 0.8 (Windows/20040913) |
ott wrote:
This was caused because I didn't notice that the function preprocess_file() had been changed to take a const pointer to the defines map which it doesn't modify. I've committed a fix by making preprocess_file() once again modify the map that's passed in with the new defines. This means that user campaigns will inherit the defines map from the parse of game.cfg as they should.On Fri, Jun 10, 2005 at 08:16:53PM -0500, David White wrote:The solution is to remove the {~data/campaigns} reference in the game.cfg file. Instead, the game now reads data/game.cfg and then reads each file in the pattern ~data/campaigns/*.cfg, and appends them to the config object.Unfortunately, this has completely broken user campaigns. The problem seems to be that none of the standard macros are available to user campaigns. As an example, MENU_IMG_TXT and MENU_IMG_TXT2 are not available and hence no difficulty levels can be chosen.
It'd be great if silene could look over this change to make sure I didn't break anything.
I'm not sure how this problem was caused. It'd be great if it could be fixed though.Since 0.9.2 we also seem to have made the parser very fussy about missing newlines at the end of file, at least when parsing the main campaign .cfg file -- if the last line is not newline terminated it will apparently be ignored, and since the last line is often #endif this is fatal for many campaigns. See my overview of the campaign server downloads at http://www.wesnoth.org/forum/viewtopic.php?t=6463 where many of the campaigns will at least pass the basic syntax check if they get a final newline.
Finally, this change seems to have removed the helpful errors that were generated with 0.9.2 when parsing the .cfg files, which often helped to isolate the problem. Now all we get is that the campaign is broken, with very little else to go on.
I've made a change that I think should fix this.Thank you for your thorough investigation of the problem. Please let us know if there are further problems.
David
[Prev in Thread] | Current Thread | [Next in Thread] |