Follow-up Comment #2, bug #23247 (project wesnoth):
The reason the help works this way right now has to do with how the game
handles WML info.
- When the game is loading, i.e., basically whenever you see the black screen
with the blue loading bar, what is happening is that the preprocessor is
crawling through and parsing all of the WML, expanding all the macro
substitutions and making a giant tree called the "game config". (The files
themselves are cached in something called the config cache, so that you don't
actually have thousands of filesystem ops when this is happening, but the
preprocessor actually does get rerun each time iirc.)
- The game config depends on several things, like the game mode. If different
proprocessor flags are set, the game config will be different in general. So
whenever you go from campaigns to multiplayer for example, the whole thing
needs to be reloaded.
- The help browser gets all its info from the game config more or less. When
you are in a different mode you will see different info there, for instance
different unit types.
- I *believe* that terrain data does not get parsed until a map is actually
loaded. This is because terrain data is complicated, terrain building
(calculating all the terrain graphics information) is expensive. If you had to
build all the terrain data each time you load the game config, I think it
might hurt load times significantly.
- Therefore, when you click help from the title screen after loading the game,
there is *no* terrain data available. It only gets this from whatever the
current map is.
Anyways, I somewhat doubt that it is possible to show "the full list" when
called from title screen. If you want to get all of the game configs from all
of the possible modes, and get all of the terrain info from all of them, it
would be the equivalent of waiting for the blue bar to scan across like 4 - 6
times or something, and it would take a lot of memory. There's no other way to
get all of the game configs at once other than to repeatedly scan the entire
WML tree with different preprocessor defines. Unfortunately, macros are evil
like that :(
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?23247>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs