On Thu, May 24, 2007 at 06:58:34PM -0400, Eric S. Raymond wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > The problem i see with #include is it is less powerful that our current
> > system.
> > With current system we can include any file we want in a middle of a line,
> > which might not be possible with #include.
> > mapdata="{foo.map}" is only the most usual case, but there a lot of others
> > (i
> > remeber i already used it for terrain masks, the random terrain generation
> > part of a scenario (which was shared with some other scenarios).
>
> Can you point me at some of these non-map use cases?
- (still a map use, but not directy connected with map WML) : store a map in a
WML variable (most likely an array)
- inclusion of a list of racial names instead of defining a macro for this
- inclusion of a (large) text file inside a [story] statement
- use of a recruit list defined in a file
- more general: inclusion of a text file inside a WML variable
(the preprocessor is the only way for WML to use some data stored in a text
file)
Btw #include (or any other solution) should be able to handle some complex
cases:
i sometimes use some macro like this :
#define MACRO FILENAME
# some WML code
{{FILENAME}}
#enddef
{{FILENAME}} would be replaced by #include {FILENAME}
Would this still work ?
Or one even more complex real example :
#define MP_SIDE ERA FACTION
[EMAIL PROTECTED]/Extended_Era/factions/{FACTION}-{ERA}.cfg}
#enddef
Would this still work ?
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev