terrain_builder::rule_image_variant Struct Reference

An image variant. More...

#include <builder.hpp>

Collaboration diagram for terrain_builder::rule_image_variant:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 rule_image_variant (const std::string &image_string, const std::string &tod)
 Shorthand constructor for this structure.

Public Attributes

std::string image_string
 A string representing either the filename for an image, or a list of images, with an optional timing for each image.
animated< image::locatorimage
 An animated image locator built according to the image string.
std::string tod
 The time-of-day to which this variant applies.


Detailed Description

An image variant.

The in-memory representation of the [variant] WML tag of the [image] WML tag. When an image only has one variant, the [variant] tag may be omitted.

Definition at line 119 of file builder.hpp.


Constructor & Destructor Documentation

terrain_builder::rule_image_variant::rule_image_variant ( const std::string &  image_string,
const std::string &  tod 
) [inline]

Shorthand constructor for this structure.

Definition at line 121 of file builder.hpp.


Member Data Documentation

A string representing either the filename for an image, or a list of images, with an optional timing for each image.

Corresponds to the "name" parameter of the [variant] (or of the [image]) WML tag.

The timing string is in the following format (expressed in EBNF)

		 *  <timing_string> ::= <timed_image> ( "," <timed_image> ) +
		 *
		 *  <timed_image> ::= <image_name> [ ":" <timing> ]
		 *
		 *  Where <image_name> represents the actual filename of an image,
		 *  and <timing> the number of milliseconds this image will last
		 *  in the animation.
		 *

Definition at line 125 of file builder.hpp.

Referenced by terrain_builder::replace_token().

An animated image locator built according to the image string.

This will be the image locator which will actually be returned to the user.

Definition at line 150 of file builder.hpp.

The time-of-day to which this variant applies.

Set to the empty string, this variant applies to all TODs.

Definition at line 155 of file builder.hpp.


The documentation for this struct was generated from the following file:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs